public inbox for intel-xe@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Hogander, Jouni" <jouni.hogander@intel.com>
To: "intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
	"Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH v2 3/4] drm/i915/dsc: Add helper for writing DSC Selective Update ET parameters
Date: Wed, 4 Mar 2026 09:13:43 +0000	[thread overview]
Message-ID: <64747118136fee7be6a7924dfc9199e6a852de05.camel@intel.com> (raw)
In-Reply-To: <5bb046c8-b154-4fc3-a119-e7c2a41b4c6b@intel.com>

On Wed, 2026-03-04 at 14:06 +0530, Nautiyal, Ankit K wrote:
> 
> On 3/3/2026 6:24 PM, Jouni Högander wrote:
> > There are slice row per frame and pic height configuration in DSC
> > Selective
> > Update Parameter Set 1 register. Add helper for configuring these.
> > 
> > Bspec: 71709
> > Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
> > ---
> >   drivers/gpu/drm/i915/display/intel_vdsc.c | 22
> > ++++++++++++++++++++++
> >   drivers/gpu/drm/i915/display/intel_vdsc.h |  3 +++
> >   2 files changed, 25 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_vdsc.c
> > b/drivers/gpu/drm/i915/display/intel_vdsc.c
> > index 7e53201b3cb1..ae3af3c2e41a 100644
> > --- a/drivers/gpu/drm/i915/display/intel_vdsc.c
> > +++ b/drivers/gpu/drm/i915/display/intel_vdsc.c
> > @@ -820,6 +820,28 @@ void intel_dsc_dp_pps_write(struct
> > intel_encoder *encoder,
> >   				  sizeof(dp_dsc_pps_sdp));
> >   }
> >   
> > +void intel_dsc_su_et_parameters_configure(struct intel_dsb *dsb,
> > struct intel_encoder *encoder,
> > +					  const struct
> > intel_crtc_state *crtc_state, int su_lines)
> > +{
> > +	struct intel_display *display =
> > to_intel_display(crtc_state);
> > +	struct intel_crtc *crtc = to_intel_crtc(crtc_state-
> > >uapi.crtc);
> > +	const struct drm_dsc_config *vdsc_cfg = &crtc_state-
> > >dsc.config;
> > +	enum pipe pipe = crtc->pipe;
> > +	int vdsc_instances_per_pipe =
> > intel_dsc_get_vdsc_per_pipe(crtc_state);
> > +	int slice_row_per_frame = su_lines / vdsc_cfg-
> > >slice_height;
> > +	u32 val;
> > +
> > +	drm_WARN_ON_ONCE(display->drm, su_lines % vdsc_cfg-
> > >slice_height);
> > +
> > +	val =
> > DSC_SUPS0_SU_SLICE_ROW_PER_FRAME(slice_row_per_frame);
> > +	val |= DSC_SUPS0_SU_PIC_HEIGHT(su_lines);
> > +
> > +	intel_de_write_dsb(display, dsb,
> > LNL_DSC0_SU_PARAMETER_SET_0(pipe), val);
> > +
> > +	if (vdsc_instances_per_pipe > 1)
> > +		intel_de_write_dsb(display, dsb,
> > LNL_DSC1_SU_PARAMETER_SET_0(pipe), val);
> 
> Currently 3 DSC engines per pipe is only supported on BMG, which
> doesn't 
> have eDP, so vdsc_instances_per_pipe would never be 3 for now.

Yes, but it can be two. Thus > 1.
> 
> Furthermore we do not support these registers for BMG AFAICS.
> 
> However later some platform may have 3 VDSC engines and who knows may
> need the Selective Update ET configuration for DSC.
> 
> Since we do not have those registers defined, lets make this
> condition 
> specifically check for `vdsc_instances_per_pipe == 1`

We can't do that because instances can be > 1. Actually when running
kms_psr2_sf on setup where panel is supporting selective update and dsc
this is the case.

> 
> We can have perhaps have WARN_ON if vdsc_instances_per_pipe > 2, at
> the 
> start, as we do not expect the SU ET configuration for 3rd VDSC
> engine yet.

I see everywhere else in intel_vdsc.c same convention is used. I don't
understand why this helper for PSR code should be made different and be
responsible for identifying possible DSC configuration issue?

BR,
Jouni Högander

> 
> 
> Regards,
> 
> Ankit
> 
> 
> > +}
> > +
> >   static i915_reg_t dss_ctl1_reg(struct intel_crtc *crtc, enum
> > transcoder cpu_transcoder)
> >   {
> >   	return is_pipe_dsc(crtc, cpu_transcoder) ?
> > diff --git a/drivers/gpu/drm/i915/display/intel_vdsc.h
> > b/drivers/gpu/drm/i915/display/intel_vdsc.h
> > index f4d5b37293cf..3372f8694054 100644
> > --- a/drivers/gpu/drm/i915/display/intel_vdsc.h
> > +++ b/drivers/gpu/drm/i915/display/intel_vdsc.h
> > @@ -14,6 +14,7 @@ enum transcoder;
> >   struct intel_crtc;
> >   struct intel_crtc_state;
> >   struct intel_display;
> > +struct intel_dsb;
> >   struct intel_dsc_slice_config;
> >   struct intel_encoder;
> >   
> > @@ -37,6 +38,8 @@ void intel_dsc_dsi_pps_write(struct intel_encoder
> > *encoder,
> >   			     const struct intel_crtc_state
> > *crtc_state);
> >   void intel_dsc_dp_pps_write(struct intel_encoder *encoder,
> >   			    const struct intel_crtc_state
> > *crtc_state);
> > +void intel_dsc_su_et_parameters_configure(struct intel_dsb *dsb,
> > struct intel_encoder *encoder,
> > +					  const struct
> > intel_crtc_state *crtc_state, int su_lines);
> >   void intel_vdsc_state_dump(struct drm_printer *p, int indent,
> >   			   const struct intel_crtc_state
> > *crtc_state);
> >   int intel_vdsc_min_cdclk(const struct intel_crtc_state
> > *crtc_state);


  reply	other threads:[~2026-03-04  9:13 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-03 12:54 [PATCH v2 0/4] PSR/PR Selective Fetch Early Transport fixes Jouni Högander
2026-03-03 12:54 ` [PATCH v2 1/4] drm/i915/psr: Repeat Selective Update area alignment Jouni Högander
2026-03-04  7:44   ` Nautiyal, Ankit K
2026-03-03 12:54 ` [PATCH v2 2/4] drm/i915/dsc: Add Selective Update register definitions Jouni Högander
2026-03-04  7:56   ` Nautiyal, Ankit K
2026-03-03 12:54 ` [PATCH v2 3/4] drm/i915/dsc: Add helper for writing DSC Selective Update ET parameters Jouni Högander
2026-03-04  8:36   ` Nautiyal, Ankit K
2026-03-04  9:13     ` Hogander, Jouni [this message]
2026-03-04 10:26       ` Nautiyal, Ankit K
2026-03-04 10:44         ` Hogander, Jouni
2026-03-03 12:54 ` [PATCH v2 4/4] drm/i915/psr: Write DSC parameters on Selective Update in ET mode Jouni Högander
2026-03-04 10:28   ` Nautiyal, Ankit K
2026-03-03 14:23 ` ✗ CI.checkpatch: warning for PSR/PR Selective Fetch Early Transport fixes (rev2) Patchwork
2026-03-03 14:24 ` ✓ CI.KUnit: success " Patchwork
2026-03-03 15:20 ` ✓ Xe.CI.BAT: " Patchwork
2026-03-04  1:53 ` ✗ Xe.CI.FULL: 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=64747118136fee7be6a7924dfc9199e6a852de05.camel@intel.com \
    --to=jouni.hogander@intel.com \
    --cc=ankit.k.nautiyal@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox