diff options
author | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2017-09-08 02:00:32 +0300 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2017-09-12 01:25:05 +0300 |
commit | 424644c2504299e00b450328be9e3c5a12e9c9f9 (patch) | |
tree | cb3df31350665656ca51121d34e5371624fe8037 /drivers/gpu/drm/i915/intel_psr.c | |
parent | 0f328da611953d078e86ea250eaeeb840dd7f5d0 (diff) | |
download | linux-424644c2504299e00b450328be9e3c5a12e9c9f9.tar.xz |
drm/i915/psr: vfunc for disabling source.
VLV/CHV has a total different PSR implementation than the
other platforms, so let's start moving that to vfuncs.
Let's start with disable_src one.
v2: Rebased on top of commit d2419ffc10e4 ("drm/i915: Plumb
crtc_state to PSR enable/disable")
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Cc: Vathsala Nagaraju <vathsala.nagaraju@intel.com>
Signed-off-by: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170907230041.22978-3-rodrigo.vivi@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/intel_psr.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_psr.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/intel_psr.c b/drivers/gpu/drm/i915/intel_psr.c index 60a1ece6d4c9..1d2b52e6a6d4 100644 --- a/drivers/gpu/drm/i915/intel_psr.c +++ b/drivers/gpu/drm/i915/intel_psr.c @@ -685,11 +685,7 @@ void intel_psr_disable(struct intel_dp *intel_dp, return; } - /* Disable PSR on Source */ - if (HAS_DDI(dev_priv)) - hsw_psr_disable(intel_dp, old_crtc_state); - else - vlv_psr_disable(intel_dp, old_crtc_state); + dev_priv->psr.disable_source(intel_dp, old_crtc_state); /* Disable PSR on Sink */ drm_dp_dpcd_writeb(&intel_dp->aux, DP_PSR_EN_CFG, 0); @@ -987,4 +983,10 @@ void intel_psr_init(struct drm_i915_private *dev_priv) INIT_DELAYED_WORK(&dev_priv->psr.work, intel_psr_work); mutex_init(&dev_priv->psr.lock); + + if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) { + dev_priv->psr.disable_source = vlv_psr_disable; + } else { + dev_priv->psr.disable_source = hsw_psr_disable; + } } |