drm: Only take crtc lock in get_gamma ioctl
authorDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 3 Apr 2017 08:32:56 +0000 (10:32 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 5 Apr 2017 07:27:39 +0000 (09:27 +0200)
commit04ee39ba9fff5bf6278328e2da1740001159c4c6
treef324808c625b97a78004dfcda9bbc9cac9a11de2
parenteb8eb02ed850df95ba2224515b95eb311904e992
drm: Only take crtc lock in get_gamma ioctl

We don't call into drivers at all here, this is enough. Also, we can
reduce the critical section a bit to simplify the code.
crtc->gamma_size is set up once at driver load and then invariant, so
also doesn't need any protection.

Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/20170403083304.9083-8-daniel.vetter@ffwll.ch
drivers/gpu/drm/drm_color_mgmt.c