diff options
author | Rodrigo Vivi <rodrigo.vivi@gmail.com> | 2014-09-16 19:19:05 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-09-24 04:36:31 -0400 |
commit | ba80f4d4266b2c804a2dd6deec6e2df32cb033ce (patch) | |
tree | 4631040615cba361d3c5ab31509b93f17994ec97 | |
parent | 9adccc6063d1cf6ba38a5a26b87001554105be18 (diff) |
drm/i915: PSR: organize setup function.
psr_enabled is already by itself a setup once so let's put the W/As there and
rename old setup once to setup_vsc.
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
-rw-r--r-- | drivers/gpu/drm/i915/intel_dp.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index 59754451ae50..e0066c03e7f1 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c | |||
@@ -1991,10 +1991,8 @@ static void intel_edp_psr_write_vsc(struct intel_dp *intel_dp, | |||
1991 | POSTING_READ(ctl_reg); | 1991 | POSTING_READ(ctl_reg); |
1992 | } | 1992 | } |
1993 | 1993 | ||
1994 | static void intel_edp_psr_setup(struct intel_dp *intel_dp) | 1994 | static void intel_edp_psr_setup_vsc(struct intel_dp *intel_dp) |
1995 | { | 1995 | { |
1996 | struct drm_device *dev = intel_dp_to_dev(intel_dp); | ||
1997 | struct drm_i915_private *dev_priv = dev->dev_private; | ||
1998 | struct edp_vsc_psr psr_vsc; | 1996 | struct edp_vsc_psr psr_vsc; |
1999 | 1997 | ||
2000 | /* Prepare VSC packet as per EDP 1.3 spec, Table 3.10 */ | 1998 | /* Prepare VSC packet as per EDP 1.3 spec, Table 3.10 */ |
@@ -2004,10 +2002,6 @@ static void intel_edp_psr_setup(struct intel_dp *intel_dp) | |||
2004 | psr_vsc.sdp_header.HB2 = 0x2; | 2002 | psr_vsc.sdp_header.HB2 = 0x2; |
2005 | psr_vsc.sdp_header.HB3 = 0x8; | 2003 | psr_vsc.sdp_header.HB3 = 0x8; |
2006 | intel_edp_psr_write_vsc(intel_dp, &psr_vsc); | 2004 | intel_edp_psr_write_vsc(intel_dp, &psr_vsc); |
2007 | |||
2008 | /* Avoid continuous PSR exit by masking memup and hpd */ | ||
2009 | I915_WRITE(EDP_PSR_DEBUG_CTL(dev), EDP_PSR_DEBUG_MASK_MEMUP | | ||
2010 | EDP_PSR_DEBUG_MASK_HPD | EDP_PSR_DEBUG_MASK_LPSP); | ||
2011 | } | 2005 | } |
2012 | 2006 | ||
2013 | static void intel_edp_psr_enable_sink(struct intel_dp *intel_dp) | 2007 | static void intel_edp_psr_enable_sink(struct intel_dp *intel_dp) |
@@ -2160,8 +2154,11 @@ void intel_edp_psr_enable(struct intel_dp *intel_dp) | |||
2160 | 2154 | ||
2161 | dev_priv->psr.busy_frontbuffer_bits = 0; | 2155 | dev_priv->psr.busy_frontbuffer_bits = 0; |
2162 | 2156 | ||
2163 | /* Setup PSR once */ | 2157 | intel_edp_psr_setup_vsc(intel_dp); |
2164 | intel_edp_psr_setup(intel_dp); | 2158 | |
2159 | /* Avoid continuous PSR exit by masking memup and hpd */ | ||
2160 | I915_WRITE(EDP_PSR_DEBUG_CTL(dev), EDP_PSR_DEBUG_MASK_MEMUP | | ||
2161 | EDP_PSR_DEBUG_MASK_HPD | EDP_PSR_DEBUG_MASK_LPSP); | ||
2165 | 2162 | ||
2166 | if (intel_edp_psr_match_conditions(intel_dp)) | 2163 | if (intel_edp_psr_match_conditions(intel_dp)) |
2167 | dev_priv->psr.enabled = intel_dp; | 2164 | dev_priv->psr.enabled = intel_dp; |