summaryrefslogtreecommitdiff
path: root/bsd-core/drm_agpsupport.c
diff options
context:
space:
mode:
authorIan Romanick <idr@us.ibm.com>2005-05-16 17:37:10 +0000
committerIan Romanick <idr@us.ibm.com>2005-05-16 17:37:10 +0000
commite051cd19c00ed28997ff6fece0d1d4308b171229 (patch)
treeac705c230e9f7a5c1c6dcc5144cc2fc3d6fdbeb3 /bsd-core/drm_agpsupport.c
parentbd72c6990f22381af61f62bffe70619f726d5923 (diff)
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.
Diffstat (limited to 'bsd-core/drm_agpsupport.c')
-rw-r--r--bsd-core/drm_agpsupport.c11
1 files changed, 11 insertions, 0 deletions
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