Skip to content

Commit 2ff2e8a

Browse files
Ben Skeggsairlied
authored andcommitted
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>
1 parent b798b1f commit 2ff2e8a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎drivers/gpu/drm/drm_bufs.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,8 @@ static int drm_addmap_core(struct drm_device * dev, resource_size_t offset,
371371
list->user_token = list->hash.key << PAGE_SHIFT;
372372
mutex_unlock(&dev->struct_mutex);
373373

374-
list->master = dev->primary->master;
374+
if (!(map->flags & _DRM_DRIVER))
375+
list->master = dev->primary->master;
375376
*maplist = list;
376377
return 0;
377378
}

0 commit comments

Comments
 (0)