Bug 3259 - MGA: Add support for PCI cards
Summary: MGA: Add support for PCI cards
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/MGA (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: high enhancement
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 3248
Blocks:
  Show dependency treegraph
 
Reported: 2005-05-10 09:31 UTC by Ian Romanick
Modified: 2009-08-24 12:23 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Ian Romanick 2005-05-10 09:31:00 UTC
It should be possible, though perhaps with reduced performance, to support PCI
G450 and G200 cards.
Comment 1 Ian Romanick 2005-06-09 15:05:56 UTC
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
Comment 2 Ian Romanick 2005-06-09 15:06:37 UTC
Created attachment 2860 [details]
Output of running the test case
Comment 3 Ian Romanick 2005-06-09 15:07:08 UTC
Created attachment 2861 [details]
xorg.conf
Comment 4 Ian Romanick 2005-06-09 15:12:42 UTC
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.
Comment 5 Ian Romanick 2005-06-13 11:25:25 UTC
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.
Comment 6 Ian Romanick 2005-06-13 11:34:39 UTC
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.

Comment 7 Ian Romanick 2005-06-28 15:45:06 UTC
My patches have been commited to Mesa and DRM CVS.  Eric Anholt committed
similar patches for *BSD in DRM CVS.  Closing.
Comment 8 Adam Jackson 2009-08-24 12:23:17 UTC
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.