All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Xiao Lu" <xiaolu.xie@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH v2] drm/i915/display: Enable VRR/HDR over MST
Date: Wed, 02 Sep 2026 01:48:41 +0000	[thread overview]
Message-ID: <20260902014841.BDCCB1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260902012852.250993-1-xiaolu.xie@intel.com>

Thank you for your contribution! Sashiko AI review found 4 potential issue(s) to consider:
- [High] AS-SDP computation is broken for MST streams because the branch device check unconditionally returns false.
- [High] VRR capability caching is incorrectly tied to DSC support, silently breaking VRR on MST monitors that lack DSC.
- [High] DP_MSA_TIMING_PAR_IGNORE_EN is unconditionally enabled based on capability rather than active VRR state.
- [High] Dynamic creation of `vrr_capable_property` after device registration during MST hotplug triggers a kernel WARN_ON and leaks memory.
--

commit 67043be5215717a8902d6610575b918e36e9945a
Author: Xiao Lu <xiaolu.xie@intel.com>

drm/i915/display: Enable VRR/HDR over MST

This commit introduces VRR and HDR metadata support over MST display streams.
It caches the downstream port's MSA timing par ignore capability and enables
AS-SDP and VSC SDP computation and transmission for MST connectors.

> diff --git a/drivers/gpu/drm/i915/display/intel_dp_mst.c b/drivers/gpu/drm/i915/display/intel_dp_mst.c
> index 6a869d0f6ffc0..657440e2cb648 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_mst.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_mst.c

[ ... ]

