From: Guodong Xu <guodong.xu@oss.qualcomm.com>
To: Ian Rogers <irogers@google.com>
Cc: Rob Clark <robin.clark@oss.qualcomm.com>,
Dmitry Baryshkov <lumag@kernel.org>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
Abhinav Kumar <abhinav.kumar@linux.dev>,
Jessica Zhang <jesszhan0024@gmail.com>,
Sean Paul <sean@poorly.run>,
Marijn Suijten <marijn.suijten@somainline.org>,
linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org,
freedreno@lists.freedesktop.org, linux-kernel@vger.kernel.org,
llvm@lists.linux.dev, Elkin Cruz <elkin@google.com>
Subject: Re: [PATCH v2] drm/msm/dp: Return MODE_ERROR in dp_display and drop dead eDP check
Date: Sat, 05 Dec 2026 20:13:22 -0500 [thread overview]
Message-ID: <03d3e9a6b433be6efdc0ed8841c03574.guodong.xu@oss.qualcomm.com> (raw)
In-Reply-To: <20261201174206.1431879-1-irogers@google.com>
Hi Ian,
On Tue, 1 Dec 2026 09:42:06 -0800, Ian Rogers wrote:
> msm_dp_display_mode_valid() and msm_edp_bridge_mode_valid() return
> enum drm_mode_status, yet both returned -EINVAL (-22) on an invalid
> parameter check for !dp || !mode_pclk_khz || !dp->connector.
>
> Today neither check can trigger because drm_mode_validate_basic()
> rejects mode->clock == 0 before bridge .mode_valid() runs, and dp and
> dp->connector are initialized before mode validation. Keep the guard in
> the shared msm_dp_display_mode_valid() helper but return MODE_ERROR
> instead of -EINVAL, and drop the unreachable check from the static
> msm_edp_bridge_mode_valid() callback.
>
> Found with Clang's -Wassign-enum on an x86_64 allyesconfig build; Gemini
> helped analyze the callers and prepare the patch and commit message.
> Compile-tested on dp_display.o and dp_drm.o with LLVM=1 W=1 (-Werror)
> and -Wassign-enum; not runtime-tested because Qualcomm Snapdragon
> DP/eDP hardware is not available.
>
> Signed-off-by: Ian Rogers <irogers@google.com>
Reviewed-by: Guodong Xu <guodong.xu@oss.qualcomm.com>
Guodong
prev parent reply other threads:[~2026-12-06 1:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 17:42 Ian Rogers
2026-12-06 1:13 ` Guodong Xu [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=03d3e9a6b433be6efdc0ed8841c03574.guodong.xu@oss.qualcomm.com \
--to=guodong.xu@oss.qualcomm.com \
--cc=abhinav.kumar@linux.dev \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=elkin@google.com \
--cc=freedreno@lists.freedesktop.org \
--cc=irogers@google.com \
--cc=jesszhan0024@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=lumag@kernel.org \
--cc=marijn.suijten@somainline.org \
--cc=robin.clark@oss.qualcomm.com \
--cc=sean@poorly.run \
--cc=simona@ffwll.ch \
/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
all inboxes | Powered by JetHome®