diff options
Diffstat (limited to 'drivers/char/drm/drmP.h')
-rw-r--r-- | drivers/char/drm/drmP.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/drivers/char/drm/drmP.h b/drivers/char/drm/drmP.h index 8e060a2cc3db..a9b61864feba 100644 --- a/drivers/char/drm/drmP.h +++ b/drivers/char/drm/drmP.h | |||
@@ -586,7 +586,22 @@ struct drm_driver { | |||
586 | int (*kernel_context_switch)(struct drm_device *dev, int old, int new); | 586 | int (*kernel_context_switch)(struct drm_device *dev, int old, int new); |
587 | void (*kernel_context_switch_unlock)(struct drm_device *dev, drm_lock_t *lock); | 587 | void (*kernel_context_switch_unlock)(struct drm_device *dev, drm_lock_t *lock); |
588 | int (*vblank_wait)(struct drm_device *dev, unsigned int *sequence); | 588 | int (*vblank_wait)(struct drm_device *dev, unsigned int *sequence); |
589 | |||
590 | /** | ||
591 | * Called by \c drm_device_is_agp. Typically used to determine if a | ||
592 | * card is really attached to AGP or not. | ||
593 | * | ||
594 | * \param dev DRM device handle | ||
595 | * | ||
596 | * \returns | ||
597 | * One of three values is returned depending on whether or not the | ||
598 | * card is absolutely \b not AGP (return of 0), absolutely \b is AGP | ||
599 | * (return of 1), or may or may not be AGP (return of 2). | ||
600 | */ | ||
601 | int (*device_is_agp) (struct drm_device * dev); | ||
602 | |||
589 | /* these have to be filled in */ | 603 | /* these have to be filled in */ |
604 | |||
590 | int (*postinit)(struct drm_device *, unsigned long flags); | 605 | int (*postinit)(struct drm_device *, unsigned long flags); |
591 | irqreturn_t (*irq_handler)( DRM_IRQ_ARGS ); | 606 | irqreturn_t (*irq_handler)( DRM_IRQ_ARGS ); |
592 | void (*irq_preinstall)(struct drm_device *dev); | 607 | void (*irq_preinstall)(struct drm_device *dev); |
@@ -1041,6 +1056,19 @@ static __inline__ struct drm_map *drm_core_findmap(struct drm_device *dev, unsig | |||
1041 | return NULL; | 1056 | return NULL; |
1042 | } | 1057 | } |
1043 | 1058 | ||
1059 | static __inline__ int drm_device_is_agp(drm_device_t *dev) | ||
1060 | { | ||
1061 | if ( dev->driver->device_is_agp != NULL ) { | ||
1062 | int err = (*dev->driver->device_is_agp)( dev ); | ||
1063 | |||
1064 | if (err != 2) { | ||
1065 | return err; | ||
1066 | } | ||
1067 | } | ||
1068 | |||
1069 | return pci_find_capability(dev->pdev, PCI_CAP_ID_AGP); | ||
1070 | } | ||
1071 | |||
1044 | static __inline__ void drm_core_dropmap(struct drm_map *map) | 1072 | static __inline__ void drm_core_dropmap(struct drm_map *map) |
1045 | { | 1073 | { |
1046 | } | 1074 | } |