OSDN Git Service

Bug 6242: [mach64] Use private DMA buffers, part #4.
authorGeorge Sapountzis <gsap7@yahoo.gr>
Mon, 2 Oct 2006 03:13:38 +0000 (06:13 +0300)
committerGeorge Sapountzis <gsap7@yahoo.gr>
Mon, 2 Oct 2006 19:47:26 +0000 (22:47 +0300)
commitc9e3aa961eb90265ec024ff57013786e4d47d0e7
tree459349e8afc6ece0ed0f383417ca06fb279ddc7f
parentf3deef730d52c94ce21ada7e4ceb63aa28a8601b
Bug 6242: [mach64] Use private DMA buffers, part #4.

mach64_state.c: convert the DRM_MACH64_BLIT ioctl to submit a pointer to
user-space memory rather than a DMA buffer index, similar to DRM_MACH64_VERTEX.

This change allows the DDX to map the DMA buffers read-only and eliminate a
security problem where a client can alter the contents of the DMA buffer after
submission to the DRM.

This change also affects the DRI/DRM interface. Performace-wise, it basically
affects PCI mode where I get a ~12% speedup for some Mesa demos I tested.
This is mainly due to eliminating an ioctl for allocating the DMA buffer.

mach64_dma.c: move the responsibility for allocating memory for the DMA ring
in PCI mode to the DDX.

This change affects the DDX/DRM interface and unifies a couple of PCI/AGP code
paths for ring memory in the DRM.

Bump the mach64 DRM version major and date.
shared-core/mach64_dma.c
shared-core/mach64_drm.h
shared-core/mach64_drv.h
shared-core/mach64_state.c