All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Xilin Wu" <sophon@radxa.com>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH 10/13] drm/msm/dp: Signal BT.2020 RGB on DP and eDP
Date: Wed, 30 Sep 2026 12:57:39 +0000	[thread overview]
Message-ID: <20260930125740.011DB1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260930-msm-dp-hdr10-v1-10-dbbf8b2b42bc@radxa.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [High] drm/msm/dp: PSR state mismatch causes blank screen for YUV420 modes
--

commit 1a1587a85fbd9d8b79a76366fd11f806251ab09b
Author: Xilin Wu <sophon@radxa.com>
Subject: drm/msm/dp: Signal BT.2020 RGB on DP and eDP

This commit exposes the DP Colorspace property and handles VSC packets
in the bridge atomic state. It disables PSR in the controller and sink
while colorimetry VSC packets are active, as they cannot share the
automatic PSR packet generator.

> diff --git a/drivers/gpu/drm/msm/dp/dp_drm.c b/drivers/gpu/drm/msm/dp/dp_drm.c
> --- a/drivers/gpu/drm/msm/dp/dp_drm.c
> +++ b/drivers/gpu/drm/msm/dp/dp_drm.c
> @@ -208,12 +208,13 @@ static int msm_edp_bridge_atomic_check(struct drm_bridge *drm_bridge,
>  	if (WARN_ON(!conn_state))
>  		return -ENODEV;
>  
> -	conn_state->self_refresh_aware = dp->psr_supported;
> +	conn_state->self_refresh_aware = dp->psr_supported &&
> +		conn_state->colorspace == DRM_MODE_COLORIMETRY_DEFAULT;

[Severity: High]
Does this logic create a state mismatch for YUV420 modes between software
and hardware?

In msm_dp_display_atomic_check(), state->vsc_enabled is correctly set to
true for YUV420 modes:

msm_dp_display_atomic_check() {
    ...
    state->vsc_enabled = drm_mode_is_420_only(info, mode) ||
                         state->colorspace != DRM_MODE_COLORIMETRY_DEFAULT;
    ...
}

When vsc_enabled is true, hardware PSR is then disabled in
msm_dp_display_post_enable():

msm_dp_display_post_enable() {
    ...
    if (msm_dp_display->psr_supported)
        msm_dp_ctrl_config_psr(dp->ctrl, dp->panel, !dp->panel->vsc_enabled);
    ...
}

However, msm_edp_bridge_atomic_check() only checks the colorspace against
DRM_MODE_COLORIMETRY_DEFAULT to determine if the connector is self-refresh
aware. Because it misses the check for YUV420 modes, the DRM core might
believe PSR is supported and active, while the driver explicitly disables
hardware PSR.

Could this cause the host to stop transmitting video data for self-refresh
while the panel is not actually in self-refresh mode, leading to a blank
screen or PSR entry timeouts?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260930-msm-dp-hdr10-v1-0-dbbf8b2b42bc@radxa.com?part=10

  reply	other threads:[~2026-09-30 12:57 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-30 12:41 [PATCH 00/13] drm/msm/dp: Add static HDR support for DP and eDP Xilin Wu
2026-09-30 12:41 ` [PATCH 01/13] drm/atomic: Handle max bpc properties before connector state allocation Xilin Wu
2026-09-30 13:26   ` Dmitry Baryshkov
2026-09-30 14:16     ` Xilin Wu
2026-10-01  9:07   ` Maxime Ripard
2026-09-30 12:41 ` [PATCH 02/13] drm/msm/dp: Support multiple generic SDP slots Xilin Wu
2026-09-30 16:05   ` Dmitry Baryshkov
2026-09-30 12:41 ` [PATCH 03/13] drm/msm/dp: Track PHY power ownership Xilin Wu
2026-09-30 12:59   ` sashiko-bot
2026-09-30 12:41 ` [PATCH 04/13] drm/msm/dp: Serialize HPD state updates Xilin Wu
2026-09-30 16:07   ` Dmitry Baryshkov
2026-09-30 12:41 ` [PATCH 05/13] drm/msm/dp: Unwind resources when enabling a stream fails Xilin Wu
2026-09-30 12:59   ` sashiko-bot
2026-09-30 12:41 ` [PATCH 06/13] drm/msm/dp: Report stream enable failures through link status Xilin Wu
2026-09-30 16:11   ` Dmitry Baryshkov
2026-09-30 12:41 ` [PATCH 07/13] drm/msm/dp: Track validity of cached sink link capabilities Xilin Wu
2026-09-30 16:14   ` Dmitry Baryshkov
2026-09-30 12:41 ` [PATCH 08/13] drm/msm/dp: Rebuild the eDP stream on modesets leaving self refresh Xilin Wu
2026-09-30 12:41 ` [PATCH 09/13] drm/msm/dp: Track output bit depth in bridge atomic state Xilin Wu
2026-09-30 13:01   ` sashiko-bot
2026-09-30 18:05   ` Dmitry Baryshkov
2026-09-30 12:41 ` [PATCH 10/13] drm/msm/dp: Signal BT.2020 RGB on DP and eDP Xilin Wu
2026-09-30 12:57   ` sashiko-bot [this message]
2026-09-30 18:50   ` Dmitry Baryshkov
2026-09-30 12:41 ` [PATCH 11/13] drm/msm/dp: Initialize the debugfs connector pointer Xilin Wu
2026-09-30 18:51   ` Dmitry Baryshkov
2026-09-30 12:41 ` [PATCH 12/13] drm/msm/dp: Serialize video test state changes Xilin Wu
2026-09-30 12:41 ` [PATCH 13/13] drm/msm/dp: Add static HDR metadata support for DP and eDP Xilin Wu
2026-09-30 13:04   ` sashiko-bot
2026-09-30 18:54   ` Dmitry Baryshkov
2026-10-03  0:46 ` [PATCH 00/13] drm/msm/dp: Add static HDR " Dmitry Baryshkov

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=20260930125740.011DB1F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=sophon@radxa.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.