From nobody Sun Apr 5 16:33:00 2026 Received: from mail-43102.protonmail.ch (mail-43102.protonmail.ch [185.70.43.102]) (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 3B6883F6614 for ; Tue, 24 Mar 2026 11:48:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.70.43.102 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774352932; cv=none; b=WI8JbU/Nz0hUfzvr8OvPaswviER9yjRvICqJwc8+o3x5n/EMqqeBIijfZWsHkk2xMkQcuCscTzwevIHfIMS+tg0hXiokOK8RtB4eXwwk6hj+FVnFDPnTDD/8wMF4StcXxshSpOy5fUqpAGAgDq8CKyKGqccrdmhVH8fZZBjKG0U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774352932; c=relaxed/simple; bh=gDsFJ1TxNtBfjcx3CiIs7XjGfFNLGNadfmE04Ihg9l0=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=OAf+IDv+1/u1Yyy43rDsMFf21UwADvm7/pbDDAMoeSO3NomlQPQ/FDsrteSp+AoXx6RjL4zbx93JEYPLz76KUl6MSiw++RLvzAShE+kcupQi3oRqgdqhU0UQGScPa3ULWA29db1IA8nGtmUhWnjXQjuqkR4y3fG7eFCSzALhbYo= 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=DjD6K1IV; arc=none smtp.client-ip=185.70.43.102 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="DjD6K1IV" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail3; t=1774352923; x=1774612123; 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=DjD6K1IVe91Wnpkv7CRsxDl7ZH+inPEkt2TQtmAOT6B9aG7I23tzSxfQbHGXB/OqJ wVEPdaUK/wWs95EN0ZdnLkpJVp5ApCIUI6SkLVWwTciCg3k8Yv28+PUd8gv8RW5AsU KjdYl7/j0cwB9W+njdecWXN7SNlrpj5SsHLbUrazieszpOtHqyiuzNWKYs7F4ugHxT LIFdb8Pj7Njt5hQ1R8pDrnh+atEc/5KuPcUwxLttTS3FGx82fPPYdRbvPQe3q4D+j2 3o4w4Jv1tBmC3YJgHdJY6xfM50q7+mRL5WEj8GAgVDUEKIPFvzRFKPbc7qgHaeBUCq 6w0DCTLJZj8Pg== Date: Tue, 24 Mar 2026 11:48:38 +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 v5 4/5] drm/msm/dsi: add DSI version >= comparison helper Message-ID: <20260324-dsi-rgb101010-support-v5-4-ff6afc904115@pm.me> In-Reply-To: <20260324-dsi-rgb101010-support-v5-0-ff6afc904115@pm.me> References: <20260324-dsi-rgb101010-support-v5-0-ff6afc904115@pm.me> Feedback-ID: 37836894:user:proton X-Pm-Message-ID: 674c0e4769b4771254328c607482c756aba46263 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