diff options
author | Madhav Chauhan <madhav.chauhan@intel.com> | 2018-10-30 13:56:19 +0200 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2018-10-31 13:13:38 +0200 |
commit | 019cec36f3727daa811513221fa3b67bc4acec75 (patch) | |
tree | bd3540d123506af38dbb51c582f96c8778b5a048 /drivers/gpu/drm/i915/icl_dsi.c | |
parent | 9c83ab1bb384ebf72260b995c4c416bd86fd0e26 (diff) | |
download | lwn-019cec36f3727daa811513221fa3b67bc4acec75.tar.gz lwn-019cec36f3727daa811513221fa3b67bc4acec75.zip |
drm/i915/icl: Disable DSI ports
This patch disables both DSI ports by writing to
DDI_BUF_CTL registers as part of DSI encoder disable
sequence.
Signed-off-by: Madhav Chauhan <madhav.chauhan@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/be9a7dc1ed89ad38679c67ff1c1552f0b4604494.1540900289.git.jani.nikula@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/icl_dsi.c')
-rw-r--r-- | drivers/gpu/drm/i915/icl_dsi.c | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/icl_dsi.c b/drivers/gpu/drm/i915/icl_dsi.c index 71092f116170..44696848ffd7 100644 --- a/drivers/gpu/drm/i915/icl_dsi.c +++ b/drivers/gpu/drm/i915/icl_dsi.c @@ -853,6 +853,26 @@ static void gen11_dsi_deconfigure_trancoder(struct intel_encoder *encoder) } } +static void gen11_dsi_disable_port(struct intel_encoder *encoder) +{ + struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); + struct intel_dsi *intel_dsi = enc_to_intel_dsi(&encoder->base); + u32 tmp; + enum port port; + + for_each_dsi_port(port, intel_dsi->ports) { + tmp = I915_READ(DDI_BUF_CTL(port)); + tmp &= ~DDI_BUF_CTL_ENABLE; + I915_WRITE(DDI_BUF_CTL(port), tmp); + + if (wait_for_us((I915_READ(DDI_BUF_CTL(port)) & + DDI_BUF_IS_IDLE), + 8)) + DRM_ERROR("DDI port:%c buffer not idle\n", + port_name(port)); + } +} + static void __attribute__((unused)) gen11_dsi_disable( struct intel_encoder *encoder, const struct intel_crtc_state *old_crtc_state, @@ -872,4 +892,7 @@ static void __attribute__((unused)) gen11_dsi_disable( /* step2h,i,j: deconfig trancoder */ gen11_dsi_deconfigure_trancoder(encoder); + + /* step3: disable port */ + gen11_dsi_disable_port(encoder); } |