From: Greg KH <greg@kroah.com>
To: Sasha Levin <sashal@kernel.org>
Cc: stable@vger.kernel.org, "Nemesa Garg" <nemesa.garg@intel.com>,
"Jouni Högander" <jouni.hogander@intel.com>,
"Animesh Manna" <animesh.manna@intel.com>,
"Jani Nikula" <jani.nikula@intel.com>
Subject: Re: [PATCH 6.12.y] drm/i915/display: Clear SEL_FETCH_PLANE_CTL on plane disable
Date: Wed, 30 Sep 2026 15:21:36 +0200 [thread overview]
Message-ID: <2026093029-unaltered-smudge-83af@gregkh> (raw)
In-Reply-To: <20260912142353.2927508-1-sashal@kernel.org>
On Sat, Sep 12, 2026 at 10:23:53AM -0400, Sasha Levin wrote:
> From: Nemesa Garg <nemesa.garg@intel.com>
>
> [ Upstream commit 7f1172a2ac0d7e50850785e2e65789c8aac8411a ]
>
> icl_plane_disable_sel_fetch_arm() wrote SEL_FETCH_PLANE_CTL = 0 only when
> crtc_state->enable_psr2_sel_fetch was set. If a plane was disabled after
> selective fetch had been turned off, the guard fired early and left the
> register's enable bit set in hardware.
>
> The bit is harmless until selective fetch is re-enabled. When it is, the
> hardware resumes fetching for the now-disabled plane and keeps its old DDB
> range reserved.
>
> i9xx_cursor_disable_sel_fetch_arm() has the same guard on SEL_FETCH_CUR_CTL
> and is fixed the same way.
>
> v2: Add same check for cursor also. [sashiko]
>
> Cc: stable@vger.kernel.org
> Fixes: b1f5279b5981 ("drm/i915/psr: Move plane sel fetch configuration into plane source files")
> Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/work_items/8739
> Assisted-by: GitHub-Copilot:claude-opus-4.6
> Signed-off-by: Nemesa Garg <nemesa.garg@intel.com>
> Reviewed-by: Jouni Högander <jouni.hogander@intel.com>
> Signed-off-by: Animesh Manna <animesh.manna@intel.com>
> Link: https://patch.msgid.link/20260818095149.2172935-1-nemesa.garg@intel.com
> (cherry picked from commit 600a7c9d40e5e0c5544f42d1c9592c8d15224dc0)
> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
> [ Adjusted context for missing pixel-normalizer code in icl_plane_disable_arm(). ]
> Signed-off-by: Sasha Levin <sashal@kernel.org>
> ---
> drivers/gpu/drm/i915/display/intel_cursor.c | 15 ++++++++++-----
> .../gpu/drm/i915/display/skl_universal_plane.c | 15 ++++++++++-----
> 2 files changed, 20 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_cursor.c b/drivers/gpu/drm/i915/display/intel_cursor.c
> index aeadb834d3328..104009cf5f412 100644
> --- a/drivers/gpu/drm/i915/display/intel_cursor.c
> +++ b/drivers/gpu/drm/i915/display/intel_cursor.c
> @@ -530,13 +530,18 @@ static int i9xx_check_cursor(struct intel_crtc_state *crtc_state,
> }
>
> static void i9xx_cursor_disable_sel_fetch_arm(struct intel_dsb *dsb,
> - struct intel_plane *plane,
> - const struct intel_crtc_state *crtc_state)
> + struct intel_plane *plane)
> {
> struct intel_display *display = to_intel_display(plane->base.dev);
> enum pipe pipe = plane->pipe;
>
> - if (!crtc_state->enable_psr2_sel_fetch)
> + /*
> + * Clear this whenever the hardware has selective fetch, not just when
> + * the current state uses it. The cursor may have been enabled with
> + * selective fetch earlier and had its enable bit orphaned when the
> + * feature was switched off.
> + */
> + if (!HAS_PSR2_SEL_FETCH(display))
> return;
>
> intel_de_write_dsb(display, dsb, SEL_FETCH_CUR_CTL(pipe), 0);
> @@ -588,7 +593,7 @@ static void i9xx_cursor_update_sel_fetch_arm(struct intel_dsb *dsb,
> if (crtc_state->enable_psr2_su_region_et)
> wa_16021440873(dsb, plane, crtc_state, plane_state);
> else
> - i9xx_cursor_disable_sel_fetch_arm(dsb, plane, crtc_state);
> + i9xx_cursor_disable_sel_fetch_arm(dsb, plane);
> }
> }
>
> @@ -699,7 +704,7 @@ static void i9xx_cursor_update_arm(struct intel_dsb *dsb,
> if (plane_state)
> i9xx_cursor_update_sel_fetch_arm(dsb, plane, crtc_state, plane_state);
> else
> - i9xx_cursor_disable_sel_fetch_arm(dsb, plane, crtc_state);
> + i9xx_cursor_disable_sel_fetch_arm(dsb, plane);
>
> if (plane->cursor.base != base ||
> plane->cursor.size != fbc_ctl ||
> diff --git a/drivers/gpu/drm/i915/display/skl_universal_plane.c b/drivers/gpu/drm/i915/display/skl_universal_plane.c
> index 7f77a76309bd5..52a38d3ada24d 100644
> --- a/drivers/gpu/drm/i915/display/skl_universal_plane.c
> +++ b/drivers/gpu/drm/i915/display/skl_universal_plane.c
> @@ -770,13 +770,18 @@ skl_plane_disable_arm(struct intel_dsb *dsb,
> }
>
> static void icl_plane_disable_sel_fetch_arm(struct intel_dsb *dsb,
> - struct intel_plane *plane,
> - const struct intel_crtc_state *crtc_state)
> + struct intel_plane *plane)
> {
> struct intel_display *display = to_intel_display(plane->base.dev);
> enum pipe pipe = plane->pipe;
>
> - if (!crtc_state->enable_psr2_sel_fetch)
> + /*
> + * Clear this whenever the hardware has selective fetch, not just when
> + * the current state uses it. The plane may have been enabled with
> + * selective fetch earlier and had its enable bit orphaned when the
> + * feature was switched off.
> + */
> + if (!HAS_PSR2_SEL_FETCH(display))
> return;
>
> intel_de_write_dsb(display, dsb, SEL_FETCH_PLANE_CTL(pipe, plane->id), 0);
> @@ -797,7 +802,7 @@ icl_plane_disable_arm(struct intel_dsb *dsb,
>
> skl_write_plane_wm(dsb, plane, crtc_state);
>
> - icl_plane_disable_sel_fetch_arm(dsb, plane, crtc_state);
> + icl_plane_disable_sel_fetch_arm(dsb, plane);
> intel_de_write_dsb(display, dsb, PLANE_CTL(pipe, plane_id), 0);
> intel_de_write_dsb(display, dsb, PLANE_SURF(pipe, plane_id), 0);
> }
> @@ -1512,7 +1517,7 @@ static void icl_plane_update_sel_fetch_arm(struct intel_dsb *dsb,
> intel_de_write_dsb(display, dsb, SEL_FETCH_PLANE_CTL(pipe, plane->id),
> SEL_FETCH_PLANE_CTL_ENABLE);
> else
> - icl_plane_disable_sel_fetch_arm(dsb, plane, crtc_state);
> + icl_plane_disable_sel_fetch_arm(dsb, plane);
> }
>
> static void
> --
> 2.53.0
>
>
did not apply. Also is not in 6.18 :(
prev parent reply other threads:[~2026-09-30 13:21 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-09 11:40 FAILED: patch "[PATCH] drm/i915/display: Clear SEL_FETCH_PLANE_CTL on plane disable" failed to apply to 6.12-stable tree gregkh
2026-09-12 14:23 ` [PATCH 6.12.y] drm/i915/display: Clear SEL_FETCH_PLANE_CTL on plane disable Sasha Levin
2026-09-30 13:21 ` Greg KH [this message]
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=2026093029-unaltered-smudge-83af@gregkh \
--to=greg@kroah.com \
--cc=animesh.manna@intel.com \
--cc=jani.nikula@intel.com \
--cc=jouni.hogander@intel.com \
--cc=nemesa.garg@intel.com \
--cc=sashal@kernel.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 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.