summaryrefslogtreecommitdiff
path: root/linux
diff options
context:
space:
mode:
authorErdi Chen <erdi@freedesktop.org>2004-08-24 01:44:37 +0000
committerErdi Chen <erdi@freedesktop.org>2004-08-24 01:44:37 +0000
commit25e319c1ef5b6c002ddfe55338cd920240cc1dad (patch)
tree92c13df2e866d7d70016b11cfc9316993431d420 /linux
parent7fe4f607681e9a5593e91915953a9b6c45e5f08c (diff)
This patch adds three new ioctl's to the VIA Unichrome/Pro DRM driver:
DRM_IOCTL_VIA_DMA_INIT DRM_IOCTL_VIA_CMDBUFFER DRM_IOCTL_VIA_FLUSH The first ioctl sets up an area in AGP memory that will be used as the ring buffer. The second ioctl copies a command buffer from user space memory to the ring buffer. The third ioctl waits for engine idle until it returns. The motivation for this patch is to avoid the wait for engine idle call before each buffer flush in the current DRI driver. With this patch, the DRI driver can continue to flush its buffer as long as there is free space in the ring buffer. This patch adds an additional copy operation on the command buffer. This buffer copying is necessary to support multiple DRI clients rendering simultaneously. Otherwise, more CPU time will be spent in the busy loop waiting for engine idle between DRI context switch. Even in the single client case, the tradeoff is reasonable in comparision to the kernel call to check for free buffer space for the client to render directly to the ring buffer.
Diffstat (limited to 'linux')
-rw-r--r--linux/Makefile7
-rw-r--r--linux/Makefile.kernel2
-rw-r--r--linux/drm_drv.h1
3 files changed, 6 insertions, 4 deletions
diff --git a/linux/Makefile b/linux/Makefile
index 1bb131d8..658d9d87 100644
--- a/linux/Makefile
+++ b/linux/Makefile
@@ -97,9 +97,10 @@ SISSHARED= sis.h sis_drv.h sis_drm.h sis_ds.c sis_ds.h sis_mm.c
SAVAGEHEADERS= savage.h savage_drv.h savage_drm.h $(DRMHEADERS) \
$(DRMTEMPLATES)
VIAHEADERS = via_drm.h via_drv.h via.h via_mm.h via_ds.h \
- $(DRMHEADERS) $(DRMTEMPLATES)
-VIASHARED = via_drm.h via_drv.h via.h via_mm.h via_ds.h via_drv.c \
- via_ds.c via_irq.c via_map.c via_mm.c
+ via_3d_reg.h $(DRMHEADERS) $(DRMTEMPLATES)
+VIASHARED = via_drm.h via_drv.h via.h via_mm.h via_ds.h \
+ via_3d_reg.h via_drv.c via_ds.c via_irq.c via_map.c \
+ via_mm.c via_dma.c
MACH64HEADERS = mach64.h mach64_drv.h mach64_drm.h $(DRMHEADERS) \
$(DRMTEMPLATES)
MACH64SHARED = mach64.h mach64_drv.h mach64_drm.h mach64_dma.c \
diff --git a/linux/Makefile.kernel b/linux/Makefile.kernel
index 30b00f62..857c236a 100644
--- a/linux/Makefile.kernel
+++ b/linux/Makefile.kernel
@@ -18,7 +18,7 @@ radeon-objs := radeon_drv.o radeon_cp.o radeon_state.o radeon_mem.o radeon_irq.o
sis-objs := sis_drv.o sis_ds.o sis_mm.o
ffb-objs := ffb_drv.o ffb_context.o
savage-objs := savage_drv.o savage_dma.o
-via-objs := via_irq.o via_drv.o via_ds.o via_map.o via_mm.o
+via-objs := via_irq.o via_drv.o via_ds.o via_map.o via_mm.o via_dma.o
mach64-objs := mach64_drv.o mach64_dma.o mach64_irq.o mach64_state.o
# Kernel version checks
diff --git a/linux/drm_drv.h b/linux/drm_drv.h
index 744fd14c..7f652e43 100644
--- a/linux/drm_drv.h
+++ b/linux/drm_drv.h
@@ -934,6 +934,7 @@ int DRM(release)( struct inode *inode, struct file *filp )
#endif
list_del( &pos->head );
DRM(free)( pos, sizeof(*pos), DRM_MEM_CTXLIST );
+ --dev->ctx_count;
}
}
}