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)
commit2c77bb29d3985e73f8c780cfd20fdb2f491943ee
tree4de4a71730d09a18737bb1ec6e25fdcabc8369b7
parent043e7fb6e6c3a3fc6d5a3a434ad555e5ff79da3b
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