diff options
author | Ian Romanick <idr@us.ibm.com> | 2005-05-16 17:37:10 +0000 |
---|---|---|
committer | Ian Romanick <idr@us.ibm.com> | 2005-05-16 17:37:10 +0000 |
commit | e051cd19c00ed28997ff6fece0d1d4308b171229 (patch) | |
tree | ac705c230e9f7a5c1c6dcc5144cc2fc3d6fdbeb3 /linux-core/drmP.h | |
parent | bd72c6990f22381af61f62bffe70619f726d5923 (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 'linux-core/drmP.h')
-rw-r--r-- | linux-core/drmP.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/linux-core/drmP.h b/linux-core/drmP.h index b7f4640f..167bef0f 100644 --- a/linux-core/drmP.h +++ b/linux-core/drmP.h @@ -541,6 +541,18 @@ struct drm_driver { int new); int (*kernel_context_switch_unlock) (struct drm_device * dev); int (*vblank_wait) (struct drm_device * dev, unsigned int *sequence); + + /** + * Called by \c drm_device_is_agp. Typically used to determine if a + * card is really attached to AGP or not. + * + * \param dev DRM device handle + * + * \returns true if the card really is attached to AGP, false + * otherwise. + */ + int (*device_is_agp) (struct drm_device * dev); + /* these have to be filled in */ int (*postinit) (struct drm_device *, unsigned long flags); irqreturn_t(*irq_handler) (DRM_IRQ_ARGS); @@ -1016,6 +1028,11 @@ static __inline__ struct drm_map *drm_core_findmap(struct drm_device *dev, static __inline__ int drm_device_is_agp(drm_device_t *dev) { + if ( (dev->driver->device_is_agp != NULL) + && ! (*dev->driver->device_is_agp)( dev ) ) { + return 0; + } + return pci_find_capability(dev->pdev, PCI_CAP_ID_AGP); } |