From nobody Mon Apr 6 09:13:59 2026 Received: from mail-05.mail-europe.com (mail-05.mail-europe.com [85.9.206.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 611BA3451CC; Sat, 21 Mar 2026 07:53:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=85.9.206.169 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774079588; cv=none; b=CEPg51T0XmL/kXq39LYkRyVoQmR2gm/xV5/0qdwaf8Kz9osleatVSX6x2hlXAzxkHXiS6op3hW+iIs+Ps68jsZuKS6Wcl9uQpV0IFHqqxYKOMBjEZzrtGipepAmH6j7g7COiwKZz1dQSzfxFQxL/m67uhLwWfIb4CzADH8H51Sw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774079588; c=relaxed/simple; bh=gDsFJ1TxNtBfjcx3CiIs7XjGfFNLGNadfmE04Ihg9l0=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=KB+5PDgOeGtJAzloFT/7ktBg6mnsueG9EDfe8bsYs4if98z+3XtH4Cl0U/q6bIcwgC7tvAJJN96+1hYRscO4TzAR55ih5VRpIVU6qW89fJlHY0p8VR8NEEOKQOaKeljFNfJ3FBdlrEYTh4buMpoK1mFSATiJScvaPtzBNO4GqYU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=pm.me; spf=pass smtp.mailfrom=pm.me; dkim=pass (2048-bit key) header.d=pm.me header.i=@pm.me header.b=jB/Sy4aF; arc=none smtp.client-ip=85.9.206.169 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=pm.me Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pm.me Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=pm.me header.i=@pm.me header.b="jB/Sy4aF" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail3; t=1774079571; x=1774338771; bh=GXIrZ2JeBYt7lvRrjXt7T5FwWusy32QKCFn/6PrHSYY=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=jB/Sy4aFU4bYROKDZO6trbv16jvGwLbuXAMSwKZvdgBKyG+jDhoKqIcvCX4vnWIPM zdzANg6OAY201s7xjeU2ILkSpRhaI7PkTEy5slXkTPGN1hmvIieFEdjr5g5k0X/Zhb ORElhunBjYRfiSSLVJn5xZbhNe5TM9FYhrai1mrdIlXw5NqLDm0PXydM43dz45Rs2n bA8zVphKpaalPxNoemc/U5wL4wrJcS18Q7HHcsbIhdvBvDvAw8uVgHY2hXInVF8R6i H/GutRBI5DVec8rxlAVi4yJztLacvy7mTtUvj573ud9cpALMSi/Y+0ocAbc73urT8Y obCIZFCA5jRNA== Date: Sat, 21 Mar 2026 07:52:47 +0000 To: Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , David Airlie , Simona Vetter , Rob Clark , Dmitry Baryshkov , Abhinav Kumar , Jessica Zhang , Sean Paul , Marijn Suijten , Jeffrey Hugo , Neil Armstrong , Martin Blumenstingl From: Alexander Koskovich 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 , Konrad Dybcio , Dmitry Baryshkov Subject: [PATCH v4 4/5] drm/msm/dsi: add DSI version >= comparison helper Message-ID: <20260321-dsi-rgb101010-support-v4-4-eb28ecebbfe8@pm.me> In-Reply-To: <20260321-dsi-rgb101010-support-v4-0-eb28ecebbfe8@pm.me> References: <20260321-dsi-rgb101010-support-v4-0-eb28ecebbfe8@pm.me> Feedback-ID: 37836894:user:proton X-Pm-Message-ID: 2b0c9cedaf796717b0cb0c1a53938aef4991d5a7 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Dmitry Baryshkov Signed-off-by: Alexander Koskovich --- 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/d= si_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); } =20 +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 =3D=3D major && + msm_host->cfg_hnd->minor >=3D minor); +} + bool msm_dsi_host_is_wide_bus_enabled(struct mipi_dsi_host *host) { struct msm_dsi_host *msm_host =3D to_msm_dsi_host(host); =20 return msm_host->dsc && - (msm_host->cfg_hnd->major =3D=3D MSM_DSI_VER_MAJOR_6G && - msm_host->cfg_hnd->minor >=3D 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); } =20 static void dsi_ctrl_enable(struct msm_dsi_host *msm_host, --=20 2.53.0