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: [CI 3/6] drm/i915/display/icl: HW state readout for transcoder port sync config
Date: Wed, 18 Sep 2019 12:12:26 -0700	[thread overview]
Message-ID: <20190918191226.GC31062@intel.com> (raw)
In-Reply-To: <6c3d04e0-2729-2704-5817-16e6f052ac4f@linux.intel.com>

On Wed, Sep 18, 2019 at 09:57:29AM +0200, Maarten Lankhorst wrote:
> Op 18-09-2019 om 02:33 schreef Manasi Navare:
> > After the state is committed, we readout the HW registers and compare
> > the HW state with the SW state that we just committed.
> > For Transcdoer port sync, we add master_transcoder and the
> > salves bitmask to the crtc_state, hence we need to read those during
> > the HW state readout to avoid pipe state mismatch.
> >
> > v2:
> > * Add Transcoder_D and MISSING_CASE (Maarten)
> >
> > 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>
> > Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
> > ---
> >  drivers/gpu/drm/i915/display/intel_display.c | 49 ++++++++++++++++++++
> >  1 file changed, 49 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
> > index b0f76e47f5a6..bea3f631ad36 100644
> > --- a/drivers/gpu/drm/i915/display/intel_display.c
> > +++ b/drivers/gpu/drm/i915/display/intel_display.c
> > @@ -10439,6 +10439,52 @@ static void haswell_get_ddi_port_state(struct intel_crtc *crtc,
> >  	}
> >  }
> >  
> > +static void icelake_get_trans_port_sync_config(struct intel_crtc *crtc,
> > +					       struct intel_crtc_state *pipe_config)
> > +{
> > +	struct drm_device *dev = crtc->base.dev;
> > +	struct drm_i915_private *dev_priv = to_i915(dev);
> > +	u32 trans_port_sync, transcoders, master_select;
> > +	enum transcoder cpu_transcoder;
> > +
> > +	trans_port_sync = I915_READ(TRANS_DDI_FUNC_CTL2(pipe_config->cpu_transcoder));
> > +	if (trans_port_sync & PORT_SYNC_MODE_ENABLE) {
> > +		master_select = trans_port_sync &
> > +			PORT_SYNC_MODE_MASTER_SELECT_MASK;
> > +		switch (master_select) {
> > +		case 1:
> > +			pipe_config->master_transcoder = TRANSCODER_A;
> > +			break;
> > +		case 2:
> > +			pipe_config->master_transcoder = TRANSCODER_B;
> > +			break;
> > +		case 3:
> > +			pipe_config->master_transcoder = TRANSCODER_C;
> > +			break;
> > +		case 4:
> > +			pipe_config->master_transcoder = TRANSCODER_D;
> > +			break;
> > +		default:
> > +			MISSING_CASE(master_select);
> > +		}
> > +
> > +		pipe_config->sync_mode_slaves_mask = 0;
> > +	} else {
> > +		pipe_config->master_transcoder = INVALID_TRANSCODER;
> > +
> > +		transcoders = BIT(TRANSCODER_EDP) |
> > +			BIT(TRANSCODER_A) |
> > +			BIT(TRANSCODER_B) |
> > +			BIT(TRANSCODER_C);
> ^Missed one spot for transcoder D.. also EDP is still here?

No EDP should be out and TRANS D added, will make that change, sorry about that

Regards
Manasi

> > +		for_each_cpu_transcoder_masked(dev_priv, cpu_transcoder, transcoders) {
> > +			trans_port_sync = I915_READ(TRANS_DDI_FUNC_CTL2(cpu_transcoder));
> > +
> > +			if (trans_port_sync & PORT_SYNC_MODE_ENABLE)
> > +				pipe_config->sync_mode_slaves_mask |= BIT(cpu_transcoder);
> > +		}
> > +	}
> > +}
> > +
> >  static bool haswell_get_pipe_config(struct intel_crtc *crtc,
> >  				    struct intel_crtc_state *pipe_config)
> >  {
> > @@ -10535,6 +10581,9 @@ static bool haswell_get_pipe_config(struct intel_crtc *crtc,
> >  		pipe_config->pixel_multiplier = 1;
> >  	}
> >  
> > +	if (INTEL_GEN(dev_priv) >= 11)
> > +		icelake_get_trans_port_sync_config(crtc, pipe_config);
> > +
> >  out:
> >  	for_each_power_domain(power_domain, power_domain_mask)
> >  		intel_display_power_put(dev_priv,
> 
> 
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-09-18 19:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-09-18  0:33 [CI 1/6] drm/i915/display/icl: Save Master transcoder in slave's crtc_state for Transcoder Port Sync Manasi Navare
2019-09-18  0:33 ` [CI 2/6] drm/i915/display/icl: Enable TRANSCODER PORT SYNC for tiled displays across separate ports Manasi Navare
2019-09-18  0:33 ` [CI 3/6] drm/i915/display/icl: HW state readout for transcoder port sync config Manasi Navare
2019-09-18  7:57   ` Maarten Lankhorst
2019-09-18 19:12     ` Manasi Navare [this message]
2019-09-18  0:33 ` [CI 4/6] drm/i915/display/icl: Enable master-slaves in trans port sync Manasi Navare
2019-09-18  0:33 ` [CI 5/6] drm/i915/display/icl: Disable transcoder port sync as part of crtc_disable() sequence Manasi Navare
2019-09-18  0:33 ` [CI 6/6] drm/i915/display/icl: In port sync mode disable slaves first then master Manasi Navare
2019-09-18  0:59 ` ✗ Fi.CI.SPARSE: warning for series starting with [CI,1/6] drm/i915/display/icl: Save Master transcoder in slave's crtc_state for Transcoder Port Sync Patchwork
2019-09-18  1:15 ` ✗ Fi.CI.BAT: failure " Patchwork

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=20190918191226.GC31062@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.