]> git.baikalelectronics.ru Git - kernel.git/commit
drm: Add DRM_MODESET_LOCK_BEGIN/END helpers
authorSean Paul <seanpaul@chromium.org>
Thu, 29 Nov 2018 15:04:17 +0000 (10:04 -0500)
committerSean Paul <seanpaul@chromium.org>
Thu, 29 Nov 2018 15:48:31 +0000 (10:48 -0500)
commit9a278fc985bc8f653feace04af4b5d77a7e86ad9
tree16af21a531a4bab6930ffabc372044b6d4996c84
parent0698972be043210c251f64ea10503a793a4ab954
drm: Add DRM_MODESET_LOCK_BEGIN/END helpers

This patch adds a couple of helpers to remove the boilerplate involved
in grabbing all of the modeset locks.

I've also converted the obvious cases in drm core to use the helpers.

The only remaining instance of drm_modeset_lock_all_ctx() is in
drm_framebuffer. It's complicated by the state clear that occurs on
deadlock. ATM, there's no way to inject code in the deadlock path with
the helpers, so it's unfit for conversion.

Changes in v2:
- Relocate ret argument to the end of the list (Daniel)
- Incorporate Daniel's doc suggestions (Daniel)

Suggested-by: Daniel Vetter <daniel@ffwll.ch>
Reviewed-by: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Sean Paul <seanpaul@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20181129150423.239081-4-sean@poorly.run
drivers/gpu/drm/drm_atomic_helper.c
drivers/gpu/drm/drm_color_mgmt.c
drivers/gpu/drm/drm_crtc.c
drivers/gpu/drm/drm_modeset_lock.c
drivers/gpu/drm/drm_plane.c
include/drm/drm_modeset_lock.h