Commit 2a5db87f authored by Rodrigo Vivi's avatar Rodrigo Vivi

drm/i915/psr: Add setup VSC vfunc.

Continue on VLV PSR split with vfunc, let's also create
one for setting up VSC.

v2: Rebased on top of commit d2419ffc ("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: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: default avatarDhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170907230041.22978-10-rodrigo.vivi@intel.com
parent 29d1efe0
...@@ -1184,6 +1184,7 @@ struct i915_psr { ...@@ -1184,6 +1184,7 @@ struct i915_psr {
void (*disable_source)(struct intel_dp *, void (*disable_source)(struct intel_dp *,
const struct intel_crtc_state *); const struct intel_crtc_state *);
void (*activate)(struct intel_dp *); void (*activate)(struct intel_dp *);
void (*setup_vsc)(struct intel_dp *, const struct intel_crtc_state *);
}; };
enum intel_pch { enum intel_pch {
......
...@@ -540,18 +540,15 @@ void intel_psr_enable(struct intel_dp *intel_dp, ...@@ -540,18 +540,15 @@ void intel_psr_enable(struct intel_dp *intel_dp,
dev_priv->psr.busy_frontbuffer_bits = 0; dev_priv->psr.busy_frontbuffer_bits = 0;
if (HAS_DDI(dev_priv)) { dev_priv->psr.setup_vsc(intel_dp, crtc_state);
hsw_psr_setup_vsc(intel_dp, crtc_state);
if (HAS_DDI(dev_priv)) {
/* Enable PSR on the panel */ /* Enable PSR on the panel */
hsw_psr_enable_sink(intel_dp); hsw_psr_enable_sink(intel_dp);
hsw_psr_enable_source(intel_dp, crtc_state); hsw_psr_enable_source(intel_dp, crtc_state);
} else { } else {
vlv_psr_setup_vsc(intel_dp, crtc_state);
/* Enable PSR on the panel */ /* Enable PSR on the panel */
vlv_psr_enable_sink(intel_dp); vlv_psr_enable_sink(intel_dp);
...@@ -983,8 +980,10 @@ void intel_psr_init(struct drm_i915_private *dev_priv) ...@@ -983,8 +980,10 @@ void intel_psr_init(struct drm_i915_private *dev_priv)
if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) { if (IS_VALLEYVIEW(dev_priv) || IS_CHERRYVIEW(dev_priv)) {
dev_priv->psr.disable_source = vlv_psr_disable; dev_priv->psr.disable_source = vlv_psr_disable;
dev_priv->psr.activate = vlv_psr_activate; dev_priv->psr.activate = vlv_psr_activate;
dev_priv->psr.setup_vsc = vlv_psr_setup_vsc;
} else { } else {
dev_priv->psr.disable_source = hsw_psr_disable; dev_priv->psr.disable_source = hsw_psr_disable;
dev_priv->psr.activate = hsw_psr_activate; dev_priv->psr.activate = hsw_psr_activate;
dev_priv->psr.setup_vsc = hsw_psr_setup_vsc;
} }
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment