Op 17-09-2019 om 18:37 schreef Manasi Navare: > On Tue, Sep 17, 2019 at 05:04:28PM +0200, Maarten Lankhorst wrote: >> Op 09-09-2019 om 05:43 schreef Manasi Navare: >>> This clears the transcoder port sync bits of the TRANS_DDI_FUNC_CTL2 >>> register during crtc_disable(). >>> >>> Cc: Ville Syrjälä <ville.syrj...@linux.intel.com> >>> Cc: Maarten Lankhorst <maarten.lankho...@linux.intel.com> >>> Cc: Matt Roper <matthew.d.ro...@intel.com> >>> Cc: Jani Nikula <jani.nik...@intel.com> >>> Signed-off-by: Manasi Navare <manasi.d.nav...@intel.com> >>> --- >>> drivers/gpu/drm/i915/display/intel_display.c | 23 ++++++++++++++++++++ >>> 1 file changed, 23 insertions(+) >>> >>> diff --git a/drivers/gpu/drm/i915/display/intel_display.c >>> b/drivers/gpu/drm/i915/display/intel_display.c >>> index 351c90ad7059..07deb0b93f5c 100644 >>> --- a/drivers/gpu/drm/i915/display/intel_display.c >>> +++ b/drivers/gpu/drm/i915/display/intel_display.c >>> @@ -4438,6 +4438,26 @@ static void icl_enable_trans_port_sync(const struct >>> intel_crtc_state *crtc_state >>> trans_ddi_func_ctl2_val); >>> } >>> >>> +static void icl_disable_transcoder_port_sync(const struct intel_crtc_state >>> *old_crtc_state) >>> +{ >>> + struct intel_crtc *crtc = to_intel_crtc(old_crtc_state->base.crtc); >>> + struct drm_i915_private *dev_priv = to_i915(crtc->base.dev); >>> + i915_reg_t reg; >>> + u32 trans_ddi_func_ctl2_val; >>> + >>> + if (old_crtc_state->master_transcoder == INVALID_TRANSCODER) >>> + return; >>> + >>> + DRM_DEBUG_KMS("Disabling Transcoder Port Sync on Slave Transcoder %s\n", >>> + transcoder_name(old_crtc_state->cpu_transcoder)); >>> + >>> + reg = TRANS_DDI_FUNC_CTL2(old_crtc_state->cpu_transcoder); >>> + trans_ddi_func_ctl2_val = I915_READ(reg); >>> + trans_ddi_func_ctl2_val &= ~(PORT_SYNC_MODE_ENABLE | >>> + PORT_SYNC_MODE_MASTER_SELECT_MASK); >>> + I915_WRITE(reg, trans_ddi_func_ctl2_val); >>> +} >>> + >> Would anything break if we just wrote 0 here? > We dont want to accidently reset other bits in the register which are for DSI > and not used currently but > to make this function more future proof, I have avoided writing a 0 > > But if you strongly feel against this, I can switch this to writing 0 > directly.
We overwrite func_ctl2 in enable_port_sync so it makes sense to do the same in disable. :) _______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx