diff options
author | Imre Deak <imre.deak@intel.com> | 2014-03-05 09:20:54 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-03-07 16:36:52 -0500 |
commit | 6d129beac7099bddad368b6a02e8e0a67f59e9b8 (patch) | |
tree | 6df29848071794a055452606f44768b07e048e1e /drivers/gpu/drm/i915/intel_dp.c | |
parent | 671dedd212cdb5e64ce95b5445f1587556331ea5 (diff) |
drm/i915: check port power domain when reading the encoder hw state
Since the encoder is tied to its port, we need to make sure the power
domain for that port is on before reading out the encoder HW state.
Note that this also covers also all connector get_hw_state handlers,
since all those just call the corresponding encoder get_hw_state
handler, which checks - after this change - for all power domains
the connector needs.
v2:
- no change
v3:
- push down the power domain checks into the specific encoder
get_hw_state handlers (Daniel)
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_dp.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_dp.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 56edb0975db6..7584348b7e89 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c | |||
@@ -1479,7 +1479,14 @@ static bool intel_dp_get_hw_state(struct intel_encoder *encoder, | |||
1479 | enum port port = dp_to_dig_port(intel_dp)->port; | 1479 | enum port port = dp_to_dig_port(intel_dp)->port; |
1480 | struct drm_device *dev = encoder->base.dev; | 1480 | struct drm_device *dev = encoder->base.dev; |
1481 | struct drm_i915_private *dev_priv = dev->dev_private; | 1481 | struct drm_i915_private *dev_priv = dev->dev_private; |
1482 | u32 tmp = I915_READ(intel_dp->output_reg); | 1482 | enum intel_display_power_domain power_domain; |
1483 | u32 tmp; | ||
1484 | |||
1485 | power_domain = intel_display_port_power_domain(encoder); | ||
1486 | if (!intel_display_power_enabled(dev_priv, power_domain)) | ||
1487 | return false; | ||
1488 | |||
1489 | tmp = I915_READ(intel_dp->output_reg); | ||
1483 | 1490 | ||
1484 | if (!(tmp & DP_PORT_EN)) | 1491 | if (!(tmp & DP_PORT_EN)) |
1485 | return false; | 1492 | return false; |