diff --git a/linux-core/drmP.h b/linux-core/drmP.h index 74516821..d0a36459 100644 --- a/linux-core/drmP.h +++ b/linux-core/drmP.h @@ -260,6 +260,14 @@ typedef struct drm_buf { DRM_LIST_PRIO = 4, DRM_LIST_RECLAIM = 5 } list; /* Which list we're on */ +#if 0 + enum { + TT_GENERAL, + TT_BLIT, + TT_VECTOR, + TT_VERTEX + } transfer_type; +#endif #if DRM_DMA_HISTOGRAM cycles_t time_queued; /* Queued to kernel DMA queue */ cycles_t time_dispatched; /* Dispatched to hardware */ diff --git a/linux/drmP.h b/linux/drmP.h index 74516821..d0a36459 100644 --- a/linux/drmP.h +++ b/linux/drmP.h @@ -260,6 +260,14 @@ typedef struct drm_buf { DRM_LIST_PRIO = 4, DRM_LIST_RECLAIM = 5 } list; /* Which list we're on */ +#if 0 + enum { + TT_GENERAL, + TT_BLIT, + TT_VECTOR, + TT_VERTEX + } transfer_type; +#endif #if DRM_DMA_HISTOGRAM cycles_t time_queued; /* Queued to kernel DMA queue */ cycles_t time_dispatched; /* Dispatched to hardware */ diff --git a/linux/mga_bufs.c b/linux/mga_bufs.c index 40fe4beb..a66620a2 100644 --- a/linux/mga_bufs.c +++ b/linux/mga_bufs.c @@ -52,6 +52,7 @@ int mga_addbufs_agp(struct inode *inode, struct file *filp, unsigned int cmd, int page_order; int total; int byte_count; + int i; if (!dma) return -EINVAL; @@ -528,7 +529,7 @@ int mga_mapbufs(struct inode *inode, struct file *filp, unsigned int cmd, } virtual = do_mmap(filp, 0, map->size, PROT_READ|PROT_WRITE, - MAP_SHARED, map->handle); + MAP_SHARED, (unsigned long)map->handle); } else { virtual = do_mmap(filp, 0, dma->byte_count, diff --git a/linux/mga_dma.c b/linux/mga_dma.c index 4fa8cd16..ff3b07d9 100644 --- a/linux/mga_dma.c +++ b/linux/mga_dma.c @@ -121,8 +121,7 @@ static inline void mga_prim_overflow(drm_device_t *dev) } static inline void mga_dma_dispatch(drm_device_t *dev, unsigned long address, - unsigned long length, - transferType_t transferType) + unsigned long length) { int use_agp = PDEA_pagpxfer_enable; static int softrap = 1; @@ -130,7 +129,7 @@ static inline void mga_dma_dispatch(drm_device_t *dev, unsigned long address, CHECK_OVERFLOW(10); DMAOUTREG(MGAREG_DMAPAD, 0); DMAOUTREG(MGAREG_DMAPAD, 0); - DMAOUTREG(MGAREG_SECADDRESS, address | transferType); + DMAOUTREG(MGAREG_SECADDRESS, address | TT_GENERAL); DMAOUTREG(MGAREG_SECEND, (address + length) | use_agp); DMAOUTREG(MGAREG_DMAPAD, 0); DMAOUTREG(MGAREG_DMAPAD, 0); @@ -238,6 +237,7 @@ static int mga_do_dma(drm_device_t *dev, int locked) buf = dma->next_buffer; address = (unsigned long)buf->bus_address; length = buf->used; + DRM_DEBUG("context %d, buffer %d (%ld bytes)\n", buf->context, buf->idx, length);