From patchwork Mon Feb 13 08:56:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 5309 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2240975wrn; Mon, 13 Feb 2023 01:00:43 -0800 (PST) X-Google-Smtp-Source: AK7set8VFsoZuwowO9AKexYXhqnMY61nl0li42myMMhELC37RpwLSUv8l7FSGQq0n6dLmHx4A2+M X-Received: by 2002:a05:6a21:2c81:b0:be:8fb1:9b11 with SMTP id ua1-20020a056a212c8100b000be8fb19b11mr18724019pzb.47.1676278842992; Mon, 13 Feb 2023 01:00:42 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1676278842; cv=pass; d=google.com; s=arc-20160816; b=e55EY3WduTcgobWyMS8h9QyM4uAGB1mhhKpCgeayIAENpFxuzp5nkQ94HzSiOZcE2/ FrKr+7of5OlKyQdnZY0IisKgH4BFV+KUdSbG5JAuPKB8f0C0uEYXKPVLNCITgvF3YiWG wrl83xPIMNScwdjwHtFzA8CalBDbGlD9LIhv/+RaBPBUQXlYlDa8NqW3NZa9ssB9nNrV g2t1QA0YkJTnWpDDMrjol7yoWETxNJpqcHX8NMzXwE6o9LTC7E722+Ca2HepPeR+azgL aS1yi5KDtPibfcKDeWimb6i1nT1mlHTLAytw8yBKumYEgtRjbybUxyMchB57w2gNl/GY 4EBw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :message-id:date:subject:cc:to:from:dkim-signature; bh=QJMm3IOd1DDNx9oNhC8B5KvhlUiTeQv8H4vh3lJzxAY=; b=HvSdvCNN7XxN9i7YNA3voBbHYLfki7Oc79qk/Smz883OfO8A2vC/v22T+h7Yau7TPG rYD1xO3LdDp7UA5yRWxQ0IdZipfKYjLXwjisnJKqgT8F5EHNJG/wzyki2ZpK+m/8idZ1 q9fz1J3W3LMbIzkGS8WzXThSGFjcF2ze9gFpCflT5L3VwcWOCZiFJL0OGVDYCrCSEFI3 GJbuA1CasqKjFHXjAcJGrKqo5g6mPHQLgPoSfmVOyY7WirFDo/9hhzVpzafaaiyL50Pr g9cwoBxXy3CcIijdn1OKSrgkRagHnbbX8fHHUnnvUABCDgZAuvOV7R/X2Kt8U88f9IDo G3/w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b="B/ok7L7e"; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g15-20020a63ad0f000000b004cd1e13283fsi11140467pgf.318.2023.02.13.01.00.30; Mon, 13 Feb 2023 01:00:42 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b="B/ok7L7e"; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230150AbjBMIzV (ORCPT + 99 others); Mon, 13 Feb 2023 03:55:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55896 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230138AbjBMIzP (ORCPT ); Mon, 13 Feb 2023 03:55:15 -0500 Received: from EUR02-VI1-obe.outbound.protection.outlook.com (mail-vi1eur02on2048.outbound.protection.outlook.com [40.107.241.48]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 81BBC13DFA; Mon, 13 Feb 2023 00:55:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RalFhc2LssZ3kb+u4s62QIHaOXTdLHPDRYnd2kuA7RjuYnkxYOFUyO14GN+DLx2w+tqRoH25DZCO3cBWcDhvHFkihs5ArqFH6uSeZOmz8K+zqnxwcg0rYUSzDf3wucBZS5p78IUz1YCEUybhtcb5C8G0Tuy65Gv7ywlcUKg+vfa56tDN5Oxq5AcMcQcAu88a4boUfocQSTzjPW0cXphw+l1Y4bk1TTW+Fafm8s9FCK95U9KG1q5T6mNos4+V3Tt0i9lWCdBwLS7dfwNBKT4pSksxn5DBPN049LuS3gcnJIZI/B2QkygE5yoaXWbfpk2r1Nbh3zcCVOGr1zN7oDXMOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=QJMm3IOd1DDNx9oNhC8B5KvhlUiTeQv8H4vh3lJzxAY=; b=hokUwqrEhMd+05jw7nF9v8Ws8903JwmbNC0Ym3EpOoJPtmEfsO0wcEwgEvOX861JFQVHBfWyIF/V5btTqbZRpcBl/UK7yj/BOgIyYFj1+klMbQNgvMap9VojGWDTUgRb82yTAagdOsKwjSbmWFhl2eapkI5MxtbDtIUYYHH7rkYy855CT72L9vIJMXxu6TWghKeoyvbCVsiQn4zzgcS2uxJQrk74PN85e/bSgJZOfbnAeATy5o65wq7SSMEvDeiXJpXblMBRIq7KoTOouiRM5DMWgVT+SIXHDrExWlZdzgI/OL/GGyjxKe9PJZvUS+1ySb0ltjP+6hpCuuNYQyyrsw== 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=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=QJMm3IOd1DDNx9oNhC8B5KvhlUiTeQv8H4vh3lJzxAY=; b=B/ok7L7eWPIRQPJ98ToElotqhRWL7AvnJGo4AO1V677wFnFu0NkefYzTo3o6oph2nrznqVrRmycCzpg8nRdrE/zSi1KDfVeO02eHTeJrua+5sd8A8slvyu+sl+FiuRmLC+kp2QOmyDWKxx1parDrxoRHpGLvgOLh72ez+4i2aZ8= 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 GV1PR04MB9135.eurprd04.prod.outlook.com (2603:10a6:150:26::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.24; Mon, 13 Feb 2023 08:55:06 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::5725:92ec:f43e:f5fc]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::5725:92ec:f43e:f5fc%9]) with mapi id 15.20.6086.023; Mon, 13 Feb 2023 08:55:06 +0000 From: Liu Ying To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: marex@denx.de, stefan@agner.ch, airlied@gmail.com, daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, krzysztof.kozlowski@linaro.org, LW@KARO-electronics.de, alexander.stein@ew.tq-group.com Subject: [PATCH v3 0/6] drm: lcdif: Add i.MX93 LCDIF support Date: Mon, 13 Feb 2023 16:56:06 +0800 Message-Id: <20230213085612.1026538-1-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 X-ClientProxiedBy: SI2PR01CA0009.apcprd01.prod.exchangelabs.com (2603:1096:4:191::18) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|GV1PR04MB9135:EE_ X-MS-Office365-Filtering-Correlation-Id: ec7c285b-248e-4faa-e76d-08db0da000e4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 0g3pMP7ZLkoZidsGlSi0rAMYcqTGcUYLGyXDANIVprbl3NH2078MO3y4q3LpJiVq5g2sRb7udwHjCbTJlR9W3SkCVmUcDuisg6CS/e6GVtTuM4NopG/lVDEt9olLwLGUTBvfwXB1srlJHtRtP3pXLxaiOchu2ITqJE8Aw31jGPyVzwl/5aGPmryKHW1sh3o0HrpE6eXdGhPZW4LOfWChZ/DfgG00g/yHW58N2jfyUoSNWVHeKgJp/1UNAzRRCAZw3AHp+dRA+gEZ/0FqFxZE5b+0ymf9KqHbn8saOBJQazY9lRiFerjZ2hfC4xLDoTkxlBJqkvkZVQS0NUtsMShLV/zUMlJzrsknbxkBEsKsRT049mYPNYMeqR9inQxQVJFl0OYTcZK0BV6UhMPIuxaKENX0yjf4nwEgHXGBSfYlkYjK093B8TPgi+bRehvy3WHTnAb/Kkajz81o2B3VHBdSmQeUwjIeJhptjgWgIkjtzQG6auoBOROlcSs5VrF/QMnm9y2cxzIMB7fWwuSSkBUhlSiPIvbqw8xDFcDPMhkV3tblryFJ5bPiQ1HI9hICZBRoYK1hc406vQBK5e8nLrLZ2hzirwm397qqqkY9GvNYBmFAA3llimxYtCGnIXzav+/6BJ44tVHoXDdAkwuNcCZukIcJzKSh/aP0/F7/vbYRY8pTifAJWOpw7cUl/wH2pkdb82WPNVU22oXGEPOkSzqgpA== 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:(13230025)(4636009)(366004)(376002)(346002)(396003)(39860400002)(136003)(451199018)(26005)(186003)(86362001)(83380400001)(36756003)(52116002)(6486002)(316002)(6512007)(1076003)(6506007)(2906002)(38100700002)(5660300002)(38350700002)(478600001)(2616005)(8936002)(8676002)(7416002)(66556008)(66946007)(66476007)(4326008)(41300700001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: C0wp2T5nOEkyXDYXPqkt9AFp51GB/KcJ2KCLkKowJinRMy4n908saPRin1crAxcuQwoyH52z7O4/9ujlVfUa7UhFfhdpbwiItQgUfOQHT0ulCn7RF/1ns5aduPkeqjTeCvEoANeRKoHh/HOKwedtJadI15jmitvgumutZJMlnQdat7aJRgtQKak9jbvZbXQ9RHul/cMkwqioBesEHrmYLw5XRNZJ/paPFylJWGVse/ljgsqP8dL+xiWYF17PG6HujEDMb7F/l0bts0TjwgB1UAoJ1644XuZDcJhn6J5Hgc0aFuQ3bzjeUBlfnkRo/WH1d25YZNIL9c5SpSUzhWnnbcN40Xi2Vu7LTJtW9/Z6tKVrrZUHntq12l8lobLfvzv8oqc/MZ7Wt7faVqwarTuKoyufLLieRGzBlcsRTt4c5V1LV1li8VN7W7TL3W3/Z95jpvhevCJDH3f+woHyZJcadWl7e7dFdWW2Zf94KX70R+v5GNhJzU921IMwbjq+icANz06UClpEPLm34WaHFyno3lSPOEo2ySiiYIKyBh3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ant-Network-Message-Id: ec7c285b-248e-4faa-e76d-08db0da000e4 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 13 Feb 2023 08:55:06.6642 (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: T5yeg+CCOZI3Ggq8w+tiV9NHVHHH0EH9c5AN/jLNgoR+ugVmeKYGg/ySgfCMC69gIIxd+VZ9I4Jh3UOMJWODKQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR04MB9135 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1757705763961893083?= X-GMAIL-MSGID: =?utf-8?q?1757705763961893083?= Hi, This patch set aims to add i.MX93 LCDIF display controller support in the existing LCDIF DRM driver. The LCDIF embedded in i.MX93 SoC is essentially the same to those embedded in i.MX8mp SoC. Through internal bridges, i.MX93 LCDIF may drive a MIPI DSI display or a LVDS display or a parallel display. Patch 1/6 adds device tree binding support for i.MX93 LCDIF in the existing fsl,lcdif.yaml. Patch 2/6 drops lcdif->bridge NULL pointer check as a cleanup patch. Patch 3/6~5/6 prepare for adding i.MX93 LCDIF support step by step. Patch 6/6 adds i.MX93 LCDIF compatible string as the last step of adding i.MX93 LCDIF support. v2->v3: * Fix a trivial typo in patch 6/6's commit message. v1->v2: * Add Krzysztof's A-b and Marek's R-b tags on patch 1/6. * Split patch 2/2 in v1 into patch 2/6~6/6 in v2. (Marek, Alexander) * Drop '!remote ||' from lcdif_attach_bridge(). (Lothar) * Add comment on the 'base' member of lcdif_crtc_state structure to note it should always be the first member. (Lothar) * Drop unneeded 'bridges' member from lcdif_drm_private structure. * Drop a comment about bridge input bus format from lcdif_crtc_atomic_check(). Liu Ying (6): dt-bindings: lcdif: Add i.MX93 LCDIF support drm: lcdif: Drop unnecessary NULL pointer check on lcdif->bridge drm: lcdif: Determine bus format and flags in ->atomic_check() drm: lcdif: Check consistent bus format and flags across first bridges drm: lcdif: Add multiple encoders and first bridges support drm: lcdif: Add i.MX93 LCDIF compatible string .../bindings/display/fsl,lcdif.yaml | 7 +- drivers/gpu/drm/mxsfb/lcdif_drv.c | 71 +++++- drivers/gpu/drm/mxsfb/lcdif_drv.h | 5 +- drivers/gpu/drm/mxsfb/lcdif_kms.c | 202 ++++++++++++------ 4 files changed, 207 insertions(+), 78 deletions(-)