From: sashiko-bot@kernel.org
To: "Suraj Kandpal" <suraj.kandpal@intel.com>,
intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org
Subject: Re: [PATCH 01/15] drm/i915/display: Rename port sync master/slave to primary/secondary
Date: Thu, 26 Nov 2026 06:43:35 +0000 [thread overview]
Message-ID: <sashiko-outbox-234887@kernel.org> (raw)
In-Reply-To: <20261126063459.863698-2-suraj.kandpal@intel.com>
Thank you for your contribution! Sashiko AI review found no new issues
in this patch, but noticed 1 related pre-existing issue it does not
introduce:
- [High] drm/i915/display: NULL pointer dereference in
intel_dmc_disable_pipe() [1]
--
commit 334735c1efc642c8d8a8c52554a839cfe3685f38
Author: Suraj Kandpal <suraj.kandpal@intel.com>
drm/i915/display: Rename port sync master/slave to primary/secondary
This commit renames the transcoder port sync state fields and helper
functions from master/slave to primary/secondary to match BSpec
terminology.
> diff --git a/drivers/gpu/drm/i915/display/intel_modeset_setup.c b/drivers/gpu/drm/i915/display/intel_modeset_setup.c
> index 6aed881737705..4c594373829ba 100644
> --- a/drivers/gpu/drm/i915/display/intel_modeset_setup.c
> +++ b/drivers/gpu/drm/i915/display/intel_modeset_setup.c
[ ... ]
> @@ -263,34 +264,34 @@ static void intel_crtc_disable_noatomic(struct intel_crtc *crtc,
> {
> struct intel_display *display = to_intel_display(crtc);
> struct intel_crtc *temp_crtc;
> - u16 portsync_master_mask;
> - u16 portsync_slaves_mask;
> + u16 portsync_primary_mask;
> + u16 portsync_secondaries_mask;
> u16 joiner_secondaries_mask;
>
> /* TODO: Add support for MST */
> - get_portsync_pipes(crtc, &portsync_master_mask, &portsync_slaves_mask);
> + get_portsync_pipes(crtc, &portsync_primary_mask, &portsync_secondaries_mask);
> joiner_secondaries_mask = get_joiner_secondary_pipes(display,
> - portsync_master_mask |
> - portsync_slaves_mask);
> + portsync_primary_mask |
> + portsync_secondaries_mask);
>
> drm_WARN_ON(display->drm,
> - portsync_master_mask & portsync_slaves_mask ||
> - portsync_master_mask & joiner_secondaries_mask ||
> - portsync_slaves_mask & joiner_secondaries_mask);
> + portsync_primary_mask & portsync_secondaries_mask ||
> + portsync_primary_mask & joiner_secondaries_mask ||
> + portsync_secondaries_mask & joiner_secondaries_mask);
>
> for_each_intel_crtc_in_pipe_mask(display, temp_crtc, joiner_secondaries_mask)
> intel_crtc_disable_noatomic_begin(temp_crtc, ctx);
[Severity: High]
This problem wasn't introduced by this patch, but can calling
intel_crtc_disable_noatomic_begin() on each CRTC in
joiner_secondaries_mask cause a NULL pointer dereference in
intel_dmc_disable_pipe() [1]?
When intel_sanitize_crtc() disables an active joined CRTC during probe or
resume, intel_crtc_disable_noatomic_begin() only adds BIT(pipe) |
intel_crtc_joiner_secondary_pipes(crtc_state) to the temporary atomic
state, which omits the joiner primary pipe when called on a joiner
secondary CRTC. Then display->modeset.funcs->crtc_disable() calls
hsw_crtc_disable(), where for_each_pipe_crtc_modeset_disable() iterates
over all pipes in old_crtc_state->joiner_pipes starting with the joiner
primary:
drivers/gpu/drm/i915/display/intel_display.c:hsw_crtc_disable() {
...
for_each_pipe_crtc_modeset_disable(display, pipe_crtc, old_crtc_state) {
const struct intel_crtc_state *old_pipe_crtc_state =
intel_atomic_get_old_crtc_state(state, pipe_crtc);
intel_dmc_disable_pipe(old_pipe_crtc_state);
}
}
Because the joiner primary CRTC is not in state,
intel_atomic_get_old_crtc_state() returns NULL and
intel_dmc_disable_pipe() dereferences crtc_state->uapi.crtc. Calling
hsw_crtc_disable() on the secondary CRTC also calls intel_dpll_disable()
before the primary CRTC's encoder and transcoder have been disabled.
[1] https://sashiko.dev/#/bug/linux-c6e57ac7-2e62-4987-9809-b5532eead653
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261126063459.863698-1-suraj.kandpal@intel.com?part=1
next prev parent reply other threads:[~2026-11-26 6:43 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 6:34 [PATCH 00/15] drm/i915/display: Sync tiled displays with pipelock Suraj Kandpal
2026-11-26 6:34 ` [PATCH 01/15] drm/i915/display: Rename port sync master/slave to primary/secondary Suraj Kandpal
2026-11-26 6:43 ` sashiko-bot [this message]
2026-11-26 6:34 ` [PATCH 02/15] drm/i915/display: Add HAS_PIPELOCK() Suraj Kandpal
2026-11-26 6:34 ` [PATCH 03/15] drm/i915/display: Add pipelock bits to TRANS_DDI_FUNC_CTL2 Suraj Kandpal
2026-11-26 8:45 ` Jani Nikula
2026-11-26 6:34 ` [PATCH 04/15] drm/i915/ddi: Program pipelock in TRANS_DDI_FUNC_CTL2 Suraj Kandpal
2026-11-26 6:34 ` [PATCH 05/15] drm/i915/ddi: Don't hold the DP link in idle with pipelock Suraj Kandpal
2026-11-26 6:34 ` [PATCH 06/15] drm/i915/display: Enable the pipelock primary before its secondaries Suraj Kandpal
2026-11-26 6:34 ` [PATCH 07/15] drm/i915/display: Read out and verify pipelock state Suraj Kandpal
2026-11-26 6:34 ` [PATCH 08/15] drm/i915/pipelock: Keep SSC, PSR and CMRR off on pipelock tiles Suraj Kandpal
2026-11-26 8:52 ` Jani Nikula
2026-11-26 9:14 ` Kandpal, Suraj
2026-11-26 6:34 ` [PATCH 09/15] drm/i915/pipelock: Compute pipelock groups for DP tiled displays Suraj Kandpal
2026-11-26 8:56 ` Jani Nikula
2026-11-26 9:16 ` Kandpal, Suraj
2026-11-26 6:34 ` [PATCH 10/15] drm/i915/vrr: Split out setting the guardband Suraj Kandpal
2026-11-26 6:44 ` sashiko-bot
2026-11-26 8:58 ` Jani Nikula
2026-11-26 9:17 ` Kandpal, Suraj
2026-11-26 6:34 ` [PATCH 11/15] drm/i915/pipelock: Equalize the guardband across a pipelock group Suraj Kandpal
2026-11-26 6:49 ` sashiko-bot
2026-11-26 6:34 ` [PATCH 12/15] drm/i915/dp: Apply link training fallback to the whole tile group Suraj Kandpal
2026-11-26 7:06 ` sashiko-bot
2026-11-26 6:34 ` [PATCH 13/15] drm/i915/display: Show transcoder sync state in i915_display_info Suraj Kandpal
2026-11-26 6:34 ` [PATCH 14/15] drm/i915/display: Use pipelock on PTL Suraj Kandpal
2026-11-26 6:54 ` sashiko-bot
2026-11-26 6:34 ` [PATCH 15/15] drm/i915/ddi: Disable port sync " Suraj Kandpal
2026-11-26 7:49 ` ✓ i915.CI.BAT: success for drm/i915/display: Sync tiled displays with pipelock 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=sashiko-outbox-234887@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=suraj.kandpal@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox