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. --- bsd-core/drm_agpsupport.c | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'bsd-core/drm_agpsupport.c') diff --git a/bsd-core/drm_agpsupport.c b/bsd-core/drm_agpsupport.c index 6d58134a..33fb3f0c 100644 --- a/bsd-core/drm_agpsupport.c +++ b/bsd-core/drm_agpsupport.c @@ -46,6 +46,12 @@ drm_device_is_agp(drm_device_t *dev) u_int32_t status; u_int8_t ptr, next; + + if ( (dev->driver->device_is_agp != NULL) + && ! (*dev->driver->device_is_agp)( dev ) ) { + return 0; + } + /* * Check the CAP_LIST bit of the PCI status register first. */ @@ -71,6 +77,11 @@ drm_device_is_agp(drm_device_t *dev) return 0; #else + if ( (dev->driver->device_is_agp != NULL) + && ! (*dev->driver->device_is_agp)( dev ) ) { + return 0; + } + /* XXX: fill me in for non-FreeBSD */ return 1; #endif -- cgit v1.2.3