FAILED: patch "[PATCH] drm/i915/psr: Write DSC parameters on Selective Update in ET" failed to apply to 6.18-stable tree
[email protected]
maintainerThe patch below does not apply to the 6.18-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.
To reproduce the conflict and resubmit, you may use the following commands:
git fetch https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/ linux-6.18.y
git checkout FETCH_HEAD
git cherry-pick -x 5923a6e0459fdd3edac4ad5abccb24d777d8f1b6
# <resolve conflicts, build, test, etc.>
git commit -s
git send-email --to '<[email protected]>' --in-reply-to '2026031759-ravine-derived-5582@gregkh' --subject-prefix 'PATCH 6.18.y' HEAD^..
Possible dependencies:
thanks,
greg k-h
------------------ original commit in Linus's tree ------------------
From 5923a6e0459fdd3edac4ad5abccb24d777d8f1b6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Jouni=20H=C3=B6gander?= <[email protected]>
Date: Wed, 4 Mar 2026 13:30:11 +0200
Subject: [PATCH] drm/i915/psr: Write DSC parameters on Selective Update in ET
mode
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
There are slice row per frame and pic height parameters in DSC that needs to be configured on every Selective Update in Early Transport mode. Use helper provided by DSC code to configure these on Selective Update when in Early Transport mode. Also fill crtc_state->psr2_su_area with full frame area on full frame update for DSC calculation.
v2: move psr2_su_area under skip_sel_fetch_set_loop label
Bspec: 68927, 71709
drivers/gpu/drm/i915/display/intel_psr.c +10 -0
@@ -2619,6 +2619,12 @@ 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); + +if (!crtc_state->dsc.compression_enable) +return ; + +intel_dsc_su_et_parameters_configure (dsb, encoder, crtc_state, +drm_rect_height (&crtc_state->psr2_su_area)); } static void psr2_man_trk_ctl_calc(struct intel_crtc_state *crtc_state,
@@ -3040,6 +3046,10 @@ int intel_psr2_sel_fetch_update(struct intel_atomic_state *state, } skip_sel_fetch_set_loop: +if (full_update) +clip_area_update (&crtc_state->psr2_su_area, &crtc_state->pipe_src, + &crtc_state->pipe_src); +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);
PATCH 1/3 drm/i915/dsc: Add Selective Update register definitions
commit c2c79c6d5b939ae8a42ddb884f576bddae685672 upstream.
Add definitions for DSC_SU_PARAMETER_SET_0_DSC0 and DSC_SU_PARAMETER_SET_0_DSC1 registers. These are for Selective Update Early Transport configuration.
Bspec: 71709
--- drivers/gpu/drm/i915/display/intel_vdsc_regs.h | 12 ++++++++++++ 1 file changed, 12 insertions(+)
drivers/gpu/drm/i915/display/intel_vdsc_regs.h +12 -0
@@ -196,6 +196,18 @@#define DSC_PPS18_NSL_BPG_OFFSET (offset) REG_FIELD_PREP(DSC_PPS18_NSL_BPG_OFFSET_MASK, offset)#define DSC_PPS18_SL_OFFSET_ADJ (offset) REG_FIELD_PREP(DSC_PPS18_SL_OFFSET_ADJ_MASK, offset) +#define _LNL_DSC0_SU_PARAMETER_SET_0_PA 0x78064 +#define _LNL_DSC1_SU_PARAMETER_SET_0_PA 0x78164 +#define _LNL_DSC0_SU_PARAMETER_SET_0_PB 0x78264 +#define _LNL_DSC1_SU_PARAMETER_SET_0_PB 0x78364 +#define LNL_DSC0_SU_PARAMETER_SET_0 (pipe) _MMIO_PIPE((pipe), _LNL_DSC0_SU_PARAMETER_SET_0_PA, _LNL_DSC0_SU_PARAMETER_SET_0_PB) +#define LNL_DSC1_SU_PARAMETER_SET_0 (pipe) _MMIO_PIPE((pipe), _LNL_DSC1_SU_PARAMETER_SET_0_PA, _LNL_DSC1_SU_PARAMETER_SET_0_PB) + +#define DSC_SUPS0_SU_SLICE_ROW_PER_FRAME_MASK REG_GENMASK(31, 20) +#define DSC_SUPS0_SU_SLICE_ROW_PER_FRAME (rows) REG_FIELD_PREP(DSC_SUPS0_SU_SLICE_ROW_PER_FRAME_MASK, (rows)) +#define DSC_SUPS0_SU_PIC_HEIGHT_MASK REG_GENMASK(15, 0) +#define DSC_SUPS0_SU_PIC_HEIGHT (h) REG_FIELD_PREP(DSC_SUPS0_SU_PIC_HEIGHT_MASK, (h)) +/* Icelake Rate Control Buffer Threshold Registers */ #define DSCA_RC_BUF_THRESH_0 _MMIO(0x6B230)#define DSCA_RC_BUF_THRESH_0_UDW _MMIO(0x6B230 + 4)
Signature · 1 line
2.43.0
PATCH 2/3 drm/i915/dsc: Add helper for writing DSC Selective Update ET parameters
commit bb5f1cd10101c2567bff4d0e760b74aee7c42f44 upstream.
There are slice row per frame and pic height configuration in DSC Selective Update Parameter Set 1 register. Add helper for configuring these.
v2:
- Add WARN_ON_ONCE if vdsc instances per pipe > 2
- instead of checking vdsc instances per pipe being > 1 check == 2
Bspec: 71709
--- drivers/gpu/drm/i915/display/intel_vdsc.c | 23 +++++++++++++++++++++++ drivers/gpu/drm/i915/display/intel_vdsc.h | 3 +++ 2 files changed, 26 insertions(+)
drivers/gpu/drm/i915/display/intel_vdsc.c +23 -0
@@ -751,6 +751,29 @@ 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); +drm_WARN_ON_ONCE (display->drm, vdsc_instances_per_pipe >2 ); + + 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 ==2 ) +intel_de_write_dsb (display, dsb,LNL_DSC1_SU_PARAMETER_SET_0 (pipe), val); +} +static i915_reg_t dss_ctl1_reg (struct intel_crtc *crtc,enum transcoder cpu_transcoder) { return is_pipe_dsc(crtc, cpu_transcoder) ?
drivers/gpu/drm/i915/display/intel_vdsc.h +3 -0
@@ -13,6 +13,7 @@ struct drm_printer;enum transcoder ;struct intel_crtc ;struct intel_crtc_state ; +struct intel_dsb ;struct intel_encoder ;bool intel_dsc_source_support (const struct intel_crtc_state *crtc_state);
@@ -29,6 +30,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);
Signature · 1 line
2.43.0
PATCH 3/3 drm/i915/psr: Write DSC parameters on Selective Update in ET mode
In reply to Jouni Högandercommit 5923a6e0459fdd3edac4ad5abccb24d777d8f1b6 upstream.
There are slice row per frame and pic height parameters in DSC that needs to be configured on every Selective Update in Early Transport mode. Use helper provided by DSC code to configure these on Selective Update when in Early Transport mode. Also fill crtc_state->psr2_su_area with full frame area on full frame update for DSC calculation.
v2: move psr2_su_area under skip_sel_fetch_set_loop label
Bspec: 68927, 71709
--- drivers/gpu/drm/i915/display/intel_psr.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
drivers/gpu/drm/i915/display/intel_psr.c +11 -0
@@ -50,6 +50,7 @@#include "intel_snps_phy.h" #include "intel_step.h" #include "intel_vblank.h" +#include "intel_vdsc.h" #include "intel_vrr.h" #include "skl_universal_plane.h"
@@ -2489,6 +2490,12 @@ 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); + +if (!crtc_state->dsc.compression_enable) +return ; + +intel_dsc_su_et_parameters_configure (dsb, encoder, crtc_state, +drm_rect_height (&crtc_state->psr2_su_area)); } static void psr2_man_trk_ctl_calc(struct intel_crtc_state *crtc_state,
@@ -2883,6 +2890,10 @@ int intel_psr2_sel_fetch_update(struct intel_atomic_state *state, } skip_sel_fetch_set_loop: +if (full_update) +clip_area_update (&crtc_state->psr2_su_area, &crtc_state->pipe_src, + &crtc_state->pipe_src); +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);
Signature · 1 line
2.43.0
Greg KH
maintainerRe: [PATCH 6.18.y 1/3] drm/i915/dsc: Add Selective Update register definitions
In reply to Jouni HöganderQuoted 13 lines · Jouni Högander
commit
c2c79c6d5b939ae8a42ddb884f576bddae685672upstream.Add definitions for
DSC_SU_PARAMETER_SET_0_DSC0andDSC_SU_PARAMETER_SET_0_DSC1registers. These are for Selective Update Early Transport configuration.Bspec: 71709
Signed-off-by Jouni Högander <[email protected]>Reviewed-by Ankit Nautiyal <[email protected]>(cherry picked from commit 24f96d903daf3dcf8fafe84d3d22b80ef47ba493)Signed-off-by Tvrtko Ursulin <[email protected]>(cherry picked from commit c2c79c6d5b939ae8a42ddb884f576bddae685672)
Quoted 3 lines
--- drivers/gpu/drm/i915/display/intel_vdsc_regs.h | 12 ++++++++++++ 1 file changed, 12 insertions(+)
We need a 6.19.y version of this before we can take older versions :(