summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/i915/display/intel_pch_display.c
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2021-10-15 10:16:25 +0300
committerVille Syrjälä <ville.syrjala@linux.intel.com>2021-10-19 09:41:05 +0300
commit718cc87e1669dafe65ddd3720a5526c6d7e1705a (patch)
treeaaa3499065b63138443a3248cbc6599c02b2b7e3 /drivers/gpu/drm/i915/display/intel_pch_display.c
parentd39ef5d5c076377d41c65b69f8452eada2db724d (diff)
downloadlinux-718cc87e1669dafe65ddd3720a5526c6d7e1705a.tar.xz
drm/i915: Introduce lpt_pch_disable()
Let's add lpt_pch_disable() as the counterpart to lpt_pch_enable(). Note that unlike the ilk+ code the fdi_link_train() and fdi_disable() calls are still left directly in intel_crt.c. If we wanted to move those we'd need to add lpt_pch_pre_enable(). But the two fdi direct fdi calls are pretry symmetric so it doesn't seem too bad to just keep them as is. v2: Make lpt_disable_pch_transcoder() static (lkp@intel.com) Cc: Dave Airlie <airlied@redhat.com> Cc: Jani Nikula <jani.nikula@intel.com> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20211015071625.593-10-ville.syrjala@linux.intel.com Reviewed-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/i915/display/intel_pch_display.c')
-rw-r--r--drivers/gpu/drm/i915/display/intel_pch_display.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_pch_display.c b/drivers/gpu/drm/i915/display/intel_pch_display.c
index a4939ac65dfb..a55c4bfacd0d 100644
--- a/drivers/gpu/drm/i915/display/intel_pch_display.c
+++ b/drivers/gpu/drm/i915/display/intel_pch_display.c
@@ -434,7 +434,7 @@ static void lpt_enable_pch_transcoder(struct drm_i915_private *dev_priv,
drm_err(&dev_priv->drm, "Failed to enable PCH transcoder\n");
}
-void lpt_disable_pch_transcoder(struct drm_i915_private *dev_priv)
+static void lpt_disable_pch_transcoder(struct drm_i915_private *dev_priv)
{
u32 val;
@@ -470,6 +470,16 @@ void lpt_pch_enable(struct intel_atomic_state *state,
lpt_enable_pch_transcoder(dev_priv, cpu_transcoder);
}
+void lpt_pch_disable(struct intel_atomic_state *state,
+ struct intel_crtc *crtc)
+{
+ struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
+
+ lpt_disable_pch_transcoder(dev_priv);
+
+ lpt_disable_iclkip(dev_priv);
+}
+
void lpt_pch_get_config(struct intel_crtc_state *crtc_state)
{
struct intel_crtc *crtc = to_intel_crtc(crtc_state->uapi.crtc);