Fixes to make mga_buf.c & mga_dma.c compile

This commit is contained in:
Jeff Hartmann 2000-01-14 00:43:21 +00:00
parent 49c8510611
commit e176a16622
4 changed files with 21 additions and 4 deletions

View file

@ -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 */

View file

@ -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 */

View file

@ -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,

View file

@ -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);