From patchwork Mon Nov 4 03:27:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13860863 Received: from EUR03-VI1-obe.outbound.protection.outlook.com (mail-vi1eur03on2060.outbound.protection.outlook.com [40.107.103.60]) (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 86F15176AD8 for ; Mon, 4 Nov 2024 03:29:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.103.60 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730690962; cv=fail; b=RP8B1qToNmTLHn70sMpgep6IFxBj1cXXwNOMAH3rUvoiTB5zs4DdMKmVOIfgsKLT45As0lGLeDrs8/I8fUfiqmW4aXGQg0FW2loTzrlx9wLC/LhgTBHHqQKc0Ane+CXUTF21uA6AFqvZzQ/kAFOXzAtcig6HlIUEvwiakY6NTU8= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1730690962; c=relaxed/simple; bh=9p9MVML8v/POfGmmGOMrHKHSXBvIRy9YIR5p+PoCctI=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: Content-Type:MIME-Version; b=B4Psu07cJ1cK3NiLsmjZp5WywYXP9xRNl2xvJtBt02VcNVSGzzAWNcEL/N5xxsKTMtrbuAM8hEFo2eyse4oafeGla0O2vDFCkKtysmvCQljGi0HyMUYlUabB8PWvaTgc2EIDSu/gxspZJ1TaYOQdclghqeJeHesA3knn02XZTGk= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=DBJ6qr7y; arc=fail smtp.client-ip=40.107.103.60 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="DBJ6qr7y" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=xY+eH9CTRjcEvmJb6kA95Asb4sAO1yQIZsGCSwD/U0gIuDJCmWbmhWuK38EgfmzlVDLl/CPkicBcIJVQ2MkY4LOfuqZL3/Yo+ssDknI2Bt+Xg9y0A2A13re7FOsVRx62NS7tnM/cX5i4j1fis9yZd2CQZUwOcNzV3iX3nMnekOrMEKnAn4WJjLNuNqIMSzufK+rAEsxx4bHGBBP2xVcvPxtoecpyAeROcZNoaqHiaIjBVdV8RlAtzicBsVyJcUze60qoWX5HW8Psu0aHR7VeGwpw9pQ1aAtb2bPwtGYKDLiuk07505LDSWz4xjebTQ5XYPQplR8ho0rjxU/2eAyi0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=JL0mXb0RyUjCaD9mY1QBYGt4lvdZd3+bt8lh5XEh3j0=; b=XKHA4DPRz7FLhuso4xIvvC0A3sNF5C3zXd6s7HGAoaFuDUTg5V1MQKWpW0y2llzvcECUVtFDX84PuHd35BdOsBXA6zJcC5KCMQtVcxk/h7O0h5t+rzg+Wy58pq0mxsqzCMjLSv0I6wLr6Xv4NDl00kp4DK+T/o8KIvW2okU3htU04aKyW87jQpFGp6JoQdr18JoQABBfGmzRYb5Wx+j+oKGjfoQzVqP9b6qU67gLJ4T6zH8fl2frPFX5qy7rzatpUU2/vQEvBk0OxLmz7+ORYBtuBrdxRGvWOH9Ko8ItENGaaitA5t0J40yEtlC7iw9rjHA2WsfSZc0LKYAARi1KvA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=JL0mXb0RyUjCaD9mY1QBYGt4lvdZd3+bt8lh5XEh3j0=; b=DBJ6qr7y1HaNiTYbdygyQ+vB4oZ7ka/bTcQR+qXZuUmUYh2XxBrBWydkjG3bNXImCmw/BeDxnk0yrqlwiH2hK+o6Xby8bP4P8PYXSdmKsPAhtQ70nBmFeOTZ7IU4QmuAMpBvekBTVuHUySpmN2x0cSvw2vDJs5BEujBeQDKNNx+QK+1sKtG464HYcDEgmpjFXiQGu3jaXXmtex8qqoUgP4EVdilupnOF5N0hCGt1mvs21mDVWI1BIYztNgm6uaAe2i57znKNd9ZLMO5SZ5M+/9p/ThYztqXm+SswGUnavGBuh5vwEngzNQxd8BcBSWKPaZ5lKkrB0J3dG3I5hbGcHA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) by PA1PR04MB10602.eurprd04.prod.outlook.com (2603:10a6:102:490::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8114.30; Mon, 4 Nov 2024 03:29:17 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::d1ce:ea15:6648:6f90%4]) with mapi id 15.20.8114.028; Mon, 4 Nov 2024 03:29:17 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org Cc: andrzej.hajda@intel.com, neil.armstrong@linaro.org, rfoss@kernel.org, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@gmail.com, maarten.lankhorst@linux.intel.com, mripard@kernel.org, tzimmermann@suse.de, airlied@gmail.com, simona@ffwll.ch, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, quic_jesszhan@quicinc.com, mchehab@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, catalin.marinas@arm.com, will@kernel.org, sakari.ailus@linux.intel.com, hverkuil@xs4all.nl, tomi.valkeinen@ideasonboard.com, quic_bjorande@quicinc.com, geert+renesas@glider.be, dmitry.baryshkov@linaro.org, arnd@arndb.de, nfraprado@collabora.com, thierry.reding@gmail.com, prabhakar.mahadev-lad.rj@bp.renesas.com, sam@ravnborg.org, marex@denx.de, biju.das.jz@bp.renesas.com Subject: [PATCH v5 05/13] drm: of: Get MEDIA_BUS_FMT_RGB101010_1X7X5_{JEIDA, SPWG} LVDS data mappings Date: Mon, 4 Nov 2024 11:27:58 +0800 Message-Id: <20241104032806.611890-6-victor.liu@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241104032806.611890-1-victor.liu@nxp.com> References: <20241104032806.611890-1-victor.liu@nxp.com> X-ClientProxiedBy: SGXP274CA0016.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b8::28) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|PA1PR04MB10602:EE_ X-MS-Office365-Filtering-Correlation-Id: 64ef8586-0fbb-421e-40dd-08dcfc80dcc6 X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|7416014|376014|52116014|1800799024|366016|38350700014; X-Microsoft-Antispam-Message-Info: DtHfB3m34MVaZSH86xEwIcE2S23D07wK0t0Y/R3C9uXk5Ms/9UvEnDe7RgyFewvd0AQ/j2uyjjhcnlSPc1VZlUxNLtwstxaZHpRzFwRDoawgDML0rFMa/7aEXpCs6ArMZ6nMU/qnjVS3xWDp0FALCmVoufclkP7TNFY7Pbh0KIVmOb8a1O2cXlnAJZ0pIqi9rCgfJrkq5iih0plLi2fVpaV8Bi0pQOh9n3014l7/jyN5lqwk71utYrHFapXn1QZWkIKJIQoWgBJ5hqf6w9YEY2Hf71gVbqElDGLF5zfdjaLL0A0KhCZwwXw5cTbya1u63JegwFEfSdN966iNGZbyPmP5gqXNXiNVOBqPJ2otcy85ljXKkmG5/p+PDnFjK1tu3oO+d+HDH7oDqzyNVYMzO69E2tqplR3BehAMCEpnil9jvtjrl79ouX3dbdufwhjGOEqrLjsvxz+Zp7983XYa6B0MRYVmVeH5cGCyq87YknEOuhB7GEuwn7Onv0fKjEU/g53Oba1EUOOayYuyTxlw1DyBhVj7HfkzIcHjl46JCcUrCImnzTzI+yv9iGbv5/AfnHLjTreixp4MyOG6nTuOhbuiKNIh2j2T34Prd7wch09uHSFyD+wIGsHpd9t+IGVC/VtFLqT2yI7UdJ3E0q5YuOa+P+XJSeFipRjzq5ExOoZz9G9zOKGEbP9qL3AgquHrgWhjSkEMYGiwXmmxqcb0nQtUYerkge+TKbIPJMv3e7848lOYm3TBKQ7SjS8fK8fz8FpdG3fTsxvZF3aCcfiQe+HWO1zoFUP5gAW2Gsfth0c5xFMlME+DZXJxaTlsdst1umCNAExf3EaEowLG06l2k6wXw7QGXs86d0IUKIgw2g9ysOAdOM+RS70pG1wa+HZOKTxZP4R2hmS4YvV0+2AJpBmeomry9DyOsbAMSbRrxO8TbVMM1Hea59JHrHY0yb/kePEiymKDZKi2HHP1vv5YtxFIs72Tu1n44VhA+NdCi3idDKQ26P1QNRVnOlkNsFOHCTr3tKopIFOXMQuDZzEAqsa4S2jRGCPatClyRjjGyPtE0ebv3oTumvDFTHDg3B+3HK7dlOtsdEgo1vDVXN89kBG/231MC7o3SWw0xmj54OZSZsXjoEbssBvKYXUAIM+N+em0vv1t17VY37Pzso1YAsZTTTVnLG8eKv1r9luX4v+SiPi7SJkU7WRD7rEXfggc9F64WNiewjKj2vyI9f1W9sy2aEnjMpLVJ3vXDBwu1vmuVew3Mj5VxKPyM0UASiXZOGXh4j6xtTQ4nTbFRre2CgonajO/lR+2Yia4iKEsJeAQmly64tYYjYufoTUkZ4Ej9CejDU3mGBTsiLjy5XU71LUOyhRFjUVVcie/dtzdbcQ= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM7PR04MB7046.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(7416014)(376014)(52116014)(1800799024)(366016)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: +nz46/KhMKHCJPVYBm84Q2USbpnKFMa/vGU1F2Ik8oOU1/07BdWQv2gD0vpeKAuaAJqEgwyDnQHPxjxS5wcz/6wYsQ8k5nEy9d4OkzanyvcDQkJns+lXom4pKMgh7qgx/VRJyN6XbR+4dxmVo3lGyZ6BjXRl72Nq73OiyMD5LaC8QXJ4iyymEYdsZHbmQzR6QQBLXAbkwpmoqiBWc8f9jaNIyf5ZkFUN5uJe/BZzHgkRi3hq2OTZDrC/bnp+n/1SJUqKdMQglVo5CKetp4lyLgT7KI+UlXnRbbF4v7dj4A+m/O/Zr1C35mNbmRmcp9nBnF2g7udkvMlIJ9rPG2viTdGvjzQkfVrSk4rXvSFQ/pqLsZXq5Xakcrjq8JCv+CA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c9IwISCxEeuCV1mGJE6XQHlSzM0LMSi9VLMkaIstUgH//5sUTVTztpxHSsxeI9Buw7LkSYcyd8XfZmoQ+GrFyn+FKUVOJ3i+2FutN3ym+mVf0QA9o/k6v9J/J2 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 64ef8586-0fbb-421e-40dd-08dcfc80dcc6 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Nov 2024 03:29:17.2486 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: SDvq1XXfaZKvx2V/3OKpLZGYHKy2x6OBd2XVqGOYn8iUA0nIiJ/tHkn0tSQLkJJY9khTXUXbZMi8VuGOZR6V6Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA1PR04MB10602 Add MEDIA_BUS_FMT_RGB101010_1X7X5_{JEIDA,SPWG} support in drm_of_lvds_get_data_mapping() function implementation so that function callers may get the two LVDS data mappings. Signed-off-by: Liu Ying Reviewed-by: Dmitry Baryshkov --- v5: * No change. v4: * Collect Dmitry's R-b tag. v3: * New patch. drivers/gpu/drm/drm_of.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/drm_of.c b/drivers/gpu/drm/drm_of.c index 177b600895d3..89863a35c731 100644 --- a/drivers/gpu/drm/drm_of.c +++ b/drivers/gpu/drm/drm_of.c @@ -410,7 +410,9 @@ EXPORT_SYMBOL_GPL(drm_of_lvds_get_dual_link_pixel_order); * Return: * * MEDIA_BUS_FMT_RGB666_1X7X3_SPWG - data-mapping is "jeida-18" * * MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA - data-mapping is "jeida-24" + * * MEDIA_BUS_FMT_RGB101010_1X7X5_JEIDA - data-mapping is "jeida-30" * * MEDIA_BUS_FMT_RGB888_1X7X4_SPWG - data-mapping is "vesa-24" + * * MEDIA_BUS_FMT_RGB101010_1X7X5_SPWG - data-mapping is "vesa-30" * * -EINVAL - the "data-mapping" property is unsupported * * -ENODEV - the "data-mapping" property is missing */ @@ -427,8 +429,12 @@ int drm_of_lvds_get_data_mapping(const struct device_node *port) return MEDIA_BUS_FMT_RGB666_1X7X3_SPWG; if (!strcmp(mapping, "jeida-24")) return MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA; + if (!strcmp(mapping, "jeida-30")) + return MEDIA_BUS_FMT_RGB101010_1X7X5_JEIDA; if (!strcmp(mapping, "vesa-24")) return MEDIA_BUS_FMT_RGB888_1X7X4_SPWG; + if (!strcmp(mapping, "vesa-30")) + return MEDIA_BUS_FMT_RGB101010_1X7X5_SPWG; return -EINVAL; }