From: sashiko-bot@kernel.org
To: "Uma Shankar" <uma.shankar@intel.com>
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Subject: Re: [v5 2/4] drm/i915/display: Force disable DC3co when AS SDP skip frames is enabled
Date: Wed, 09 Sep 2026 08:02:03 +0000 [thread overview]
Message-ID: <20260909080203.AFE1B1F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260909080810.2202879-3-uma.shankar@intel.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
Pre-existing issues:
- [High] Lockless access to `crtc->base.state` in `intel_display_power_dc3co_compute()` for CRTCs not in the current atomic state can lead to Use-After-Free.
--
commit 8c209591fdca806eaeb08fb945c1a557f13cd189
Author: Uma Shankar <uma.shankar@intel.com>
drm/i915/display: Force disable DC3co when AS SDP skip frames is enabled
Periodic AS SDP (skip frames) relies on the AS SDP still being
transmitted while Panel Replay is active. DC3co uses the idle protocol
which suppresses AS SDP transmission entirely, so the two are mutually
exclusive: leaving DC3co enabled while skip frames is programmed breaks
the periodic AS SDP and the panel never sees the slower refresh.
> diff --git a/drivers/gpu/drm/i915/display/intel_display_power.c b/drivers/gpu/drm/i915/display/intel_display_power.c
> index 0ebec6e0c2400..1b60ce2dd00c4 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_power.c
> +++ b/drivers/gpu/drm/i915/display/intel_display_power.c
[ ... ]
> @@ -488,6 +489,14 @@ void intel_display_power_dc3co_compute(struct intel_atomic_state *state)
> if (crtc_state->has_sel_update)
> trigger |= DC3CO_TRIGGER_PSR2;
>
> + /*
> + * Periodic AS SDP (skip frames) needs the AS SDP to keep flowing during
> + * PR active, which is incompatible with DC3co. Keep DC3co disabled while
> + * skip frames is enabled.
> + */
> + if (intel_alpm_pr_as_sdp_skip_frames_enabled(intel_dp, crtc_state))
[Severity: High]
This is a pre-existing issue, but this patch exacerbates it by adding more reads
to the locklessly accessed state.
Can this lockless access to crtc_state lead to a use-after-free?
Looking at intel_display_power_dc3co_compute(), it retrieves the state of a
CRTC without locking it:
pipe = ffs(active_pipes) - 1;
crtc = intel_crtc_for_pipe(display, pipe);
crtc_state = to_intel_crtc_state(crtc->base.state);
If a system has multiple active CRTCs (e.g., A and B) and a non-blocking
atomic commit is issued to disable CRTC A, intel_display_power_dc3co_compute()
runs in the commit tail. It calculates that exactly one pipe (CRTC B) will
remain active and retrieves its state.
Because CRTC B is not part of the current atomic commit, no locks are held for
it. A concurrent non-blocking atomic commit on CRTC B can swap and free its
state while the first commit is reading fields like crtc_state->has_panel_replay
or crtc_state->vrr.enable (via intel_alpm_pr_as_sdp_skip_frames_enabled()),
potentially causing memory corruption or crashes.
> + trigger = DC3CO_TRIGGER_NONE;
> +
> done:
> intel_display_power_dc3co_update(display, trigger);
> }
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260909080810.2202879-1-uma.shankar@intel.com?part=2
next prev parent reply other threads:[~2026-09-09 8:02 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-09 8:08 [v5 0/4] drm/i915/display: Enable AS SDP Skip Frames Uma Shankar
2026-09-09 8:08 ` [v5 1/4] drm/i915/display: Enable periodic AS SDP skip frames Uma Shankar
2026-09-09 8:08 ` [v5 2/4] drm/i915/display: Force disable DC3co when AS SDP skip frames is enabled Uma Shankar
2026-09-09 8:02 ` sashiko-bot [this message]
2026-09-09 8:21 ` Shankar, Uma
2026-09-09 8:08 ` [v5 3/4] drm/i915/display: Reprogram AS SDP skip frames on seamless VRR transitions Uma Shankar
2026-09-09 8:08 ` [v5 4/4] drm/i915/display: Gate periodic AS SDP skip frames behind a debugfs knob Uma Shankar
2026-09-09 8:30 ` ✓ i915.CI.BAT: success for drm/i915/display: Enable AS SDP Skip Frames (rev5) Patchwork
2026-09-09 9:16 ` ✗ CI.checkpatch: warning for drm/i915/display: Enable AS SDP Skip Frames (rev6) Patchwork
2026-09-09 9:18 ` ✓ CI.KUnit: success " Patchwork
2026-09-09 10:25 ` ✓ Xe.CI.BAT: " Patchwork
2026-09-09 15:30 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-09-09 23:42 ` ✗ i915.CI.Full: failure for drm/i915/display: Enable AS SDP Skip Frames (rev5) Patchwork
2026-09-10 10:41 ` [v5 0/4] drm/i915/display: Enable AS SDP Skip Frames Shankar, Uma
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=20260909080203.AFE1B1F00A3A@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=sashiko-reviews@lists.linux.dev \
--cc=uma.shankar@intel.com \
/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.