]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915/psr: Add enable_sink vfunc.
authorRodrigo Vivi <rodrigo.vivi@intel.com>
Thu, 7 Sep 2017 23:00:40 +0000 (16:00 -0700)
committerRodrigo Vivi <rodrigo.vivi@intel.com>
Mon, 11 Sep 2017 22:26:01 +0000 (15:26 -0700)
Continue on VLV PSR split with vfunc, let's also create one
for enabling sink.

v2: Fix typo on commit message (DK).

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-11-rodrigo.vivi@intel.com
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/intel_psr.c

index 54786bc732632af7374df70207b3c17c834ebaab..4efc2b591f6f2b1d1454a59495f2048c6798a2bb 100644 (file)
@@ -1183,6 +1183,7 @@ struct i915_psr {
 
        void (*disable_source)(struct intel_dp *,
                               const struct intel_crtc_state *);
+       void (*enable_sink)(struct intel_dp *);
        void (*activate)(struct intel_dp *);
        void (*setup_vsc)(struct intel_dp *, const struct intel_crtc_state *);
 };
index 2516d2a50022eacca53583e8cf4f216cd9306b31..02c32cc38648c8edf6c089d2c45453918f66b9d1 100644 (file)
@@ -541,17 +541,12 @@ void intel_psr_enable(struct intel_dp *intel_dp,
        dev_priv->psr.busy_frontbuffer_bits = 0;
 
        dev_priv->psr.setup_vsc(intel_dp, crtc_state);
+       dev_priv->psr.enable_sink(intel_dp);
 
        if (HAS_DDI(dev_priv)) {
-               /* Enable PSR on the panel */
-               hsw_psr_enable_sink(intel_dp);
-
                hsw_psr_enable_source(intel_dp, crtc_state);
 
        } else {
-               /* Enable PSR on the panel */
-               vlv_psr_enable_sink(intel_dp);
-
                vlv_psr_enable_source(intel_dp, crtc_state);
        }
 
@@ -979,10 +974,12 @@ 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.enable_sink = vlv_psr_enable_sink;
                dev_priv->psr.activate = vlv_psr_activate;
                dev_priv->psr.setup_vsc = vlv_psr_setup_vsc;
        } else {
                dev_priv->psr.disable_source = hsw_psr_disable;
+               dev_priv->psr.enable_sink = hsw_psr_enable_sink;
                dev_priv->psr.activate = hsw_psr_activate;
                dev_priv->psr.setup_vsc = hsw_psr_setup_vsc;
        }