From e051cd19c00ed28997ff6fece0d1d4308b171229 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Mon, 16 May 2005 17:37:10 +0000 Subject: 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). Bumped the driver date and the driver patch-level for MGA. This mostly fixes bugzilla #3248. The BSD side still needs an implementation of mga_driver_device_is_agp. --- linux-core/drm_stub.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'linux-core/drm_stub.c') diff --git a/linux-core/drm_stub.c b/linux-core/drm_stub.c index a3cc5667..338996d6 100644 --- a/linux-core/drm_stub.c +++ b/linux-core/drm_stub.c @@ -99,7 +99,8 @@ static int fill_in_dev(drm_device_t * dev, struct pci_dev *pdev, 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"); -- cgit v1.2.3