Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6c51d1cf authored by Ben Skeggs's avatar Ben Skeggs Committed by Dave Airlie
Browse files

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: default avatarBen Skeggs <bskeggs@redhat.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 93c05f22
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -371,6 +371,7 @@ static int drm_addmap_core(struct drm_device * dev, resource_size_t offset,
	list->user_token = list->hash.key << PAGE_SHIFT;
	mutex_unlock(&dev->struct_mutex);

	if (!(map->flags & _DRM_DRIVER))
		list->master = dev->primary->master;
	*maplist = list;
	return 0;