From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 44199606A683 for ; Sat, 5 Dec 2026 10:10:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=jnFVX2IC Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 718FE10E06F; Sat, 5 Dec 2026 10:10:23 +0000 (UTC) Received: from tor.source.kernel.org (tor.source.kernel.org [172.105.4.254]) by gabe.freedesktop.org (Postfix) with ESMTPS id 72EC010E06F for ; Sat, 5 Dec 2026 10:10:17 +0000 (UTC) Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id 7F07B61CE6; Sat, 5 Dec 2026 10:10:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2A1E01F0092B; Sat, 5 Dec 2026 10:10:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796465416; bh=tgT6GQi+yb1S6XTE8zkZ/yU1BgSoSx4B0vsT7WJibTg=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=jnFVX2ICa8IklGtBkv/ne+d2sxBntZMBb9t8Ldg0BNxAp+9jxegZgwzrtSUUt84qw oqlOkey7qSEjH402nigV8y3Fn3StPI7O1MpMjQm/29u/y+Q6vwReJJi8XUEOtVhn8j k8OmWGg1x/5ZAhIB3vqOLezPbwUepg9+kfCuZvvbF8MRRdyQx15/SpiEcUnQ/zBkMk ltdlZaJBMlLCH9tIUaVrVRHVPWNFOJB4mbQ75bGpRWqH9HRlZY+RX/d3sCu1/XqW3g MQEJU5oA5TiBlIilo8sNJ2Vgws9wRVkM5Q9GNIjRxaqNRLGIMGDWplOjyqi+h9EuqO +4EAW102vRkZg== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH] drm/msm/dp: write the Qualcomm source OUI before eDP link bring-up To: "Jens Glathe" Cc: dri-devel@lists.freedesktop.org In-Reply-To: <20261205-dp_send_qcom_oui-v1-1-b0b2332dd226@oldschoolsolutions.biz> References: <20261205-dp_send_qcom_oui-v1-1-b0b2332dd226@oldschoolsolutions.biz> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Sat, 05 Dec 2026 10:10:15 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: sashiko-reviews@lists.linux.dev Sender: "dri-devel" X-Spam-Status: No, score=-11.1 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 X-Archived-By: 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 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 *ms= m_dp_display, [ ... ] > +static void msm_dp_display_write_source_oui(struct msm_dp_display_privat= e *dp) > +{ > + /* Not const: drm_dp_dpcd_write_data() takes a non-const buffer */ > + u8 qcom_oui[] =3D { 0x8c, 0xfd, 0xf0 }; > + u8 buf[sizeof(qcom_oui)] =3D {}; > + > + 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 !=3D 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. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261205-dp_send_qc= om_oui-v1-1-b0b2332dd226@oldschoolsolutions.biz?part=3D1