Bugzilla – Bug 1950
AGP Ring-buffer support for the Unichrome driver.
Last modified: 2009-08-24 12:22:53 UTC
The Unichrome (via) DRM module implements an AGP ring buffer and the Unichrome
Mesa driver is currently not using it, but instead relies on its own programming
of the DMA engine. This is not good from a security point of view, since the
register space of the Unichrome chip must be exported read-write.
This patch makes the Unichrome driver use the AGP ring buffer in the DRM or fall
back to a PCI MMIO mechanism also in DRM if AGP is not enabled.
Before this patch is commited, DRM must implement a more versatile command
buffer verifier. The current one does not let any 3D commands through, so it
must be disabled for this code to work. This code will help people debug such a
The patch also removes the VQ disabling from the driver. It uses direct video
register writes and it apparently is there for Tuxracer when the pci path is
used, but this seems to work fine on my test setup.
Created attachment 1410 [details] [review]
Patch to submit 3D commands through DRM mechanisms.
The patch. It requires via drm driver version 2.1.0 or above and that the
command verifyier in drm is manually removed. (File shared/via_dma.c or
Created attachment 1538 [details] [review]
New version of the patch with additional functionality.
New version of the patch. This one is using the functionality just recenctly
commited to DRM and since the command verifier now is implemented. This patch
should be fully OK to apply. In addition to the DRM command buffer
functionality, it fixes
1. A locking bug that caused the driver not to keep up with drawable changes.
2. Blitter problems caused by the blitter losing context when the command
buffer is executed through AGP.
3. AGP textures are reenabled.
4. Check for texture memory allocation failure.
The driver avoids filling the ring-buffer by checking the command regulator
lag. Presently this is allowed to be only 50kB. This is tuneable, but larger
values seem to make applications unresponsive while at the same time providing
little performance gain.
With Miniglx, the driver will use the PCI path until someone finds time to
patch the Miniglx server to initialize the AGP ring-buffer.
This has been comitted now in a slightly modified variant.
Mass version move, cvs -> git