> @@ -793,6 +793,9 @@ static int mst_stream_compute_config(struct intel_atomic_state *state,
>  			bxt_dpio_phy_calc_lane_lat_optim_mask(pipe_config->lane_count);
>  
>  	intel_vrr_compute_config(pipe_config, conn_state);
> +	intel_dp_compute_as_sdp(intel_dp, pipe_config);

[Severity: High]
Will this AS-SDP computation actually run for MST topologies?

In intel_dp_compute_as_sdp() (which calls intel_dp_needs_as_sdp()), there is
an existing check that unconditionally disables AS-SDP for branch devices:

drivers/gpu/drm/i915/display/intel_dp.c:intel_dp_needs_as_sdp()
    if (drm_dp_is_branch(intel_dp->dpcd))
        return false;

Since the primary DP device in an MST topology is always a branch device
(the MST hub), this check will always return false, silently aborting the
AS-SDP logic you are enabling here.

[ ... ]

> @@ -1274,6 +1295,24 @@ static void mst_stream_pre_enable(struct intel_atomic_state *state,
>  
>  	drm_dp_send_power_updown_phy(&intel_dp->mst.mgr, connector->mst.port, true);
>  
> +	if (intel_vrr_is_capable(connector)) {
> +		u8 val;
> +		ssize_t ret;
> +
> +		ret = drm_dp_mst_dpcd_read(&connector->mst.port->aux,
> +					   DP_DOWNSPREAD_CTRL, &val, 1);
> +		if (ret < 0) {
> +			drm_dbg_kms(display->drm,
> +				    "[CONNECTOR:%d:%s] Failed to read DP_DOWNSPREAD_CTRL: %zd\n",
> +				    connector->base.base.id,
> +				    connector->base.name, ret);
> +		} else {
> +			val |= DP_MSA_TIMING_PAR_IGNORE_EN;
> +			drm_dp_mst_dpcd_write(&connector->mst.port->aux,
> +					      DP_DOWNSPREAD_CTRL, &val, 1);
> +		}
> +	}

[Severity: High]
Does this alter the sink behavior unconditionally, even when VRR is not active?

The DP_MSA_TIMING_PAR_IGNORE_EN bit is being written based solely on
intel_vrr_is_capable(connector), bypassing any check for whether VRR is
actually enabled for this atomic state (e.g. crtc_state->vrr.enable).

This will program the sink to ignore MSA video timings even when a fixed
refresh rate is active. Could this lead to display corruption or sync loss
on monitors that expect strict MSA timings during fixed-refresh operation?

[ ... ]

> @@ -1745,6 +1799,14 @@ static int mst_topology_add_connector_properties(struct intel_dp *intel_dp,
>  	if (connector->base.max_bpc_property)
>  		drm_connector_attach_max_bpc_property(&connector->base, 6, 12);
>  
> +	/*
> +	 * Reuse the vrr_capable prop from the eDP connector (which is always
> +	 * initialized during driver load before device registration), because
> +	 * we're not allowed to create new props after device registration.
> +	 */
> +	if (HAS_VRR(display))
> +		drm_connector_attach_vrr_capable_property(&connector->base);

[Severity: High]
Does this safely reuse the property without triggering a kernel WARN_ON?

Although the comment mentions reusing the vrr_capable property, the code
does not seed connector->base.vrr_capable_property with the shared property
pointer before calling drm_connector_attach_vrr_capable_property().

Because it is unseeded, drm_connector_attach_vrr_capable_property() will
try to allocate a new property via drm_property_create_bool(). Creating
new properties after device registration is forbidden and triggers a
WARN_ON in __drm_mode_object_add().

This will also permanently leak a DRM property object in the device's
global property list on every MST hotplug.

[ ... ]

> @@ -1761,6 +1823,9 @@ intel_dp_mst_read_decompression_port_dsc_caps(struct intel_dp *intel_dp,
>  	if (drm_dp_read_dpcd_caps(connector->dp.dsc_decompression_aux, dpcd_caps) < 0)
>  		return;
>  
> +	connector->dp.mst_msa_timing_par_ignore =
> +		drm_dp_sink_can_do_video_without_timing_msa(dpcd_caps);

[Severity: High]
Will VRR be disabled on MST monitors that do not support DSC decompression?

The flag mst_msa_timing_par_ignore is populated here, but this function has
an early return higher up:

    if (!connector->dp.dsc_decompression_aux)
        return;

For non-DSC MST displays, this flag remains uninitialized (false). Later,
intel_vrr_is_capable() relies on this cached value to determine VRR
support:

drivers/gpu/drm/i915/display/intel_vrr.c:intel_vrr_is_capable()
    if (!connector->dp.mst_msa_timing_par_ignore)
        return false;

This will cause intel_vrr_is_capable() to unconditionally reject VRR for
any MST display that lacks a DSC decompression AUX port.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260902012852.250993-1-xiaolu.xie@intel.com?part=1

  reply	other threads:[~2026-09-02  1:48 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-01 13:26 [PATCH] drm/i915/display: Enable VRR/HDR over MST Xiao Lu
2026-09-01 16:22 ` ✗ Fi.CI.BUILD: failure for " Patchwork
2026-09-02  1:28 ` [PATCH v2] " Xiao Lu
2026-09-02  1:48   ` sashiko-bot [this message]
2026-09-02  2:42 ` ✗ i915.CI.BAT: failure for drm/i915/display: Enable VRR/HDR over MST (rev2) Patchwork
2026-09-02  3:00 ` [PATCH v3] drm/i915/display: Enable VRR/HDR over MST Xiao Lu
2026-09-02  3:18   ` sashiko-bot
2026-09-02  3:22 ` [PATCH v4] " Xiao Lu
2026-09-02  3:38   ` sashiko-bot
2026-09-02  4:56 ` ✗ i915.CI.BAT: failure for drm/i915/display: Enable VRR/HDR over MST (rev4) Patchwork
2026-09-02  5:09 ` [PATCH v5] drm/i915/display: Enable VRR/HDR over MST Xiao Lu
2026-09-02  5:30   ` sashiko-bot
2026-09-02  5:12 ` [PATCH v6] " Xiao Lu
2026-09-02  5:30   ` sashiko-bot
2026-09-02  8:37   ` Jani Nikula
2026-09-02  8:51     ` Xie, Xiaolu
2026-09-02  5:58 ` ✓ i915.CI.BAT: success for drm/i915/display: Enable VRR/HDR over MST (rev6) Patchwork
2026-09-02 21:35 ` ✗ i915.CI.Full: failure " 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=20260902014841.BDCCB1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=xiaolu.xie@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.