From nobody Sun Apr 5 16:32:59 2026 Received: from mail-10629.protonmail.ch (mail-10629.protonmail.ch [79.135.106.29]) (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 327D43F7A80; Tue, 24 Mar 2026 11:49:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=79.135.106.29 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774352945; cv=none; b=irUkjRYWh+7KZvwMrlPThmUH9jxZikvmGcy+4PWeEb7mlXlgyl57Gv48FwgjrvnasaNk+nUI+j/P/kADY0iPDtiwYEqM0m4J0b4uKoZ8yTR3l7cr5f0x7RN+gFZCky1izk/VY5hBjoTRKW5wHAnfz/N3QnljwZowZsnVfHdj33g= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774352945; c=relaxed/simple; bh=vLvgdi11VHKEU4eD6ghhcLjRoMzvQXs89IwaX9Ze+jk=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=nz6I7F2QHBbJYvNZQ9MrYffKhjo/sPa0+KdP/MHPOGMbCjfQ08OaUc/HTXx038UQkGX4U33bTTKTEA4Zf11BapS+AkQG5FY6Pu4UlrVWtKwPCtSfbzxXjSNa816UyaNAyCP2QEs77OAB5oN5Cmh78R897htZSNK1I7E1tWcTzQw= 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=TtcY3tm4; arc=none smtp.client-ip=79.135.106.29 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="TtcY3tm4" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail3; t=1774352937; x=1774612137; bh=Fy41l+CjiLxNPt1yzWCa9yREYcMW6OvI12kT5kkLAYw=; 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=TtcY3tm4izlAS15nSq8Hs6ZPAm56+k3IEtsZ2JHiqlwUaD+TeYISztpIeXE651GGo xbkwQLOhTTVg46bz1aq2Nm+pNV0UK6t5MOGv6DFk67sHiLJrwFfdxXwwZrdXlKlh8y j0BMl8r8kHlKj3i3WoIBifCNCNU0VJN6JnN+pbN6U2yMi77HwgXPUblgExuMcdR4RW Pw9qf42iRZDDgUnLbuNbOXkCNDKdIj2pFbVaIdUhTl7AwXO6Q3Y/9pn9HZSWYrNcJM /v+b8mBvZ2uBieKZIhgutpsfX4Ad3ZoNL0IVeU8Crs/h74GcjEHe1hITPk7UOWiyym bRfgSWumsvrgA== Date: Tue, 24 Mar 2026 11:48:49 +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 5/5] drm/msm/dsi: Add support for RGB101010 pixel format Message-ID: <20260324-dsi-rgb101010-support-v5-5-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: 28fd0706425e97bd489645195d5853b55e9e1c64 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 video and command mode destination format mappings for RGB101010, and extend the VID_CFG0 DST_FORMAT bitfield to 3 bits to accommodate the new format value. Make sure this is guarded behind MSM_DSI_6G_VER >=3D V2.1.0 as anything older does not support this. Required for 10 bit panels such as the BOE BF068MWM-TD0 found on the Nothing Phone (3a). Reviewed-by: Konrad Dybcio Reviewed-by: Dmitry Baryshkov Signed-off-by: Alexander Koskovich --- drivers/gpu/drm/msm/dsi/dsi_host.c | 22 ++++++++++++++++++++++ drivers/gpu/drm/msm/registers/display/dsi.xml | 5 ++++- 2 files changed, 26 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/msm/dsi/dsi_host.c b/drivers/gpu/drm/msm/dsi/d= si_host.c index b55ffe2fdec3..992407bbea84 100644 --- a/drivers/gpu/drm/msm/dsi/dsi_host.c +++ b/drivers/gpu/drm/msm/dsi/dsi_host.c @@ -757,6 +757,7 @@ static inline enum dsi_vid_dst_format dsi_get_vid_fmt(const enum mipi_dsi_pixel_format mipi_fmt) { switch (mipi_fmt) { + case MIPI_DSI_FMT_RGB101010: return VID_DST_FORMAT_RGB101010; case MIPI_DSI_FMT_RGB888: return VID_DST_FORMAT_RGB888; case MIPI_DSI_FMT_RGB666: return VID_DST_FORMAT_RGB666_LOOSE; case MIPI_DSI_FMT_RGB666_PACKED: return VID_DST_FORMAT_RGB666; @@ -769,6 +770,7 @@ static inline enum dsi_cmd_dst_format dsi_get_cmd_fmt(const enum mipi_dsi_pixel_format mipi_fmt) { switch (mipi_fmt) { + case MIPI_DSI_FMT_RGB101010: return CMD_DST_FORMAT_RGB101010; case MIPI_DSI_FMT_RGB888: return CMD_DST_FORMAT_RGB888; case MIPI_DSI_FMT_RGB666_PACKED: case MIPI_DSI_FMT_RGB666: return CMD_DST_FORMAT_RGB666; @@ -1713,6 +1715,26 @@ static int dsi_host_attach(struct mipi_dsi_host *hos= t, if (dsi->dsc) msm_host->dsc =3D dsi->dsc; =20 + if (msm_host->format =3D=3D MIPI_DSI_FMT_RGB101010) { + if (!msm_dsi_host_version_geq(msm_host, MSM_DSI_VER_MAJOR_6G, + MSM_DSI_6G_VER_MINOR_V2_1_0)) { + DRM_DEV_ERROR(&msm_host->pdev->dev, + "RGB101010 not supported on this DSI controller\n"); + return -EINVAL; + } + + /* + * Downstream overrides RGB101010 back to RGB888 when DSC is enabled + * but widebus is not. Using RGB101010 in this case may require some + * extra changes. + */ + if (msm_host->dsc && + !msm_dsi_host_is_wide_bus_enabled(&msm_host->base)) { + dev_warn(&msm_host->pdev->dev, + "RGB101010 with DSC but without widebus, may need extra changes\n"); + } + } + ret =3D dsi_dev_attach(msm_host->pdev); if (ret) return ret; diff --git a/drivers/gpu/drm/msm/registers/display/dsi.xml b/drivers/gpu/dr= m/msm/registers/display/dsi.xml index c7a7b633d747..e40125f75175 100644 --- a/drivers/gpu/drm/msm/registers/display/dsi.xml +++ b/drivers/gpu/drm/msm/registers/display/dsi.xml @@ -15,6 +15,7 @@ xsi:schemaLocation=3D"https://gitlab.freedesktop.org/free= dreno/ rules-fd.xsd"> + @@ -39,6 +40,7 @@ xsi:schemaLocation=3D"https://gitlab.freedesktop.org/free= dreno/ rules-fd.xsd"> + @@ -142,7 +144,8 @@ xsi:schemaLocation=3D"https://gitlab.freedesktop.org/fr= eedreno/ rules-fd.xsd"> - + + --=20 2.53.0