All of lore.kernel.org
 help / color / mirror / Atom feed
From: Manasi Navare <manasi.d.navare@intel.com>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Jani Nikula <jani.nikula@intel.com>, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 5/6] drm/i915/display/icl: Disable transcoder port sync as part of crtc_disable() sequence
Date: Tue, 17 Sep 2019 09:37:07 -0700	[thread overview]
Message-ID: <20190917163707.GA29180@intel.com> (raw)
In-Reply-To: <156576de-c2a0-bbdc-7434-209df041e97c@linux.intel.com>

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.syrjala@linux.intel.com>
> > Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> > Cc: Matt Roper <matthew.d.roper@intel.com>
> > Cc: Jani Nikula <jani.nikula@intel.com>
> > Signed-off-by: Manasi Navare <manasi.d.navare@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.

Manasi

> >  static void intel_update_pipe_config(const struct intel_crtc_state *old_crtc_state,
> >  				     const struct intel_crtc_state *new_crtc_state)
> >  {
> > @@ -6687,6 +6707,9 @@ static void haswell_crtc_disable(struct intel_crtc_state *old_crtc_state,
> >  	if (intel_crtc_has_type(old_crtc_state, INTEL_OUTPUT_DP_MST))
> >  		intel_ddi_set_vc_payload_alloc(old_crtc_state, false);
> >  
> > +	if (INTEL_GEN(dev_priv) >= 11)
> > +		icl_disable_transcoder_port_sync(old_crtc_state);
> > +
> >  	if (!transcoder_is_dsi(cpu_transcoder))
> >  		intel_ddi_disable_transcoder_func(old_crtc_state);
> >  
> 
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-09-17 16:35 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-09  3:43 [PATCH 0/6] Remaining patches to enable Transcoder Port Sync for tiled displays Manasi Navare
2019-09-09  3:43 ` [PATCH 1/6] drm/i915/display/icl: Save Master transcoder in slave's crtc_state for Transcoder Port Sync Manasi Navare
2019-09-17 14:51   ` Maarten Lankhorst
2019-09-09  3:43 ` [PATCH 2/6] drm/i915/display/icl: Enable TRANSCODER PORT SYNC for tiled displays across separate ports Manasi Navare
2019-09-17 14:52   ` Maarten Lankhorst
2019-09-17 14:52   ` Maarten Lankhorst
2019-09-17 16:55     ` Manasi Navare
2019-09-09  3:43 ` [PATCH 3/6] drm/i915/display/icl: HW state readout for transcoder port sync config Manasi Navare
2019-09-17 14:53   ` Maarten Lankhorst
2019-09-09  3:43 ` [PATCH 4/6] drm/i915/display/icl: Enable master-slaves in trans port sync Manasi Navare
2019-09-09 15:52   ` [PATCH v2 " Manasi Navare
2019-09-17 15:01     ` Maarten Lankhorst
2019-09-09  3:43 ` [PATCH 5/6] drm/i915/display/icl: Disable transcoder port sync as part of crtc_disable() sequence Manasi Navare
2019-09-17 15:04   ` Maarten Lankhorst
2019-09-17 16:37     ` Manasi Navare [this message]
2019-09-18  8:51       ` Maarten Lankhorst
2019-09-18 15:16         ` Manasi Navare
2019-09-09  3:43 ` [PATCH 6/6] drm/i915/display/icl: In port sync mode disable slaves first then master Manasi Navare
2019-09-09 15:52   ` [PATCH v2 " Manasi Navare
2019-09-17 15:05     ` Maarten Lankhorst
2019-09-09  4:10 ` ✗ Fi.CI.CHECKPATCH: warning for Remaining patches to enable Transcoder Port Sync for tiled displays Patchwork
2019-09-09  4:11 ` ✗ Fi.CI.SPARSE: " Patchwork
2019-09-09 19:44 ` ✗ Fi.CI.SPARSE: warning for Remaining patches to enable Transcoder Port Sync for tiled displays (rev3) Patchwork
2019-09-09 20:06 ` ✗ Fi.CI.BAT: failure " Patchwork
2019-09-10  9:29 ` [PATCH 0/6] Remaining patches to enable Transcoder Port Sync for tiled displays Jani Nikula
2019-09-10 18:07   ` Manasi Navare
2019-09-10 21:19     ` Manasi Navare
2019-09-11  9:08       ` Jani Nikula
2019-09-11 16:27         ` Manasi Navare
2019-09-12  6:42           ` Jani Nikula
2019-09-12 18:35             ` Manasi Navare

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190917163707.GA29180@intel.com \
    --to=manasi.d.navare@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    --cc=maarten.lankhorst@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.