From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 32DB9108E1F9 for ; Thu, 19 Mar 2026 11:58:05 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8219510E9AC; Thu, 19 Mar 2026 11:58:04 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; secure) header.d=pm.me header.i=@pm.me header.b="A3HOgA3N"; dkim-atps=neutral Received: from mail-106118.protonmail.ch (mail-106118.protonmail.ch [79.135.106.118]) by gabe.freedesktop.org (Postfix) with ESMTPS id 73FF610E9AC for ; Thu, 19 Mar 2026 11:58:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pm.me; s=protonmail3; t=1773921481; x=1774180681; bh=GG34JKH3bqtgzcVrg1uStZ2u9nut8a8HcOX8Ff5W+W4=; 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=A3HOgA3NifEOlXSCCJpbU3gzq1d6TmKDl0ieT3LIZ5dagDmC4fCB2PVNXmVjzYfbe JXPGgk9PD12TT6mWuAo1YbyRCfTbaVJNFFWZvah6v1846Za0MTRF55tdnlEodlBzv8 Ib3DmZaNIk28tNBeQHE83Q+aukiSuMWY2DbT6dA3l1GVDBLGKTk7YfXbtzBrKbfY6M rC21ChKaWan0bg2hfFeYH9hY/rwfuCGTco7ZLbrEN65ZH9tMy06Z7v+87+2/9CZD5g w+YwdPIraaz2S8Wg/MCPisBYtorqeRJsXF0R0Rfx+7ZrELvnhDm9yCs9z3vjMqCQf2 qV5hb/CXJvw6g== Date: Thu, 19 Mar 2026 11:57:56 +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 From: Alexander Koskovich Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, Alexander Koskovich Subject: [PATCH v3 3/4] drm/msm/dsi: Add support for RGB101010 pixel format Message-ID: <20260319-dsi-rgb101010-support-v3-3-85b99df2d090@pm.me> In-Reply-To: <20260319-dsi-rgb101010-support-v3-0-85b99df2d090@pm.me> References: <20260319-dsi-rgb101010-support-v3-0-85b99df2d090@pm.me> Feedback-ID: 37836894:user:proton X-Pm-Message-ID: 43f2fd514197e1fb7f5ee3e1d109c297a104a6ea MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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. Signed-off-by: Alexander Koskovich --- drivers/gpu/drm/msm/dsi/dsi_host.c | 10 ++++++++++ drivers/gpu/drm/msm/registers/display/dsi.xml | 5 ++++- 2 files changed, 14 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 6fad9a612d4d..65c5b0e904ee 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) { =09switch (mipi_fmt) { +=09case MIPI_DSI_FMT_RGB101010:=09return VID_DST_FORMAT_RGB101010; =09case MIPI_DSI_FMT_RGB888:=09return VID_DST_FORMAT_RGB888; =09case MIPI_DSI_FMT_RGB666:=09return VID_DST_FORMAT_RGB666_LOOSE; =09case MIPI_DSI_FMT_RGB666_PACKED:=09return 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) { =09switch (mipi_fmt) { +=09case MIPI_DSI_FMT_RGB101010:=09return CMD_DST_FORMAT_RGB101010; =09case MIPI_DSI_FMT_RGB888:=09return CMD_DST_FORMAT_RGB888; =09case MIPI_DSI_FMT_RGB666_PACKED: =09case MIPI_DSI_FMT_RGB666:=09return CMD_DST_FORMAT_RGB666; @@ -1705,6 +1707,14 @@ static int dsi_host_attach(struct mipi_dsi_host *hos= t, =09if (dsi->lanes > msm_host->num_data_lanes) =09=09return -EINVAL; =20 +=09if (dsi->format =3D=3D MIPI_DSI_FMT_RGB101010 && +=09 !msm_dsi_host_version_ge(msm_host, MSM_DSI_VER_MAJOR_6G, +=09=09=09=09 MSM_DSI_6G_VER_MINOR_V2_1_0)) { +=09=09DRM_DEV_ERROR(&msm_host->pdev->dev, +=09=09=09 "RGB101010 not supported on this DSI controller\n"); +=09=09return -EINVAL; +=09} + =09msm_host->channel =3D dsi->channel; =09msm_host->lanes =3D dsi->lanes; =09msm_host->format =3D dsi->format; 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"> =09=09 =09=09 =09=09 +=09=09 =09 =09 =09=09 @@ -39,6 +40,7 @@ xsi:schemaLocation=3D"https://gitlab.freedesktop.org/free= dreno/ rules-fd.xsd"> =09=09 =09=09 =09=09 +=09=09 =09 =09 =09=09 @@ -142,7 +144,8 @@ xsi:schemaLocation=3D"https://gitlab.freedesktop.org/fr= eedreno/ rules-fd.xsd"> =09 =09 =09=09= -=09=09 +=09=09 +=09=09 =09=09 =09=09 =09=09 --=20 2.53.0