From: sashiko-bot@kernel.org
To: "Nemesa Garg" <nemesa.garg@intel.com>
Cc: intel-xe@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 2/2] drm/i915/psr: Clear stale sel fetch enable bits on sel fetch disable
Date: Wed, 09 Sep 2026 11:32:05 +0000 [thread overview]
Message-ID: <20260909113205.B55FA1F00A3D@smtp.kernel.org> (raw)
In-Reply-To: <20260909110332.3528029-3-nemesa.garg@intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] The patch introduces `clear_psr2_sel_fetch` to clear stale hardware bits when selective fetch is disabled, but immediately returns early, skipping the addition of planes to the atomic state. This causes the fix to fail during non-modeset transitions.
--
commit 6d95f584528dbe05e1cd976db461a45c72fb5319
Author: Nemesa Garg <nemesa.garg@intel.com>
drm/i915/psr: Clear stale sel fetch enable bits on sel fetch disable
This commit attempts to clear stale selective fetch enable bits by tracking
the transition in clear_psr2_sel_fetch and having the plane/cursor arm paths
write 0 to the registers. It updates intel_psr2_sel_fetch_update() to record
when selective fetch is turned off.
Closes: https://gitlab.freedesktop.org/drm/xe/kernel/-/work_items/8739
[ ... ]
> diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
> index f490beb66629e..872e253db1786 100644
> --- a/drivers/gpu/drm/i915/display/intel_psr.c
> +++ b/drivers/gpu/drm/i915/display/intel_psr.c
[ ... ]
> @@ -2901,6 +2903,19 @@ int intel_psr2_sel_fetch_update(struct intel_atomic_state *state,
> bool full_update = false, su_area_changed;
> int i, ret;
>
> + /*
> + * Selective fetch is not always usable, for instance it is dropped
> + * while pipe CRC is active. The planes keep their selective fetch
> + * enable bit set in hardware over that, and a plane disabled while
> + * selective fetch is off never gets the bit cleared. Once selective
> + * fetch comes back the hardware would resume fetching for a plane that
> + * is no longer enabled and keep its DDB range reserved, so have the
> + * plane update drop the bit for every plane of the pipe as selective
> + * fetch is turned off.
> + */
> + crtc_state->clear_psr2_sel_fetch = old_crtc_state->enable_psr2_sel_fetch &&
> + !crtc_state->enable_psr2_sel_fetch;
> +
> if (!crtc_state->enable_psr2_sel_fetch)
> return 0;
[Severity: High]
Will this early return skip adding unmodified planes to the atomic state
during non-modeset transitions?
During a non-modeset atomic commit (like a fastset triggered by color
management or CDCLK updates) that disables PSR2 selective fetch, the core
drm_atomic_helper_check_modeset() function does not automatically add all
planes to the state.
When intel_psr2_sel_fetch_update() detects this transition, it sets
clear_psr2_sel_fetch to true, but then immediately returns 0 here because
enable_psr2_sel_fetch is false.
Because the function returns before reaching the
drm_atomic_add_affected_planes() call further down, unmodified planes are
not added to the atomic state. Could this cause their plane arm callbacks to
be skipped entirely, leaving the hardware bits active and potentially causing
the display corruption this patch was intended to fix?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260909110332.3528029-1-nemesa.garg@intel.com?part=2
next prev parent reply other threads:[~2026-09-09 11:32 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-09 11:03 [PATCH 0/2] Fix stale selective fetch enable bit Nemesa Garg
2026-09-09 11:03 ` [PATCH 1/2] Revert "drm/i915/display: Clear SEL_FETCH_PLANE_CTL on plane disable" Nemesa Garg
2026-09-09 11:03 ` [PATCH 2/2] drm/i915/psr: Clear stale sel fetch enable bits on sel fetch disable Nemesa Garg
2026-09-09 11:32 ` sashiko-bot [this message]
2026-09-10 12:14 ` Garg, Nemesa
2026-09-10 12:25 ` Hogander, Jouni
2026-09-09 11:14 ` ✓ CI.KUnit: success for Fix stale selective fetch enable bit (rev2) Patchwork
2026-09-09 12:20 ` ✓ Xe.CI.BAT: " Patchwork
2026-09-09 18:14 ` ✗ Xe.CI.FULL: failure " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2026-09-09 6:25 [PATCH 0/2] Fix stale selective fetch enable bit Nemesa Garg
2026-09-09 6:25 ` [PATCH 2/2] drm/i915/psr: Clear stale sel fetch enable bits on sel fetch disable Nemesa Garg
2026-09-09 8:23 ` Hogander, Jouni
2026-09-09 9:41 ` Garg, Nemesa
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=20260909113205.B55FA1F00A3D@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=nemesa.garg@intel.com \
--cc=sashiko-reviews@lists.linux.dev \
/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