diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2016-11-29 10:45:38 +0100 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2016-11-29 23:34:36 +0100 |
commit | 661a3755610ead153232011d22dc5c3688b24146 (patch) | |
tree | b02861e28123a25d475db5e8d2578ecf9c5f913f /drivers/gpu/drm/drm_plane.c | |
parent | b07c42547b8253c806ae2d03c452b7d894672685 (diff) |
drm: Fix locking cargo-cult in encoder/plane init/cleanup
Encoders&planes can't be hotplugged, we dont need locking for this
since it's all single-threaded driver setup/teardown code. CRTCs
already don't grab locks.
While at it I noticed that plane's are missing the
drm_modeset_lock_fini() call, so add it.
Reviewed-by: Frank Binns <frank.binns@imgtec.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20161129094538.9650-1-daniel.vetter@ffwll.ch
Diffstat (limited to 'drivers/gpu/drm/drm_plane.c')
-rw-r--r-- | drivers/gpu/drm/drm_plane.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/drm_plane.c b/drivers/gpu/drm/drm_plane.c index 419ac313c36f..9147aab182c4 100644 --- a/drivers/gpu/drm/drm_plane.c +++ b/drivers/gpu/drm/drm_plane.c @@ -221,7 +221,8 @@ void drm_plane_cleanup(struct drm_plane *plane) { struct drm_device *dev = plane->dev; - drm_modeset_lock_all(dev); + drm_modeset_lock_fini(&plane->mutex); + kfree(plane->format_types); drm_mode_object_unregister(dev, &plane->base); @@ -236,7 +237,6 @@ void drm_plane_cleanup(struct drm_plane *plane) dev->mode_config.num_total_plane--; if (plane->type == DRM_PLANE_TYPE_OVERLAY) dev->mode_config.num_overlay_plane--; - drm_modeset_unlock_all(dev); WARN_ON(plane->state && !plane->funcs->atomic_destroy_state); if (plane->state && plane->funcs->atomic_destroy_state) |