It should be possible, though perhaps with reduced performance, to support PCI G450 and G200 cards.
Created attachment 2859 [details] [review] Patch This patch adds serveral new ioctls and a new query to get_param query to support PCI MGA cards. Two ioctls were added to implement interrupt based waiting. With this change, the client-side driver no longer needs to map the primary DMA region or the MMIO region. Previously, end-of-frame waiting was done by busy waiting in the client-side driver until one of the MMIO registers (the current DMA pointer) matched a pointer to the end of primary DMA space. By using interrupts, the busy waiting and the extra mappings are removed. A third ioctl was added to bootstrap DMA. This ioctl, which is used by the X-server, moves a *LOT* of code from the X-server into the kernel. This allows the kernel to do whatever needs to be done to setup DMA buffers. The entire process and the locations of the buffers are hidden from user-mode. Additionally, a get_param query was added to differentiate between G4x0 cards and G550 cards. According to Ville Syrjälä, the G4x0 cards and the G550 cards handle anisotropic filtering differently. This seems the most compatible way to let the client-side driver know which card it's own. Doing this very small change now eliminates the need to bump the DRM minor version twice. http://marc.theaimsgroup.com/?l=dri-devel&m=106625815319773&w=2
Created attachment 2860 [details] Output of running the test case
Created attachment 2861 [details] xorg.conf
Two comments to make about the patches that I just posted. First, there is *no* BSD support in the DRM patch. In fact, I'm sure that it won't even build. Changes need to be made in bsd-core to match the changes in linux-core. Second, these are what I would consider to be "beta" quality. They work on one of my test boxes, but they're not 100% tested out. I need to put them through their paces more thoroughly on both my test boxes before I consider them commit-read. My two test systems are: x86 w/G450 AGP (forced to PCI mode using xorg.conf option) and PPC32 w/G450 PCI. I'm especially interested to hear about these patches on G200 PCI and AGP cards.
Created attachment 2886 [details] Canon EOS 20D instruction manual Based on feedback from Eric Anholt, the drm_core_ names were changed to drm_ names. When this caused a collision with the existing ioctl handler function, the ioctl handler function was changed to drm_*_ioctl. This patch also replaces the drm_agp_do_release function with drm_agp_release. drm_agp_release (drm_core_agp_release in the previous patch) is very similar to drm_agp_do_release, and I saw no reason to have both.
I have tested the current set of patches on a G400 AGP on x86. The following table summarizes the results. To test, I started the X-server, ran a GL app (glxgears), quit the server, restarted the server, re-ran the GL app. I have not been able to test this on an actual PCI card yet. The only PCI MGA card that I have is for PowerPC. There seem to be some byte-ordering issues in the MGA DRM. At this point, I think fixing those issues is beyond the scope of this patch. DRM DDX client-side DRI | result ----------------------------+------- old old old | works old old new | works old new old | works old new new | works new old old | works new old new | works new new old | works* new new new | works * This configuration only works if 'Option "OldDmaInit" "true"' appears in the Device section of the xorg.conf. Otherwise any GL app will segfault in the client-side driver.
My patches have been commited to Mesa and DRM CVS. Eric Anholt committed similar patches for *BSD in DRM CVS. Closing.
Mass version move, cvs -> git
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.