summaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/drm_stub.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@starflyer.(none)>2005-07-10 17:31:26 +1000
committerDave Airlie <airlied@linux.ie>2005-07-10 17:31:26 +1000
commitcda173806644d2af22ffd9896eed8ef99b97d356 (patch)
tree374ad48818df951a03c59d54ec75d5b19d4a24c3 /drivers/char/drm/drm_stub.c
parentceb9c27aa7d61c70f4c75f017d9fbc9de50034f1 (diff)
downloadlinux-stable-cda173806644d2af22ffd9896eed8ef99b97d356.tar.gz
linux-stable-cda173806644d2af22ffd9896eed8ef99b97d356.tar.bz2
linux-stable-cda173806644d2af22ffd9896eed8ef99b97d356.zip
drm: add test for AGP devices and driver override for it.
Added device_is_agp callback to drm_driver. This function is called by the platform-specific drm_device_is_agp function. Added implementation of this function the the Linux-specific portion of the MGA driver to detect PCI G450 cards. Added code to the Linux-specific portion of the generic DRM layer to not initialize AGP infrastructure if the card is not AGP (this matches what already existed in BSD). Fix up i810/i830 and i915 drivers to always return AGP as they don't always report the capability. Fix the MGA to not report AGP for a card that has an AGP chip behind a PCI bridge. From: Ian Romanick, Dave Airlie, Alan Hourihane Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm/drm_stub.c')
-rw-r--r--drivers/char/drm/drm_stub.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/char/drm/drm_stub.c b/drivers/char/drm/drm_stub.c
index 48829a1a086a..068ca9a8b0b4 100644
--- a/drivers/char/drm/drm_stub.c
+++ b/drivers/char/drm/drm_stub.c
@@ -91,7 +91,8 @@ static int drm_fill_in_dev(drm_device_t *dev, struct pci_dev *pdev, const struct
goto error_out_unreg;
if (drm_core_has_AGP(dev)) {
- dev->agp = drm_agp_init(dev);
+ if (drm_device_is_agp(dev))
+ dev->agp = drm_agp_init(dev);
if (drm_core_check_feature(dev, DRIVER_REQUIRE_AGP) && (dev->agp == NULL)) {
DRM_ERROR( "Cannot initialize the agpgart module.\n" );
retcode = -EINVAL;