diff options
author | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2017-09-08 02:00:34 +0300 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2017-09-12 01:25:18 +0300 |
commit | e3702ac9a2c128690b2219eb1282367584a3b7bb (patch) | |
tree | 38e991441ecb79bdf037b83d15c093767c667aed | |
parent | ed63d24b4d19aee649fbec28b7c11e887eff6861 (diff) | |
download | linux-e3702ac9a2c128690b2219eb1282367584a3b7bb.tar.xz |
drm/i915/psr: Add activate vfunc.
Continue on VLV PSR split with vfunc, let's move activate
function there.
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-5-rodrigo.vivi@intel.com
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.h | 1 | ||||
-rw-r--r-- | drivers/gpu/drm/i915/intel_psr.c | 9 |
2 files changed, 4 insertions, 6 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index d24793cdf949..fa279f3cc838 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++ b/drivers/gpu/drm/i915/i915_drv.h @@ -1183,6 +1183,7 @@ struct i915_psr { void (*disable_source)(struct intel_dp *, const struct intel_crtc_state *); + void (*activate)(struct intel_dp *); }; enum intel_pch { diff --git a/drivers/gpu/drm/i915/intel_psr.c b/drivers/gpu/drm/i915/intel_psr.c index 92b3db3aa830..b3c1e601a8b2 100644 --- a/drivers/gpu/drm/i915/intel_psr.c +++ b/drivers/gpu/drm/i915/intel_psr.c @@ -472,12 +472,7 @@ static void intel_psr_activate(struct intel_dp *intel_dp) WARN_ON(dev_priv->psr.active); lockdep_assert_held(&dev_priv->psr.lock); - /* Enable/Re-enable PSR on the host */ - if (HAS_DDI(dev_priv)) - hsw_psr_activate(intel_dp); - else - vlv_psr_activate(intel_dp); - + dev_priv->psr.activate(intel_dp); dev_priv->psr.active = true; } @@ -987,7 +982,9 @@ void intel_psr_init(struct drm_i915_private *dev_priv) if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) { dev_priv->psr.disable_source = vlv_psr_disable; + dev_priv->psr.activate = vlv_psr_activate; } else { dev_priv->psr.disable_source = hsw_psr_disable; + dev_priv->psr.activate = hsw_psr_activate; } } |