drm/i915: Add locking around chv_phy_control_init()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Wed, 8 Jul 2015 20:45:51 +0000 (23:45 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 26 Aug 2015 08:22:37 +0000 (10:22 +0200)
dev_priv->chv_phy_control is protected by the power_domains->lock
elsewhere, so also grab it when initializing chv_phy_control.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Deepak S <deepak.s@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_runtime_pm.c

index 821644d1b544eb618e57db8196014768ebe9d7b8..974c4cbf3fdb98af6c3b1875e59e9e5be22e5377 100644 (file)
@@ -1685,7 +1685,9 @@ void intel_power_domains_init_hw(struct drm_i915_private *dev_priv)
        power_domains->initializing = true;
 
        if (IS_CHERRYVIEW(dev)) {
+               mutex_lock(&power_domains->lock);
                chv_phy_control_init(dev_priv);
+               mutex_unlock(&power_domains->lock);
        } else if (IS_VALLEYVIEW(dev)) {
                mutex_lock(&power_domains->lock);
                vlv_cmnlane_wa(dev_priv);