diff options
-rw-r--r-- | linux-core/drm_bufs.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/linux-core/drm_bufs.c b/linux-core/drm_bufs.c index a2b79b2c..e9e4a356 100644 --- a/linux-core/drm_bufs.c +++ b/linux-core/drm_bufs.c @@ -56,7 +56,8 @@ static drm_map_list_t *drm_find_matching_map(drm_device_t *dev, list_for_each(list, &dev->maplist->head) { drm_map_list_t *entry = list_entry(list, drm_map_list_t, head); if (entry->map && map->type == entry->map->type && - entry->map->offset == map->offset) { + ((entry->map->offset == map->offset) || + (map->type == _DRM_SHM && map->flags==_DRM_CONTAINS_LOCK))) { return entry; } } @@ -188,8 +189,8 @@ int drm_addmap_core(drm_device_t * dev, unsigned int offset, MTRR_TYPE_WRCOMB, 1); } } - //if (map->type == _DRM_REGISTERS) - map->handle = drm_ioremap(map->offset, map->size, dev); + if (map->type == _DRM_REGISTERS) + map->handle = drm_ioremap(map->offset, map->size, dev); break; case _DRM_SHM: list = drm_find_matching_map(dev, map); |