]> git.baikalelectronics.ru Git - kernel.git/commit
drm: simplify the locking in the GETCRTC ioctl
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 28 Mar 2017 07:01:45 +0000 (09:01 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 29 Mar 2017 07:51:02 +0000 (09:51 +0200)
commit046a6af8863a9bd5df8afdd247dd89251ed5cf81
tree4de4a71730d09a18737bb1ec6e25fdcabc8369b7
parent4eef6022a84e8a7903500b4c07ea8cb4876138fc
drm: simplify the locking in the GETCRTC ioctl

No need to grab both plane and crtc locks at the same time, we can do
them one after the other. If userspace races it'll get what it
deserves either way.

This removes another user of drm_modeset_lock_crtc. There's only one
left.

v2: Make sure all access to primary->state is properly protected
(Harry).

Cc: Harry Wentland <harry.wentland@amd.com>
Reviewed-by: Harry Wentland <harry.wentland@amd.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170328070145.21520-1-daniel.vetter@ffwll.ch
drivers/gpu/drm/drm_crtc.c
drivers/gpu/drm/i915/intel_display.c