]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Protect dev_priv->atomic_cdclk_freq with all the crtc locks
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 14 Nov 2016 16:35:10 +0000 (18:35 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 23 Nov 2016 20:20:40 +0000 (22:20 +0200)
commit50d5d6b45c4c3664076ac24b2bdca754378843c0
treebe41dedb77ff3ee9c8d1f08fb515411ec33f1572
parent2bff82d03cdac13d7d7b49df47b0caebcff719a0
drm/i915: Protect dev_priv->atomic_cdclk_freq with all the crtc locks

A modeset on one pipe can update dev_priv->atomic_cdclk_freq without
actually touching the hardware, in which case we won't force a modeset
on all the pipes, and thus won't lock any of the other pipes either.
That means a parallel plane update on another pipe could be looking at
a stale dev_priv->atomic_cdcdlk_freq and thus fail to notice when the
plane configuration is invalid, or potentially reject a valid update.

To overcome this we must protect writes to atomic_cdclk_freq with
all the crtc locks, and thus for reads any single crtc lock will
be sufficient protection.

Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1479141311-11904-3-git-send-email-ville.syrjala@linux.intel.com
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/intel_display.c