diff options
| author | Ben Skeggs <bskeggs@redhat.com> | 2009-05-25 20:35:52 -0400 |
|---|---|---|
| committer | Dave Airlie <airlied@redhat.com> | 2009-06-11 02:15:29 -0400 |
| commit | 2ff2e8a3e1898e692b604424c384f134009dea80 (patch) | |
| tree | 7eab469b77ef1635ea144baaf3202dffc6bd8d51 /drivers/gpu | |
| parent | b798b1fe3b6436275ad1b517a6823d55e3b75c22 (diff) | |
drm: don't associate _DRM_DRIVER maps with a master
A driver will use the _DRM_DRIVER map flag to indicate that it wants
to be responsible for removing the map itself, bypassing the DRM's
automagic cleanup code.
Since the multi-master changes this has been broken, resulting in some
drivers having their registers unmapped before it's finished with them.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu')
| -rw-r--r-- | drivers/gpu/drm/drm_bufs.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/drm_bufs.c b/drivers/gpu/drm/drm_bufs.c index 0411d912d82a..80a257554b30 100644 --- a/drivers/gpu/drm/drm_bufs.c +++ b/drivers/gpu/drm/drm_bufs.c | |||
| @@ -371,7 +371,8 @@ static int drm_addmap_core(struct drm_device * dev, resource_size_t offset, | |||
| 371 | list->user_token = list->hash.key << PAGE_SHIFT; | 371 | list->user_token = list->hash.key << PAGE_SHIFT; |
| 372 | mutex_unlock(&dev->struct_mutex); | 372 | mutex_unlock(&dev->struct_mutex); |
| 373 | 373 | ||
| 374 | list->master = dev->primary->master; | 374 | if (!(map->flags & _DRM_DRIVER)) |
| 375 | list->master = dev->primary->master; | ||
| 375 | *maplist = list; | 376 | *maplist = list; |
| 376 | return 0; | 377 | return 0; |
| 377 | } | 378 | } |
