summaryrefslogtreecommitdiff
path: root/bsd-core
diff options
context:
space:
mode:
Diffstat (limited to 'bsd-core')
-rw-r--r--bsd-core/drmP.h6
-rw-r--r--bsd-core/drm_agpsupport.c9
-rw-r--r--bsd-core/i915_drv.c1
3 files changed, 11 insertions, 5 deletions
diff --git a/bsd-core/drmP.h b/bsd-core/drmP.h
index 9943a4f6..8d648f65 100644
--- a/bsd-core/drmP.h
+++ b/bsd-core/drmP.h
@@ -644,8 +644,10 @@ struct drm_device {
*
* \param dev DRM device handle
*
- * \returns true if the card really is attached to AGP, false
- * otherwise.
+ * \returns
+ * One of three values is returned depending on whether or not the
+ * card is absolutely \b not AGP (return of 0), absolutely \b is AGP
+ * (return of 1), or may or may not be AGP (return of 2).
*/
int (*device_is_agp) (struct drm_device * dev);
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;
+ }
}
/*
diff --git a/bsd-core/i915_drv.c b/bsd-core/i915_drv.c
index bb674fa6..e2c58c7f 100644
--- a/bsd-core/i915_drv.c
+++ b/bsd-core/i915_drv.c
@@ -48,6 +48,7 @@ static void i915_configure(drm_device_t *dev)
dev->dev_priv_size = 1; /* No dev_priv */
dev->prerelease = i915_driver_prerelease;
dev->pretakedown = i915_driver_pretakedown;
+ dev->device_is_agp = i915_driver_device_is_agp,
dev->irq_preinstall = i915_driver_irq_preinstall;
dev->irq_postinstall = i915_driver_irq_postinstall;
dev->irq_uninstall = i915_driver_irq_uninstall;