From: Alexander Koskovich <akoskovich@pm.me>
To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
Rob Clark <robin.clark@oss.qualcomm.com>,
Dmitry Baryshkov <lumag@kernel.org>,
Abhinav Kumar <abhinav.kumar@linux.dev>,
Jessica Zhang <jesszhan0024@gmail.com>,
Sean Paul <sean@poorly.run>,
Marijn Suijten <marijn.suijten@somainline.org>,
Jeffrey Hugo <jeffrey.l.hugo@gmail.com>,
Neil Armstrong <neil.armstrong@linaro.org>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org,
linux-amlogic@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
Alexander Koskovich <akoskovich@pm.me>,
Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>,
Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Subject: [PATCH v4 4/5] drm/msm/dsi: add DSI version >= comparison helper
Date: Sat, 21 Mar 2026 07:52:47 +0000 [thread overview]
Message-ID: <20260321-dsi-rgb101010-support-v4-4-eb28ecebbfe8@pm.me> (raw)
In-Reply-To: <20260321-dsi-rgb101010-support-v4-0-eb28ecebbfe8@pm.me>
Add a helper for checking if the DSI hardware version is greater
than or equal to a given version, for use in a future change.
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Alexander Koskovich <akoskovich@pm.me>
---
drivers/gpu/drm/msm/dsi/dsi_host.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/dsi_host.c
index db6da99375a1..b55ffe2fdec3 100644
--- a/drivers/gpu/drm/msm/dsi/dsi_host.c
+++ b/drivers/gpu/drm/msm/dsi/dsi_host.c
@@ -782,13 +782,21 @@ static void dsi_ctrl_disable(struct msm_dsi_host *msm_host)
dsi_write(msm_host, REG_DSI_CTRL, 0);
}
+static bool msm_dsi_host_version_geq(struct msm_dsi_host *msm_host,
+ u32 major, u32 minor)
+{
+ return msm_host->cfg_hnd->major > major ||
+ (msm_host->cfg_hnd->major == major &&
+ msm_host->cfg_hnd->minor >= minor);
+}
+
bool msm_dsi_host_is_wide_bus_enabled(struct mipi_dsi_host *host)
{
struct msm_dsi_host *msm_host = to_msm_dsi_host(host);
return msm_host->dsc &&
- (msm_host->cfg_hnd->major == MSM_DSI_VER_MAJOR_6G &&
- msm_host->cfg_hnd->minor >= MSM_DSI_6G_VER_MINOR_V2_5_0);
+ msm_dsi_host_version_geq(msm_host, MSM_DSI_VER_MAJOR_6G,
+ MSM_DSI_6G_VER_MINOR_V2_5_0);
}
static void dsi_ctrl_enable(struct msm_dsi_host *msm_host,
--
2.53.0
next prev parent reply other threads:[~2026-03-21 7:52 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-21 7:52 [PATCH v4 0/5] drm/msm: add RGB101010 pixel format and fix 10-bit DSC timing Alexander Koskovich
2026-03-21 7:52 ` [PATCH v4 1/5] drm/mipi-dsi: add RGB101010 pixel format Alexander Koskovich
2026-03-21 17:12 ` Claude review: " Claude Code Review Bot
2026-03-21 7:52 ` [PATCH v4 2/5] drm/meson: handle RGB101010 in format switches Alexander Koskovich
2026-03-21 9:37 ` Neil Armstrong
2026-03-21 17:12 ` Claude review: " Claude Code Review Bot
2026-03-21 7:52 ` [PATCH v4 3/5] drm/msm/dsi: rename MSM8998 DSI version from V2_2_0 to V2_0_0 Alexander Koskovich
2026-03-21 17:12 ` Claude review: " Claude Code Review Bot
2026-03-21 7:52 ` Alexander Koskovich [this message]
2026-03-21 17:12 ` Claude review: drm/msm/dsi: add DSI version >= comparison helper Claude Code Review Bot
2026-03-21 7:52 ` [PATCH v4 5/5] drm/msm/dsi: Add support for RGB101010 pixel format Alexander Koskovich
2026-03-21 17:12 ` Claude review: " Claude Code Review Bot
2026-03-21 17:12 ` Claude review: drm/msm: add RGB101010 pixel format and fix 10-bit DSC timing Claude Code Review Bot
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=20260321-dsi-rgb101010-support-v4-4-eb28ecebbfe8@pm.me \
--to=akoskovich@pm.me \
--cc=abhinav.kumar@linux.dev \
--cc=airlied@gmail.com \
--cc=dmitry.baryshkov@oss.qualcomm.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=freedreno@lists.freedesktop.org \
--cc=jeffrey.l.hugo@gmail.com \
--cc=jesszhan0024@gmail.com \
--cc=konrad.dybcio@oss.qualcomm.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lumag@kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=marijn.suijten@somainline.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=robin.clark@oss.qualcomm.com \
--cc=sean@poorly.run \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/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