summaryrefslogtreecommitdiff
path: root/linux-core/drm_memory.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2004-08-30 11:34:51 +0000
committerDave Airlie <airlied@linux.ie>2004-08-30 11:34:51 +0000
commitda6b44849763fac5ccb7d7511128454c6c2a92c7 (patch)
treeeeacf7b240241350c040dc4751f4a4c3d9d52502 /linux-core/drm_memory.h
parent7809efc8c32520e6b25c143ee3276edbf534ed14 (diff)
implement drm_core_check_feature and use it .. looks lots nicer
Diffstat (limited to 'linux-core/drm_memory.h')
-rw-r--r--linux-core/drm_memory.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/linux-core/drm_memory.h b/linux-core/drm_memory.h
index 669bef08..38084ccc 100644
--- a/linux-core/drm_memory.h
+++ b/linux-core/drm_memory.h
@@ -144,7 +144,7 @@ drm_follow_page (void *vaddr)
static inline void *drm_ioremap(unsigned long offset, unsigned long size, drm_device_t *dev)
{
#if __OS_HAS_AGP && defined(VMAP_4_ARGS)
- if ( (dev->driver_features & DRIVER_USE_AGP) && dev->agp && dev->agp->cant_use_aperture) {
+ if ( drm_core_check_feature(dev, DRIVER_USE_AGP) && dev->agp && dev->agp->cant_use_aperture) {
drm_map_t *map = drm_lookup_map(offset, size, dev);
if (map && map->type == _DRM_AGP)
@@ -159,7 +159,7 @@ static inline void *drm_ioremap_nocache(unsigned long offset, unsigned long size
drm_device_t *dev)
{
#if __OS_HAS_AGP&& defined(VMAP_4_ARGS)
- if ( (dev->driver_features & DRIVER_USE_AGP) && dev->agp && dev->agp->cant_use_aperture) {
+ if ( drm_core_check_feature(dev, DRIVER_USE_AGP) && dev->agp && dev->agp->cant_use_aperture) {
drm_map_t *map = drm_lookup_map(offset, size, dev);
if (map && map->type == _DRM_AGP)
@@ -178,7 +178,7 @@ static inline void drm_ioremapfree(void *pt, unsigned long size, drm_device_t *d
* routines for handling mappings in the AGP space. Hopefully this can be done in
* a future revision of the interface...
*/
- if ((dev->driver_features & DRIVER_USE_AGP) && dev->agp && dev->agp->cant_use_aperture
+ if (drm_core_check_feature(dev, DRIVER_USE_AGP) && dev->agp && dev->agp->cant_use_aperture
&& ((unsigned long) pt >= VMALLOC_START && (unsigned long) pt < VMALLOC_END))
{
unsigned long offset;