]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drm/i915: vlv: check port power domain instead of only D0 for eDP VDD on
authorImre Deak <imre.deak@intel.com>
Mon, 14 Apr 2014 17:24:33 +0000 (20:24 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 25 Apr 2014 13:39:15 +0000 (15:39 +0200)
Some platforms need additional power domains to be on in addition to the
device D0 state to access the panel registers.

Suggested by Daniel.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=76987
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_dp.c

index c4b12e4b3b65de58c1789eee9138315e5507e1c0..9798defc7e8f9b541009b589dafe203a513a0e03 100644 (file)
@@ -313,8 +313,12 @@ static bool edp_have_panel_vdd(struct intel_dp *intel_dp)
 {
        struct drm_device *dev = intel_dp_to_dev(intel_dp);
        struct drm_i915_private *dev_priv = dev->dev_private;
+       struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
+       struct intel_encoder *intel_encoder = &intel_dig_port->base;
+       enum intel_display_power_domain power_domain;
 
-       return !dev_priv->pm.suspended &&
+       power_domain = intel_display_port_power_domain(intel_encoder);
+       return intel_display_power_enabled(dev_priv, power_domain) &&
               (I915_READ(_pp_ctrl_reg(intel_dp)) & EDP_FORCE_VDD) != 0;
 }