From 4a84416c458027462ee6112a5fa442415597f6c2 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Fri, 27 May 2005 23:42:11 +0000 Subject: Modify drm_driver::device_is_agp to return a tri-state value to indicate that a device absolutely is, absolutely is not, or may or may not be AGP. Modify the i915 DRM to use this to force all i9x5 devices to be "AGP" (even the PCI-e devices). Reported by: Lukas Hejtmanek --- bsd-core/drm_agpsupport.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'bsd-core/drm_agpsupport.c') diff --git a/bsd-core/drm_agpsupport.c b/bsd-core/drm_agpsupport.c index 33fb3f0c..540cb402 100644 --- a/bsd-core/drm_agpsupport.c +++ b/bsd-core/drm_agpsupport.c @@ -47,9 +47,12 @@ drm_device_is_agp(drm_device_t *dev) u_int8_t ptr, next; - if ( (dev->driver->device_is_agp != NULL) - && ! (*dev->driver->device_is_agp)( dev ) ) { - return 0; + if ( dev->driver->device_is_agp != NULL ) { + int err = (*dev->driver->device_is_agp)( dev ); + + if (err != 2) { + return err; + } } /* -- cgit v1.2.3