diff options
author | Imre Deak <imre.deak@intel.com> | 2016-11-21 21:15:05 +0200 |
---|---|---|
committer | Imre Deak <imre.deak@intel.com> | 2016-11-23 13:31:55 +0200 |
commit | dd75f6dd2e7d5de544e8aa8b75d1e50308cd8561 (patch) | |
tree | 93d90d1c01034a5d32e3c1df7759408946a8c3a6 /drivers/gpu/drm/i915/intel_dp.c | |
parent | f2b667b658f998d4bba12ca0204c01f34fdb0321 (diff) | |
download | lwn-dd75f6dd2e7d5de544e8aa8b75d1e50308cd8561.tar.gz lwn-dd75f6dd2e7d5de544e8aa8b75d1e50308cd8561.zip |
drm/i915/lspcon: Add dp_to_lspcon helper()
We need to get to LSPCON in the next patch, so factor out the helper for
it. While at it also remove the redundant GEN9 check.
Cc: Shashank Sharma <shashank.sharma@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
Reviewed-by: Shashank Sharma <shashank.sharma@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1479755707-29596-3-git-send-email-imre.deak@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/intel_dp.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_dp.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 90283edcafba..16c19d789c66 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c @@ -4753,14 +4753,13 @@ static void intel_edp_panel_vdd_sanitize(struct intel_dp *intel_dp) void intel_dp_encoder_reset(struct drm_encoder *encoder) { struct drm_i915_private *dev_priv = to_i915(encoder->dev); - struct intel_digital_port *intel_dig_port = enc_to_dig_port(encoder); - struct intel_lspcon *lspcon = &intel_dig_port->lspcon; - struct intel_dp *intel_dp = &intel_dig_port->dp; + struct intel_dp *intel_dp = enc_to_intel_dp(encoder); + struct intel_lspcon *lspcon = dp_to_lspcon(intel_dp); if (!HAS_DDI(dev_priv)) intel_dp->DP = I915_READ(intel_dp->output_reg); - if (IS_GEN9(dev_priv) && lspcon->active) + if (lspcon->active) lspcon_resume(lspcon); if (to_intel_encoder(encoder)->type != INTEL_OUTPUT_EDP) |