Intel-XE Archive on lore.kernel.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>
Cc: "stable@vger.kernel.org" <stable@vger.kernel.org>
Subject: Re: [PATCH 4/5] drm/i915/psr: DSC configuration for Early Transport
Date: Wed, 25 Feb 2026 12:26:38 +0000	[thread overview]
Message-ID: <aa56d3f2feed36908dcc7bb8f16cd0db81e933d6.camel@intel.com> (raw)
In-Reply-To: <528b9b9c-920d-4146-a4f7-97db356e7f28@intel.com>

On Wed, 2026-02-25 at 17:36 +0530, Nautiyal, Ankit K wrote:
> 
> On 2/19/2026 6:37 PM, Jouni Högander wrote:
> > There is Selective Update slice row per frame and picture height
> > configurations needed on DSC when using Selective Update Early
> > Transport. Calculate and configure these when using Early
> > Transport.
> > 
> > Bspec: 68927
> > Fixes: 467e4e061c44 ("drm/i915/psr: Enable psr2 early transport as
> > possible")
> > Cc: <stable@vger.kernel.org> # v6.9+
> 
> 
> This patch needs the other patch where registers are defined. I am
> not 
> sure if stable will only pick this patch or will try to find out the 
> dependency patch.
> 
> We need to check if there is a way to tell the dependency
> patch/commit 
> to stable, so that both patches are applied together.
> 
> If we want this change to get ported to older kernels, we might need
> to 
> squash the register definition patch with this patch.
> 
> 
> > Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
> > ---
> >   .../drm/i915/display/intel_display_types.h    |  1 +
> >   drivers/gpu/drm/i915/display/intel_psr.c      | 24
> > +++++++++++++++++++
> >   2 files changed, 25 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h
> > b/drivers/gpu/drm/i915/display/intel_display_types.h
> > index e8e4af03a6a6..8903804c04b1 100644
> > --- a/drivers/gpu/drm/i915/display/intel_display_types.h
> > +++ b/drivers/gpu/drm/i915/display/intel_display_types.h
> > @@ -1381,6 +1381,7 @@ struct intel_crtc_state {
> >   	u32 psr2_man_track_ctl;
> >   
> >   	u32 pipe_srcsz_early_tpt;
> > +	u32 dsc_su_parameter_set_0_calc;
> 
> I think let's just have a bool parameter something like 
> psr_su_update_dsc_pps.
> 
> We can set this bool variable during intel_psr2_sel_fetch_update()

You mean calculating value for the register when writing it? I think
for that purpose we can rely on crtc_state->enable_psr2_su_region_et
and crtc_state->dsc.compression_enable. No need to add new boolean.
Let's do it that way.
> 
> 
> >   
> >   	struct drm_rect psr2_su_area;
> >   
> > diff --git a/drivers/gpu/drm/i915/display/intel_psr.c
> > b/drivers/gpu/drm/i915/display/intel_psr.c
> > index 331645a2c9f6..0a2948ec308d 100644
> > --- a/drivers/gpu/drm/i915/display/intel_psr.c
> > +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> > @@ -2618,6 +2618,11 @@ void
> > intel_psr2_program_trans_man_trk_ctl(struct intel_dsb *dsb,
> >   
> >   	intel_de_write_dsb(display, dsb, PIPE_SRCSZ_ERLY_TPT(crtc-
> > >pipe),
> >   			   crtc_state->pipe_srcsz_early_tpt);
> > +	intel_de_write_dsb(display, dsb,
> > DSC_SU_PARAMETER_SET_0_DSC0(crtc->pipe),
> > +			   crtc_state-
> > >dsc_su_parameter_set_0_calc);
> > +	if (intel_dsc_get_vdsc_per_pipe(crtc_state) > 1)
> > +		intel_de_write_dsb(display, dsb,
> > DSC_SU_PARAMETER_SET_0_DSC1(crtc->pipe),
> > +				   crtc_state-
> > >dsc_su_parameter_set_0_calc);
> >   }
> >   
> >   static void psr2_man_trk_ctl_calc(struct intel_crtc_state
> > *crtc_state,
> > @@ -2668,6 +2673,23 @@ static u32
> > psr2_pipe_srcsz_early_tpt_calc(struct intel_crtc_state *crtc_state,
> >   	return PIPESRC_WIDTH(width - 1) | PIPESRC_HEIGHT(height -
> > 1);
> >   }
> >   
> > +static u32 psr2_dsc_su_parameter_set_0_calc(struct
> > intel_crtc_state *crtc_state,
> > +					    bool full_update)
> > +{
> > +	const struct drm_dsc_config *vdsc_cfg = &crtc_state-
> > >dsc.config;
> > +	int slice_row_per_frame, pic_height;
> > +
> > +	if (!crtc_state->enable_psr2_su_region_et || full_update
> > ||
> > +	    !crtc_state->dsc.compression_enable)
> > +		return 0;
> > +
> 
> Although we are making sure that height of the psr2_su_area is a 
> multiple of the slice_height, perhaps it would be good to have a 
> drm_WARN here to flag any misconfiguration i.e. if height is not a 
> multiple of slice_height.

I will add that warning and move these to intel_vdsc.c. I will also
move those register definitions you commented in patch 2.

> 
> 
> > +	slice_row_per_frame = drm_rect_height(&crtc_state-
> > >psr2_su_area) / vdsc_cfg->slice_height;
> > +	pic_height = slice_row_per_frame * vdsc_cfg->slice_height;
> > +
> > +	return
> > DSC_SU_PARAMETER_SET_0_SU_SLICE_ROW_PER_FRAME(slice_row_per_frame)
> > |
> > +		DSC_SU_PARAMETER_SET_0_SU_PIC_HEIGHT(pic_height);
> > +}
> 
> Since this writes a DSC register belonging to PPS Set 0, this
> function 
> should be moved to intel_vdsc.c.
> 
> Also, based on the boolean flag (psr_su_update_dsc_pps) discussed
> above, 
> this function should simply retrieve the required fields from
> crtc_state 
> and program the register.

Now as you pointed this out I see there is no real reason follow what
is done for PSR2_MAN_TRK_CTL.

> 
> Such a helper function should then be called from 
> intel_psr2_program_trans_man_trk_ctl() in place of the direct 
> intel_reg_write() call.
> 
> IMO, all register reads/writes, along with the wrappers/helpers
> around 
> them, should live in the file corresponding to the block that owns
> those 
> registers, based on context.

Ok, you convinced me. I will move these.

BR,
Jouni Högander

> 
> 
> Regards,
> 
> Ankit
> 
> > +
> >   static void clip_area_update(struct drm_rect
> > *overlap_damage_area,
> >   			     struct drm_rect *damage_area,
> >   			     struct drm_rect *pipe_src)
> > @@ -3026,6 +3048,8 @@ int intel_psr2_sel_fetch_update(struct
> > intel_atomic_state *state,
> >   	psr2_man_trk_ctl_calc(crtc_state, full_update);
> >   	crtc_state->pipe_srcsz_early_tpt =
> >   		psr2_pipe_srcsz_early_tpt_calc(crtc_state,
> > full_update);
> > +	crtc_state->dsc_su_parameter_set_0_calc =
> > psr2_dsc_su_parameter_set_0_calc(crtc_state,
> > +								
> > 		   full_update);
> >   	return 0;
> >   }
> >   


  reply	other threads:[~2026-02-25 12:26 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-19 13:07 [PATCH 0/5] PSR/PR Selective Fetch Early Transport fixes Jouni Högander
2026-02-19 13:07 ` [PATCH 1/5] drm/i915/psr: Repeat Selective Update area alignment Jouni Högander
2026-02-25  4:13   ` Nautiyal, Ankit K
2026-02-25  6:33     ` Hogander, Jouni
2026-02-19 13:07 ` [PATCH 2/5] drm/i915/psr: Add DSC_SU_PARAMETER_SET_0 registers for PSR configuration Jouni Högander
2026-02-25  4:21   ` Nautiyal, Ankit K
2026-02-25  6:30     ` Hogander, Jouni
2026-02-25 12:39       ` Nautiyal, Ankit K
2026-02-19 13:07 ` [PATCH 3/5] drm/i915/dsc: Convert intel_dsc_get_vdsc_per_pipe as non-static Jouni Högander
2026-02-25  5:04   ` Nautiyal, Ankit K
2026-02-19 13:07 ` [PATCH 4/5] drm/i915/psr: DSC configuration for Early Transport Jouni Högander
2026-02-25 12:06   ` Nautiyal, Ankit K
2026-02-25 12:26     ` Hogander, Jouni [this message]
2026-02-25 13:29     ` Jani Nikula
2026-02-25 14:30       ` Nautiyal, Ankit K
2026-02-19 13:07 ` [PATCH 5/5] drm/i915/psr: Drop cursor_in_su_area from intel_psr2_sel_fetch_et_alignment Jouni Högander
2026-02-19 13:45 ` ✗ CI.checkpatch: warning for PSR/PR Selective Fetch Early Transport fixes Patchwork
2026-02-19 13:47 ` ✓ CI.KUnit: success " Patchwork
2026-02-19 14:02 ` ✗ CI.checksparse: warning " Patchwork
2026-02-20  8:20 ` ✓ Xe.CI.BAT: success " Patchwork
2026-02-20  9:57 ` ✓ Xe.CI.FULL: " 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=aa56d3f2feed36908dcc7bb8f16cd0db81e933d6.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 \
    --cc=stable@vger.kernel.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