]> 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)
commit907753bb6a5e46ad9a0ee9c7df96f30f18aa1401
tree4de4a71730d09a18737bb1ec6e25fdcabc8369b7
parenta0a0e2d2b0daecf47adc0b6ff768e88fd2bbb655
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