From: sashiko-bot@kernel.org
To: "Jens Glathe" <jens.glathe@oldschoolsolutions.biz>
Cc: dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/msm/dp: write the Qualcomm source OUI before eDP link bring-up
Date: Sat, 05 Dec 2026 10:10:15 +0000 [thread overview]
Message-ID: <sashiko-outbox-251372@kernel.org> (raw)
In-Reply-To: <20261205-dp_send_qcom_oui-v1-1-b0b2332dd226@oldschoolsolutions.biz>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] drm/msm/dp: msm_dp_display_write_source_oui() checks buf after
failed read
--
commit c144d1e3106d36ea14e6fc6fcc64c82cc7aaf9c0
Author: Jens Glathe <jens.glathe@oldschoolsolutions.biz>
drm/msm/dp: write the Qualcomm source OUI before eDP link bring-up
This commit writes the Qualcomm source OUI to DP_SOURCE_OUI for eDP
sinks in msm_dp_display_prepare_link() before link training, reading the
register first to skip the write if it already matches.
> diff --git a/drivers/gpu/drm/msm/dp/dp_display.c b/drivers/gpu/drm/msm/dp/dp_display.c
> index 29032fb61443e..d4bf60e7cec2e 100644
> --- a/drivers/gpu/drm/msm/dp/dp_display.c
> +++ b/drivers/gpu/drm/msm/dp/dp_display.c
> @@ -628,6 +628,32 @@ static int msm_dp_display_set_mode(struct msm_dp *msm_dp_display,
[ ... ]
> +static void msm_dp_display_write_source_oui(struct msm_dp_display_private *dp)
> +{
> + /* Not const: drm_dp_dpcd_write_data() takes a non-const buffer */
> + u8 qcom_oui[] = { 0x8c, 0xfd, 0xf0 };
> + u8 buf[sizeof(qcom_oui)] = {};
> +
> + if (drm_dp_dpcd_read_data(dp->aux, DP_SOURCE_OUI, buf, sizeof(buf)) < 0)
> + drm_dbg_dp(dp->drm_dev, "failed to read the source OUI\n");
> +
> + if (!memcmp(buf, qcom_oui, sizeof(qcom_oui)))
> + return;
[Severity: Low]
Should this memcmp() be in an else if branch so it does not inspect buf
when drm_dp_dpcd_read_data() fails?
On a short AUX read, msm_dp_aux_cmd_fifo_rx() stores each byte from
REG_DP_AUX_DATA before breaking on i != actual_i. Neither
drm_dp_dpcd_access() nor the fallback in drm_dp_dpcd_read_data() clears
the buffer on error, so a failed read can leave buf matching qcom_oui.
If that happens, msm_dp_display_write_source_oui() returns early and
skips writing DP_SOURCE_OUI, leaving the panel's DPCD backlight controls
unresponsive until the next link bring-up.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261205-dp_send_qcom_oui-v1-1-b0b2332dd226@oldschoolsolutions.biz?part=1
prev parent reply other threads:[~2026-12-05 10:10 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-05 9:55 [PATCH] drm/msm/dp: write the Qualcomm source OUI before eDP link bring-up Jens Glathe via B4 Relay
2026-12-05 9:55 ` Jens Glathe
2026-12-05 10:10 ` sashiko-bot [this message]
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-251372@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jens.glathe@oldschoolsolutions.biz \
--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 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.