From patchwork Wed Jan 25 06:40:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13115011 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 32F1FC27C76 for ; Wed, 25 Jan 2023 06:40:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=iMLZOaMBbMvES6xTFX+Y3oKPiSRfs4EVZUHXNUus2u4=; b=wVvULkt6Fof2MP JpzMbbGvX7LVyVeUG7ueeb9J3zZ+1Q7v8ZzV5DKZcv70iWElmatPMsJIbNWx3xxe20a5xQwjen1uQ afq5cWKWmJl/ExhJcUF7AAvPW/ceg7PbQjJQ41fsiDQwAXG+1Nsiq8WReRwwTd2wj4SJIoJ9mKVUO 32Evg7Fgi9koHx31Im5rnHnXpxbhNYjqCI+nHob1pJSf7OdkxADs61pL/MvbFWtkl8TId30QjmuM2 XGj//BzVEAzJ4ZR2Vcb7CG+0WhMTlMkBjJ+hU7+P/0/mmiY1WP/aSZjJwp23RmR4VO3G1bSv/WRin QvmdiaoUreCg3T+kZsRA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKZRa-0068aJ-FV; Wed, 25 Jan 2023 06:39:38 +0000 Received: from mail-db5eur02on2061.outbound.protection.outlook.com ([40.107.249.61] helo=EUR02-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKZRQ-0068Wo-F2 for linux-arm-kernel@lists.infradead.org; Wed, 25 Jan 2023 06:39:29 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MQTR7EYvWdb4Dg3vfJ8ZTtZeLyC4LVf188DYusDCn0AujS3XrmW4rRc82KumRFfGdH7alwucXmh1KinJSHna2y7HxfFeC2Y52XWOxHGuW6sz5kHtnnCW4DDtHffzKXvLKDAUU/BmIA49v7/31SqOjdpH5ahUZI2i7mwwrjp8AM2j385Z3BmiSFF0sKGaGrAz/cXSdlBm1Uwufz5vZ45JZNPdloS0f1b2tDMdPFIIx7Q9cQXOE9t9acuKkPIqZ8DZKYnEnpZByL9RuNQkm05H3LTg1VGMIVIBQo2k/hVUy0hnbwtlYKmVK4/slso3zmgMigLSOvcKYkeIj/4BaXW1cw== 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=pq+cFXD7FBBQCU6mFRvSqHGaz7C9gb9wkJtW/XzzXcc=; b=hcBGPWF6/GlKoTxxKxhaqcb/Ah9ISNbwjl0LM5ppC7SkqIjwYHQORzBi1TMNmrhmjXsAXlUSs7hNiQN8ccFZ2G4ykTTu9F+3KqdKAjiqA50NlkxAy281jXBg2bA+HVSjmuDsSApohf8dYXwn+S5dtT5wVndmF6FMxP29U2xPbe7Lb5+AZaBLfvL4i87lzG9+/eS50cz54nfcDd1qRGpOFOLVE87meHxCq0urubg2HfoB96rcl2C41cqPpiikrSWqFpF60gwOenslJVJpfzaqvlCokrFNS3E5XSphtPMMU7bKKwGu2b0Y8PQ/KTi5UQQtxszDpYoGtI08Fs+dcdvagg== 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=pq+cFXD7FBBQCU6mFRvSqHGaz7C9gb9wkJtW/XzzXcc=; b=GEgO+MuNoP81iapYprCvtJC3QUX1a6k6Adqsha73xZprV/BcxSf+D2Hg4YewUAq2YpjSXbEoxey0tzhJ9/XZ15Pu6NmeMUqlhftChTo0N3eJncg7ahqYNtVErXhQMGGIGFrXxLIluMVzMKjE0eTjtTIG+uA1kVbXtAJXcuQ5B60= 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 DB9PR04MB9425.eurprd04.prod.outlook.com (2603:10a6:10:36b::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.33; Wed, 25 Jan 2023 06:39:25 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::5725:92ec:f43e:f5fc]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::5725:92ec:f43e:f5fc%7]) with mapi id 15.20.6002.028; Wed, 25 Jan 2023 06:39:25 +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 v2 1/6] dt-bindings: lcdif: Add i.MX93 LCDIF support Date: Wed, 25 Jan 2023 14:40:25 +0800 Message-Id: <20230125064030.1222121-2-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230125064030.1222121-1-victor.liu@nxp.com> References: <20230125064030.1222121-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR02CA0073.apcprd02.prod.outlook.com (2603:1096:4:90::13) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|DB9PR04MB9425:EE_ X-MS-Office365-Filtering-Correlation-Id: 23119361-6b99-4666-ab4d-08dafe9ee677 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: VmQesd/pZVy+9q00H/nJ2LOiRKTs7yavORN2oZ0UVXQ5a/Alb2qOkUH8wer8aJlQVrd5KKwfalrfeyy3JOinF0omvCIwzoPCDNxxyVV79FLduaj/lsfSRELpHbkWfYqpcOTD+awQiNhrPBEqAc71UaClW0iq7r3t/wH3eVB8cvGf5dkIvvKMytMsKVMgzgJV4ssL8sCJ82pXgjlOJ7Sp7J+0aK2m/1d7fNUKyjB6Wbp0QU4fJBt9++aTk0h3IFJZH52vZeS4U5RLmLK/CzC8MBYsAYtyT/RbMsLYmCf/k9mO8oOmluJOYxC0zuaNVbkUeVSocI0+Gji1XsfrV3VQhpPXARZipAuZH1z2a9LuxDGmwSXHN8gUqSusNZPxilKAxdnFxNJpNAyK8j1lRiKASr/gmSWq0BmsCsdfvjbMxJrWNdIhfCzwTwIKYtEeG2JR0MwQjsjRl6Biz20s5MBCBznjoGbfTD8FBQeQmFIXnreu2283d2DhVMDu+MTxgq9JUlcGJ6oS2o+B6XDVtCknavjTQoAa5rg7cmOb7WKOlq30Y/fNrEv9H1LqVwNIHFlBtFLu771cQTxunwg1xtsFuFdm9qvII6fk+sL7nkwkEAGl6qT2sjoGvvIfpdsOZemTWXfgz/PfPJ0VdnBuw7gEgEAg+AKHE9BVLyhozTOMFnvtfQHovabWHtOOGRhAd0EBwDvNpuhamIxPk41upiEKfQ== 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)(136003)(39860400002)(396003)(346002)(376002)(366004)(451199018)(36756003)(1076003)(38100700002)(8936002)(316002)(5660300002)(38350700002)(2616005)(2906002)(4326008)(86362001)(66476007)(6512007)(66946007)(8676002)(66556008)(41300700001)(83380400001)(6506007)(26005)(6486002)(478600001)(52116002)(186003)(7416002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: dx/Cug6BmatsQQbnhpmP+3v5EfP7M3KPNSyt7s1BOUfeu7sgun3olc20EH8K9nB6nYTa5jc4R8zRlvAWfazLh7RhQ6ndXluUJt9Ld1B9dzEvY3BOWqKeQgj//j3sqt7vRMFGEQ6r5CnMFm8tCvR01YaroN11vCm7P31H3XeU52+7PIlTdqFQIs+XI1KS64iEBxHTn2VkMnN0ek1OWRAWPFtkbMueFBEI52p0DsA4gqYzgbVJjvwcprQrj7ySJPAYxySuFZOa/HcOtUptxM9MYOaL0xqRii2eKM6R1HAesSXNIlCCn7RabhYi/THumuwaEzGCVv3tuDCjRx9AfVGy71DraYGzrgeHpMdtk50pjjejuVY/dfL6yw1yNGmlZ212OvQem3o5BbB7RBOdM19EdyFPwWATJbOkwOLpACrFSX1uw1GKtP6LetdDJ5UlEUFPPjde2bxtg9rMUBVhHimzGACAw0yok/k6Hu9cyx3eVtCty8l1cQYaLd+1LfVkynAxBUhP2Mfuz8WsYyt2PwrJqjjONrZanC1l3yX3KRit94ykKuFBGqMXxOke55w888GRftTfilmLbXS9iRTfhTaiSLXKuN4kpzbklHNZ+fCZfvULCLMtg0IWaYntdZHwsInIGJA5eE9clvBb71ooRFvjMpxPmTSoWSew7nusKaHUXcEkOT9khmshMASNWy1JN/qUvbDd6WJYOymby6NhJ6dYYic7mSkDKT81+KXlfBd3rW4qMq/y74qkzL3SFYWjXz5lgj9hOtYXeBq2SG67B6vJDD7FjdguAE8o1dCseb5au7sWbrSndRzJ+82wrrprbJnbu5DI0jav0bUwnbC0D9ToUoxv33OgtNw6szByb3RvsiPD34v/U+b2+jo6Ia11XxnuNHo8qZdBmDZCW0OLx26DGIVK+MhxcGpCGMvhiUli28RD6Snu4dmFTVjGapwde4LnufFUcMXad4+3XScs1ZQzwpVETHNxMTJ22ITL0P9aY38SF2eQhbbn7WZ6E782eg8NUvfGGKyxAbqHl7ykpde3lZOGmYzn7rTYq99MGvs1yUDej+J/wsG2toGwpAA1wAt82limf/togfTkfqndPP7lLojTF6fkfuZRbyZ7+5H1jF6fuYcJsfJlzSjEwipfvVhia3BQo1IiHSq3503FVKi+XEQ/CnFbirbNQVgkkoDigUiwrFLOpwy/ZOZVvJnFGuf4wlQWWA4FQ7QXH5ffsc+dCZPayMM9Acex5GFwYdfYIBQBvbOw1MogwqnlweLURaauTpTNE7Pl++XELiW2mDAVj/UfnIC1IvLRbNvlYRvtVfwo5SgkfePdTMqZQIIN196Dgv5PinZvQaKPQbPfYbWLvj46LUjvTrZNUmvZ6SpMwv4yvFCTdylB44lt4Z4RhTWQcLYnqdhTVqGCT3p4fbClcC/mcW4CBOUuHnzJLI/BgE+QTV6Kogp9QletksYtDuysK0JnyvHioD5Ao4qmxRbXRisu3dDAKp/m9KWAEuswd762B5LZurKqhRpbOmdoxLw+L9rIJMjUY3U6avJdATAf8z4RwIlzDgzf1Li0NN697FQgu3ATnrgwlRsHR6f11ynW X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 23119361-6b99-4666-ab4d-08dafe9ee677 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jan 2023 06:39:25.3892 (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: PdxTfgWj3M286gPCm+yW7JBt1kDq3osFt7mTu1dT4j5Gnzf3YqOlFFCKQn5cCqke5oMCUQDR0RCgMSVitje3Yg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB9425 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230124_223928_528740_C72A190A X-CRM114-Status: GOOD ( 10.81 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org There is one LCDIF embedded in i.MX93 SoC to connect with MIPI DSI controller through LCDIF cross line pattern(controlled by mediamix blk-ctrl) or connect with LVDS display bridge(LDB) directly or connect with a parallel display through parallel display format(also controlled by mediamix blk-ctrl). i.MX93 LCDIF IP is essentially the same to i.MX8MP LCDIF IP. Add device tree binding for i.MX93 LCDIF. Acked-by: Krzysztof Kozlowski Reviewed-by: Marek Vasut Signed-off-by: Liu Ying --- v1->v2: * Add Krzysztof's A-b and Marek's R-b tags on patch 1/6. Documentation/devicetree/bindings/display/fsl,lcdif.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/display/fsl,lcdif.yaml b/Documentation/devicetree/bindings/display/fsl,lcdif.yaml index 75b4efd70ba8..fc11ab5fc465 100644 --- a/Documentation/devicetree/bindings/display/fsl,lcdif.yaml +++ b/Documentation/devicetree/bindings/display/fsl,lcdif.yaml @@ -21,6 +21,7 @@ properties: - fsl,imx28-lcdif - fsl,imx6sx-lcdif - fsl,imx8mp-lcdif + - fsl,imx93-lcdif - items: - enum: - fsl,imx6sl-lcdif @@ -88,7 +89,9 @@ allOf: properties: compatible: contains: - const: fsl,imx8mp-lcdif + enum: + - fsl,imx8mp-lcdif + - fsl,imx93-lcdif then: properties: clocks: @@ -107,6 +110,7 @@ allOf: enum: - fsl,imx6sx-lcdif - fsl,imx8mp-lcdif + - fsl,imx93-lcdif then: properties: clocks: @@ -123,6 +127,7 @@ allOf: - fsl,imx8mm-lcdif - fsl,imx8mn-lcdif - fsl,imx8mp-lcdif + - fsl,imx93-lcdif then: required: - power-domains From patchwork Wed Jan 25 06:40:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13115012 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 933F7C54E94 for ; Wed, 25 Jan 2023 06:40:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=1p1YcL+vliEFBUS1gqEqZXZd7+Ly1CaLBXfQthgzya4=; b=xUrcIRZ8qiyLbd rBoqq6f6ZVUYahxsvPfvVvVWjTLruQhqe+oWSg+iIaMWW3wgVn+7ZKBHOQV9kxRPvpfR+AsE4KApj vqMXoQE5Ip+gq6hF4Iu5mpIO7HSnIiY5wZULkPg9vRs8ty/TeQdDGyij4nUg6yKFvxPvYANsavNCs DHaVnoR3HWREGc1sX0euD83MMM3gMnyacWYu8bV93HupE0/gc8U3jAu6CnRGVPgqtcOLIc+fDRJc4 hQ9cThaARVFjEYJG5qScXxFXdqgEmUr7v3Pa7CLY8rFnEg3p7G3N0CL4QMzV3e9VWRh4JeOmxIvOD wmy3zAfnJ0EusLGmG1Jw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKZRk-0068dv-Jh; Wed, 25 Jan 2023 06:39:48 +0000 Received: from mail-db5eur02on2056.outbound.protection.outlook.com ([40.107.249.56] helo=EUR02-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKZRX-0068YQ-Du for linux-arm-kernel@lists.infradead.org; Wed, 25 Jan 2023 06:39:36 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ahUWC4iM9wXk1DZ4c4GTqBHijMPoe/K51PrEW5LJZf2zdcaBKNWtY0Xs2tPhQgK8z+7GOtyvtOwxG480zoaUiMKhiudtyt1TgLj34FvdMP6h1HIWFCPp/wy34Toww9zT8NuYyvDN406pAEI8vHJ3OXZI4og0VdW29Y18B35j6D6PL+/l+2GLjRWK6O+wj8qdTdEx7W/EU4eTgF2O4/Kirnb93clIq78695ML1/mp/v0YqTTwHg7KGjDDL8ADtaORNxhkwTk5P/TCsuegKOIE4aoJMpNtZxuiEkpqTWKDPykK4j5fRvCstYjnnOryD+hamPRX5iR9YHU0ri+nOqh1DQ== 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=2U0gbmUoC4+W5rjQLnYtTRF9r98eDVl9pbLgOQspI00=; b=ehmu3DReYW2Qrr2JmaR0jbP5YcZ2ghyP4+TAKL3UpExhqbBqwDcSkVWBfxUySB9rrtB3LOuxxukPNdupSvKdX/moNdV2UeCdGTwJcXib7vntQmzlf64SarXujzTLXv7qUErxOIuRd7kBqAXR80OslJ2OiXXe4LTPUOd/BF4yfloJfmJusmZLexyjDPyP/t6EOySoR/BSHV+xCa6hhei0IlS6jRha1vV3YEmOQP+fZTCqmf4wCWks313OpRDywUZmFBoJhUIcTrDV2VlhhGdHFQxMTtpHJ73F1x+0YPhPw3nnJxiKzcB28Xx0gl/+QDTQidHE0DdOzQbwrI+Xg0Mbqg== 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=2U0gbmUoC4+W5rjQLnYtTRF9r98eDVl9pbLgOQspI00=; b=cYyDVcB4qXpc4PgBqagPKu2BYoHezPAW08fwxDOaXi+7gXkSNRPOPhCch+KB0EQRQA1JpbMTJhBILu4BSbkICudVVZzQX6K8y5t1ptTKG3cplgVAwkXaitVo97Qi1k6YQgy157u1ExiVq+CH/sUDbExhmwc0qcEBSwJyFefg9ZA= 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 DB9PR04MB9425.eurprd04.prod.outlook.com (2603:10a6:10:36b::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.33; Wed, 25 Jan 2023 06:39:30 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::5725:92ec:f43e:f5fc]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::5725:92ec:f43e:f5fc%7]) with mapi id 15.20.6002.028; Wed, 25 Jan 2023 06:39:30 +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 v2 2/6] drm: lcdif: Drop unnecessary NULL pointer check on lcdif->bridge Date: Wed, 25 Jan 2023 14:40:26 +0800 Message-Id: <20230125064030.1222121-3-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230125064030.1222121-1-victor.liu@nxp.com> References: <20230125064030.1222121-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR02CA0073.apcprd02.prod.outlook.com (2603:1096:4:90::13) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|DB9PR04MB9425:EE_ X-MS-Office365-Filtering-Correlation-Id: ebda579c-04e8-474f-eada-08dafe9ee9a4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: LLth+mLn7crIGRpH/l3k13SIwmzeNDHiMOac6OlG3ZBgznT0FaxDeYKr/1mjK2bnZ+w/92kSe4jvuaxNFav9QMuijeREu5wWk5pX2in9B6QlutnpzehzJoexpoEBNohmmT+5n19mK+VAN/NM5if1Wr98TxQ+dq5WUyMKulSWUxrejzCf8If1wUXOK0iID1pdoi1/Dsa0qxPTqDelyEKVXw0d90IitSzvedE3apazNy0dm6x/YSRE81uO8M5wUyr4rWO9HeNucrgcY+D4EX9Q0Jo17x2Seu5qDDu7790OYrOPacY0MgMmDA/nf79o66QRTgtkcM0eVy4cPbj5e4bhNcRPHUo//2N99xbg/fqbiu8WMh158T1rey7VcpQyoawNYHzJ/M2GgLtU9kgobFINfoIcjKxS4Ml3RNr6sCf2YLlmePQ817hIvrE3W+EaW9dADVW70jUrOvL5JourU+KxksgldcXoGPNqD4tzZhZBua2rVwa+cX9tOWiACeabK74V8SffzzB+q/7f68xK1g3pUO93cBuTk5+ap/XvBC6vIfcuOaZtRnTXWvquvUh+OHvOMq42elUJ7+Tt9LIlRmQQE67VvqrjdJY69ZYboPbQQcz+vbsGoFJJ1I03BOk+HdBOjrey8ygtoaJ5OCBgUk2aRs5rbr8OJ/ukEEGinrBIJc2/LnEvXw+NhlL8hndxeeUU3oCSdWVFJWAckz0MKKRgxg== 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)(136003)(39860400002)(396003)(346002)(376002)(366004)(451199018)(36756003)(1076003)(38100700002)(8936002)(316002)(5660300002)(38350700002)(2616005)(2906002)(4326008)(86362001)(66476007)(6512007)(66946007)(8676002)(66556008)(41300700001)(83380400001)(6506007)(26005)(6486002)(478600001)(6666004)(52116002)(186003)(7416002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: qbOZTeP5OTaLqLek23Ejj8VlXtMnboI21oZ+PsBanW1wrqZiLjntyZJfffYv2VppWvXW+A1xu3daOx218CjNdr22vGrYy1o8PHgX0H+/P7p1Y7LdJtMQsloYC5ZgFgiyEZUJBHsVLtong/lAX6Ksay6dNFVepk3lBOcwkSAlZMVooNyrCIbLn2SYrrSjNw3THYQEmondKdRqWCMJz/Y4Pz+z/xAqGzMTdqbEf+pXAfoLJgq0JDdGark2+WVrPbWEloK9AzDPj/lw27isWZgnV3wpN+5QPpYjAvYapk+HV2ZGoi2wYtzGA9wN2fhb6vkl1rdMX5irW508ZbI/+SuOOVCwrJSbvfT2wliRtzsnUMKV++6mdqzTEadORqDTXRUdKIqwZPexCB5pcIUPqGtH7ffPDSrGs4yiLjIaaSkXLYCzz05IXmh/Ty7qniCPcD3auhuDWHpXX3kK1IhsCBXKuTdC6P24LqyK1T5IaAvWrFA9w3dq1lLUKJREnapWCSAWD0svEzSzTjTw15KXuGIO9JxWHVm4XEarC4+sRbOYkStbXbafpFp/FElQtsqhwTb2n22e44Tv1QnOitf2PTyhiQwlpI5GwGMW+9r89gIm/0uAoOu6TtyD6F+EtWyou9jjHyhQgNLSWHViG0cg6xPeq+Sc7W5mOJTSQTrdFHNpqs4GsEtwXOTmUCUsdNi4oe4pFrudW6l+hU1vnVaarFox+m7Oxnop2vu0HOmxpMxUEbkpiFsBjxiEH5NilbyB/rzFlUM4GaB9eozyIk5h49ZernnROPVDE1KuKjZNRZOcFuYUxAPdoLOArQI19pcsyBwB3BzRIYECUaayxGHRzhUUqQtpvBcY+LhMGQFIezdYrq3QsfOdRiKt3JZLDj4HK3lC4L4nMN5vbt5gYtRzWA1Gah9PYLhs1533yVWX0txT1/ip9N8+op/1xpRTQR8/dpgmUCc3wIrFewstnc5CBZuClkbPdFpewoCHQnSpt28iUtv/hIT866QXzV6XNBcZk/JEzW1EEQ4DmVmlizYgNhJO6TvSyBqkl8b4PhyyLCdNbJ+mr8cmkcAB53ps7L+NnSykgeyTTor/6GO6oK0XW9W8aFfN6TiDBkGqhFn1ytzBCSwvOIXz2qNuT7wFiYRz9WYXe1IQNIC3L8HEoTz4SM0xpOLGeK3RbvbeRyw7tcXAp2kinSxUtMF01u3oJ9MQAi+J40b2p2KGFoscC8VRpCqcK7A2GPG0kprBYsR9ukMHbVLyZQ+6BzfTBfcHNfq1cLik1uUjUR0EPpT90QUteiIcY2awPMyulmFTO6UlU0XR+a4HS85IR+rWRIugxfaAFVv6SOhbllblXnQ+JI1MJWRJYFDvNXyvlpj5BW1cMnM0V+fbLALq2b2NYUcWDAX/aImG70Mtq56sUMQPm/l3wotfD6Aoj4pgB3EZ5vTxGBovqubzUnrXu6ejKHPToQlBsFlLEFOpAWCg0oiv1l8nQmVfsCl/KqtF1lOIc8QJ0U4yOE2V+TWNuK0SXsEeFDpKrupZ+d0vhogS7HGBkQX6xSQl0MlIPQGpdfPtoHQ3kFWhY9cXYLnXdGRN1NnXfGxDHNDF X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ebda579c-04e8-474f-eada-08dafe9ee9a4 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jan 2023 06:39:30.7189 (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: BUyxYH44GP/L/YjQtnziTMfepEx1jcGERWJ1NHP4N1KE1ed2hs+Np5ddSqAIfk2wYcWPNH8p4mbUo7mInZLY0A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB9425 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230124_223935_507430_31A87DC2 X-CRM114-Status: GOOD ( 14.55 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org A valid bridge is already found in lcdif_attach_bridge() and set to lcdif->bridge, so lcdif->bridge cannot be a NULL pointer. Drop the unnecessary NULL pointer check in KMS stage. Signed-off-by: Liu Ying --- v1->v2: * Split from patch 2/2 in v1. (Marek, Alexander) drivers/gpu/drm/mxsfb/lcdif_kms.c | 33 +++++++++++-------------------- 1 file changed, 12 insertions(+), 21 deletions(-) diff --git a/drivers/gpu/drm/mxsfb/lcdif_kms.c b/drivers/gpu/drm/mxsfb/lcdif_kms.c index 262bc43b1079..e54200a9fcb9 100644 --- a/drivers/gpu/drm/mxsfb/lcdif_kms.c +++ b/drivers/gpu/drm/mxsfb/lcdif_kms.c @@ -394,7 +394,7 @@ static void lcdif_crtc_mode_set_nofb(struct lcdif_drm_private *lcdif, struct drm_display_mode *m = &lcdif->crtc.state->adjusted_mode; u32 bus_flags = 0; - if (lcdif->bridge && lcdif->bridge->timings) + if (lcdif->bridge->timings) bus_flags = lcdif->bridge->timings->input_bus_flags; else if (bridge_state) bus_flags = bridge_state->input_bus_cfg.flags; @@ -463,30 +463,21 @@ static void lcdif_crtc_atomic_enable(struct drm_crtc *crtc, struct drm_display_mode *m = &lcdif->crtc.state->adjusted_mode; struct drm_bridge_state *bridge_state = NULL; struct drm_device *drm = lcdif->drm; - u32 bus_format = 0; + u32 bus_format; dma_addr_t paddr; - /* If there is a bridge attached to the LCDIF, use its bus format */ - if (lcdif->bridge) { - bridge_state = - drm_atomic_get_new_bridge_state(state, - lcdif->bridge); - if (!bridge_state) - bus_format = MEDIA_BUS_FMT_FIXED; - else - bus_format = bridge_state->input_bus_cfg.format; - - if (bus_format == MEDIA_BUS_FMT_FIXED) { - dev_warn_once(drm->dev, - "Bridge does not provide bus format, assuming MEDIA_BUS_FMT_RGB888_1X24.\n" - "Please fix bridge driver by handling atomic_get_input_bus_fmts.\n"); - bus_format = MEDIA_BUS_FMT_RGB888_1X24; - } - } + bridge_state = drm_atomic_get_new_bridge_state(state, lcdif->bridge); + if (!bridge_state) + bus_format = MEDIA_BUS_FMT_FIXED; + else + bus_format = bridge_state->input_bus_cfg.format; - /* If all else fails, default to RGB888_1X24 */ - if (!bus_format) + if (bus_format == MEDIA_BUS_FMT_FIXED) { + dev_warn_once(drm->dev, + "Bridge does not provide bus format, assuming MEDIA_BUS_FMT_RGB888_1X24.\n" + "Please fix bridge driver by handling atomic_get_input_bus_fmts.\n"); bus_format = MEDIA_BUS_FMT_RGB888_1X24; + } clk_set_rate(lcdif->clk, m->crtc_clock * 1000); From patchwork Wed Jan 25 06:40:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13115013 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 70AA5C27C76 for ; Wed, 25 Jan 2023 06:41:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=1rHhaJC8TgSSzy8XGdN/04r01CPwbP8nYEwal0Pt2rc=; b=AIq/YCPV6nMszh Fx1WUNBFjjq2sYfuV1186/7bGYkL7hQbvqgkaGTQyv/usrGp381eIEXDdEguUKCGkce53iksJ6dtI v4c9I0dEDAvPt33F2TTHn70J1D85tCcI+/f29N/XEh9/BksedaQffIacFkGOZ1fnu9zJfm35dcXCb adz25DlsXReNSwG8JuFzPgXMuT0MMqMPH1aiOtSAOnc0E3/vArfKGL2Iokp0NY2oD2QOSbAYmbrWD 9otKcd2UOwYzHUxglscxoa4WCwh1o2e2ayc02S+9C0Gm12160BUbN5RKQyNOxe2h3Vcw2Jgk3uQww aKDw59mM9DQNXkHPql9g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKZRx-0068hd-0W; Wed, 25 Jan 2023 06:40:01 +0000 Received: from mail-db5eur01on2084.outbound.protection.outlook.com ([40.107.15.84] helo=EUR01-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKZRc-0068aN-Ig for linux-arm-kernel@lists.infradead.org; Wed, 25 Jan 2023 06:39:42 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oOLB60jwc2r29QsbBhI/UsDd7jXR5c0BHH9UBKpBCo+/kms6HbeygeNFhbUgFl95+sV31Xrw5ekoqbywBCG6fIhsmr1hoHUIfdE4oegfD+4RDRmgsuhRahzaHnDvBD+b+cJ3ODsMB7SUEQV4uyhdEtwC1+KRHlHbpU5VUgiM6xZyZRfq+/MKfCsoYdUsEd9nZd0lvlOOmU0TQlJb2PxptTdNzmop9PCTktvOwd+LLWnZ2siSIT/yrWDWQw2uT73NKAbQ4FJB19U7a8VWUuvILSbeTEw94V5B5uRakn6BL1SELFk04bw9cp2J54O6ZlPIIG/pwmTU95mGHHkS4v9DWQ== 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=pc9V8G49HPpNQ8UEEEuGJqfy9TrPBgIBZTZirppoHaw=; b=aB4+FAqqDK4A7zygK6leGGkrepJ6Nip99g9LgZ93TelEuoQL8uFULvPuX8Ybhl1XVwGswnGCr4QwLC9jyIBSsSrPzYJgLHP4wgDcoVl1PR3VICrk17xJVq8129ta5ES59X/z7BzAaIo6kOxjr4yZYWNDjCIBgIduYvjpfj8QksSh+vTUfDzGiGAiQoySZqC7kGsk3EleboPbjQfMr8pfgQZSDGS9fWwdzBuMwkk5fgamoktKTvP3aObM1HIy+8jRqYnb9JSRMnjq6kb9CAtxMc+jcosoBrny2l+CbNCfnkayH+RQZZkEjXGOvNumej/LQvKVeTvtLODTxNNfgaJ+nw== 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=pc9V8G49HPpNQ8UEEEuGJqfy9TrPBgIBZTZirppoHaw=; b=SM5tOGjvaFxW8HgudVYTO9bDc9snn5y1UH2OcodRfTiNb7nNruYPWRkYEjnWBZ3d6ckVPBcHD9xrLgitLd1BRmZtscaE1IuUDY+sA5KaQ/WFoh0dUPbffZLqHBcUuQPeIJvq1cNuatv5oeewI3xiLgk6g/bYPiwvbtYUSVmuJ1A= 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 DB9PR04MB9425.eurprd04.prod.outlook.com (2603:10a6:10:36b::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.33; Wed, 25 Jan 2023 06:39:36 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::5725:92ec:f43e:f5fc]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::5725:92ec:f43e:f5fc%7]) with mapi id 15.20.6002.028; Wed, 25 Jan 2023 06:39:36 +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 v2 3/6] drm: lcdif: Determine bus format and flags in ->atomic_check() Date: Wed, 25 Jan 2023 14:40:27 +0800 Message-Id: <20230125064030.1222121-4-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230125064030.1222121-1-victor.liu@nxp.com> References: <20230125064030.1222121-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR02CA0073.apcprd02.prod.outlook.com (2603:1096:4:90::13) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|DB9PR04MB9425:EE_ X-MS-Office365-Filtering-Correlation-Id: b029bf80-d0de-44ba-48fd-08dafe9eeccd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YdZDGJLFvHJ+lCo6ujJzhmCYK5qnmqMWfjLscN6ITI7jCTg9MF8kAXzQ/a256I6pzZt25UURbamAHBCY3KJJt6do9tKJyW9V5qJBcHh1bq/Rn8l0ZlgKtiR/dKf1nnZpoZ17FBmmfcL/vt7NC4Ok904afoJrIOCNRldnKeTsIJt9TJjRoBymfpqWyGIflQH33yvorAAST1PH5evgyE24+gDlES+Y/1XAt9jCBuTMNuL9vxUayi0RPxPjHZlDqZchwxAAkVg+/WJhhHUzXCSU0mMcQ7ANT3H9W93HwhDutuF0veSfPtNf+bVanlKhFlHSGhUOFMWFFORfCSTnyHOv/ymeCrpV/xN+9lL9aRSW81cNZohhh2Fa0xcr7pq4iv+QnE5mYIGlHn46SBS19fi7BZ6Sj10CocqaB/EeSD1T2CT/c0dP4rx+rZWUjMM9D3ucy+UXMk3glvKqbdKb06tdM9UNwo6uUUGo0Es7oG+iwp/KdMhO/bqWvZ+6Fe7zNIXgYZd5cyUOetPXOnrX2wVB1s/gy6nf27pDOfapKrWaFBdOVd349E+7lvK1eQVNBSkvw0RhJCofsg5dko451d84hwLqhGPv+rOr3qTgoQYI46y2c19x6Uwxk5R1oF3w5pkkYUQyZV1jK2CXA1WHGL2hGwq7kUfCczbw+TE9X7WRA0B6sYWVDfDXHSeQrXvf8AwmfFGjAgl1cZM+uuzfxmJvXg== 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)(136003)(39860400002)(396003)(346002)(376002)(366004)(451199018)(36756003)(1076003)(38100700002)(8936002)(316002)(5660300002)(38350700002)(2616005)(2906002)(4326008)(86362001)(66476007)(6512007)(66946007)(8676002)(66556008)(41300700001)(83380400001)(6506007)(26005)(6486002)(478600001)(6666004)(52116002)(186003)(7416002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: bTDnXg+cCnr/s5vChZP408wjXaWvfzumJSVLbJ0pP0BxVSqtm+MDSbeIvudd6wSbhRzsv5jmtGf4QhVOwii0EDHxSlLyzVXxVYmP/mBhIZyH9KCUsmolisk9gemgMNWSoEeQwrQa+gOIJ16EgYukXT4mdwc+0Gy1stFzaTGOh4EpbFx0hy75iZk/zGnbmAc1VvmpltwtIH5AU71gHHHoJr8JTXUH0eU2HO5uKCaNzfAKw//zk3W9s0iMq1hL5S4f9q0N9Let4rGRJ7UJzIR8LAL1cU527jA6TA9pymRUYNefaypW4261PbpHc4D05sILrD1PIgxPLUstQDVOciw+BkzcYrccLzp8LJM3bJiq7ZmzV5j6qsOlfDJ0hg4PXt61mlXs/Han7xdp1M1m8lrScuHnOUnxST1515bGHllhW83hYGaTDwhsGocZXUmPpJcdG9yiq3wOoS72Rvs33rnLFDz0F8DojF6SK3nHVtYXO5aFvMps/o61gt06mkqhmCMzqt2vcfR2xzn0z4PiL3JTUBt5vbplUbBb4v0ODIyXxnDzhP8fpyYZhSO729IXkEbyLiPC3uivnKAddgfqR2o53fc0/9R7yre4Fa4vnQ5IV7tHlOTDQrHbqJ2WlIsW/rrOaWw2ftOdhPk2wwvqMPilUWd2CS97AIXhV+M5fn9aMlsJYlrnet/Hp8uwu8VtHpT4BNpliNWTPb/GAtyhZ5ioDC6S2qF/4ZQZwd6C1Fd2/KiuJBNPVik8IJixCAhZ/LGuJGZJDT6L7IZNHRnAVHL5IL9/iFawSKyMdkCe0n2lGFmI4/xnHR6adIeJPeKSyWpHbAnKvJ3FBmh2lF6vsHFhKgaEvIDnIT85hXl4exouOYQSmTIS7Q102BHZQBabMvN0mYX8H77Pnw2H7XgZe9+buR+G697aahwXCkK1jech/I98tjIAjNU/1ndB5ZiTiRkYS5m9j74N5JH/WWfMNQOe9AV5LOsCBWClJz/Mui8VSBCus+8NLTj8Msyl6KKiyznrcwuSh8QFph7kmEAHextCNjrFHLQyhm9mvw6LKSj2Qj8VErnFONwJgDY+93gqvi3uhp3QtTJnMmdjoCJq8oTCExmioDYuMDXnjUU3diKllXg40H1swwidlDJJPq5RgFW2UM40/WGRDDTS8Tz6iLtPHQnXeBsVNouKFrndCKPVwX5odankYsBC17q1Q41SfhzN7npWvYzCJeMbXfAOzmn11FYbZcZ2/9mSjqTBfoP/J2eewKWJKrts+z2JYsb9ePqtw5ZV+K+wbF0L3Wi3tm0OcfKGAgTGtbb+g20bGKwVJl8gAK3S0Zz6iPCZvgJmYKnKF+2LJ42aPFFLU+4w5AsfEgCp4Cwt9h/PdbOPylWoMlI2tsyhFY5J5Dr0tx0O6ieccexRBOZ++zFzNNexNLDEBfDeY+u9I4lNS0C4pSAjeEM4aQbxuGnfceFzA0wbvm79rVoKoZbFBJsIAT0D1peAxyIJwSJmYu+E4hP5n3uMxhinwJ9h1ediG7gQLrEZIWzqGl8hg+lDKeN9JGsatGAABjwiz724HkHuP/pMsmKiw9tZlNJQQio2aOcgmbijbyRT X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b029bf80-d0de-44ba-48fd-08dafe9eeccd X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jan 2023 06:39:35.9073 (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: muZmP3CcwnkaOYmGe1j38jKZBpr4exMwkw314EG7eqckEkh2jqTO/ELgb9/piQ9R/PX0+7WSqEoVK7KoqoImrw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB9425 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230124_223940_782665_8D5B09E5 X-CRM114-Status: GOOD ( 20.51 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Instead of determining LCDIF output bus format and bus flags in ->atomic_enable(), do that in ->atomic_check(). This is a preparation for the upcoming patch to check consistent bus format and bus flags across all first downstream bridges in ->atomic_check(). New lcdif_crtc_state structure is introduced to cache bus format and bus flags states in ->atomic_check() so that they can be read in ->atomic_enable(). Signed-off-by: Liu Ying --- v1->v2: * Split from patch 2/2 in v1. (Marek, Alexander) * Add comment on the 'base' member of lcdif_crtc_state structure to note it should always be the first member. (Lothar) drivers/gpu/drm/mxsfb/lcdif_kms.c | 138 ++++++++++++++++++++++-------- 1 file changed, 100 insertions(+), 38 deletions(-) diff --git a/drivers/gpu/drm/mxsfb/lcdif_kms.c b/drivers/gpu/drm/mxsfb/lcdif_kms.c index e54200a9fcb9..294cecdf5439 100644 --- a/drivers/gpu/drm/mxsfb/lcdif_kms.c +++ b/drivers/gpu/drm/mxsfb/lcdif_kms.c @@ -30,6 +30,18 @@ #include "lcdif_drv.h" #include "lcdif_regs.h" +struct lcdif_crtc_state { + struct drm_crtc_state base; /* always be the first member */ + u32 bus_format; + u32 bus_flags; +}; + +static inline struct lcdif_crtc_state * +to_lcdif_crtc_state(struct drm_crtc_state *s) +{ + return container_of(s, struct lcdif_crtc_state, base); +} + /* ----------------------------------------------------------------------------- * CRTC */ @@ -385,48 +397,72 @@ static void lcdif_reset_block(struct lcdif_drm_private *lcdif) readl(lcdif->base + LCDC_V8_CTRL); } -static void lcdif_crtc_mode_set_nofb(struct lcdif_drm_private *lcdif, - struct drm_plane_state *plane_state, - struct drm_bridge_state *bridge_state, - const u32 bus_format) +static void lcdif_crtc_mode_set_nofb(struct drm_crtc_state *crtc_state, + struct drm_plane_state *plane_state) { - struct drm_device *drm = lcdif->crtc.dev; - struct drm_display_mode *m = &lcdif->crtc.state->adjusted_mode; - u32 bus_flags = 0; - - if (lcdif->bridge->timings) - bus_flags = lcdif->bridge->timings->input_bus_flags; - else if (bridge_state) - bus_flags = bridge_state->input_bus_cfg.flags; + struct lcdif_crtc_state *lcdif_crtc_state = to_lcdif_crtc_state(crtc_state); + struct drm_device *drm = crtc_state->crtc->dev; + struct lcdif_drm_private *lcdif = to_lcdif_drm_private(drm); + struct drm_display_mode *m = &crtc_state->adjusted_mode; DRM_DEV_DEBUG_DRIVER(drm->dev, "Pixel clock: %dkHz (actual: %dkHz)\n", m->crtc_clock, (int)(clk_get_rate(lcdif->clk) / 1000)); DRM_DEV_DEBUG_DRIVER(drm->dev, "Bridge bus_flags: 0x%08X\n", - bus_flags); + lcdif_crtc_state->bus_flags); DRM_DEV_DEBUG_DRIVER(drm->dev, "Mode flags: 0x%08X\n", m->flags); /* Mandatory eLCDIF reset as per the Reference Manual */ lcdif_reset_block(lcdif); - lcdif_set_formats(lcdif, plane_state, bus_format); + lcdif_set_formats(lcdif, plane_state, lcdif_crtc_state->bus_format); - lcdif_set_mode(lcdif, bus_flags); + lcdif_set_mode(lcdif, lcdif_crtc_state->bus_flags); } static int lcdif_crtc_atomic_check(struct drm_crtc *crtc, struct drm_atomic_state *state) { + struct drm_device *drm = crtc->dev; + struct lcdif_drm_private *lcdif = to_lcdif_drm_private(drm); struct drm_crtc_state *crtc_state = drm_atomic_get_new_crtc_state(state, crtc); + struct lcdif_crtc_state *lcdif_crtc_state = to_lcdif_crtc_state(crtc_state); bool has_primary = crtc_state->plane_mask & drm_plane_mask(crtc->primary); + struct drm_bridge_state *bridge_state; + struct drm_bridge *bridge = lcdif->bridge; + int ret; /* The primary plane has to be enabled when the CRTC is active. */ if (crtc_state->active && !has_primary) return -EINVAL; - return drm_atomic_add_affected_planes(state, crtc); + ret = drm_atomic_add_affected_planes(state, crtc); + if (ret) + return ret; + + bridge_state = drm_atomic_get_new_bridge_state(state, bridge); + if (!bridge_state) + lcdif_crtc_state->bus_format = MEDIA_BUS_FMT_FIXED; + else + lcdif_crtc_state->bus_format = bridge_state->input_bus_cfg.format; + + if (lcdif_crtc_state->bus_format == MEDIA_BUS_FMT_FIXED) { + dev_warn_once(drm->dev, + "Bridge does not provide bus format, assuming MEDIA_BUS_FMT_RGB888_1X24.\n" + "Please fix bridge driver by handling atomic_get_input_bus_fmts.\n"); + lcdif_crtc_state->bus_format = MEDIA_BUS_FMT_RGB888_1X24; + } + + if (bridge->timings) + lcdif_crtc_state->bus_flags = bridge->timings->input_bus_flags; + else if (bridge_state) + lcdif_crtc_state->bus_flags = bridge_state->input_bus_cfg.flags; + else + lcdif_crtc_state->bus_flags = 0; + + return 0; } static void lcdif_crtc_atomic_flush(struct drm_crtc *crtc, @@ -458,35 +494,21 @@ static void lcdif_crtc_atomic_enable(struct drm_crtc *crtc, struct drm_atomic_state *state) { struct lcdif_drm_private *lcdif = to_lcdif_drm_private(crtc->dev); - struct drm_plane_state *new_pstate = drm_atomic_get_new_plane_state(state, - crtc->primary); + struct drm_crtc_state *new_crtc_state = drm_atomic_get_new_crtc_state(state, crtc); + struct drm_plane_state *new_plane_state = drm_atomic_get_new_plane_state(state, + crtc->primary); struct drm_display_mode *m = &lcdif->crtc.state->adjusted_mode; - struct drm_bridge_state *bridge_state = NULL; struct drm_device *drm = lcdif->drm; - u32 bus_format; dma_addr_t paddr; - bridge_state = drm_atomic_get_new_bridge_state(state, lcdif->bridge); - if (!bridge_state) - bus_format = MEDIA_BUS_FMT_FIXED; - else - bus_format = bridge_state->input_bus_cfg.format; - - if (bus_format == MEDIA_BUS_FMT_FIXED) { - dev_warn_once(drm->dev, - "Bridge does not provide bus format, assuming MEDIA_BUS_FMT_RGB888_1X24.\n" - "Please fix bridge driver by handling atomic_get_input_bus_fmts.\n"); - bus_format = MEDIA_BUS_FMT_RGB888_1X24; - } - clk_set_rate(lcdif->clk, m->crtc_clock * 1000); pm_runtime_get_sync(drm->dev); - lcdif_crtc_mode_set_nofb(lcdif, new_pstate, bridge_state, bus_format); + lcdif_crtc_mode_set_nofb(new_crtc_state, new_plane_state); /* Write cur_buf as well to avoid an initial corrupt frame */ - paddr = drm_fb_dma_get_gem_addr(new_pstate->fb, new_pstate, 0); + paddr = drm_fb_dma_get_gem_addr(new_plane_state->fb, new_plane_state, 0); if (paddr) { writel(lower_32_bits(paddr), lcdif->base + LCDC_V8_CTRLDESCL_LOW0_4); @@ -520,6 +542,46 @@ static void lcdif_crtc_atomic_disable(struct drm_crtc *crtc, pm_runtime_put_sync(drm->dev); } +static void lcdif_crtc_reset(struct drm_crtc *crtc) +{ + struct lcdif_crtc_state *state; + + if (crtc->state) + __drm_atomic_helper_crtc_destroy_state(crtc->state); + + kfree(to_lcdif_crtc_state(crtc->state)); + crtc->state = NULL; + + state = kzalloc(sizeof(*state), GFP_KERNEL); + if (state) + __drm_atomic_helper_crtc_reset(crtc, &state->base); +} + +static struct drm_crtc_state * +lcdif_crtc_atomic_duplicate_state(struct drm_crtc *crtc) +{ + struct lcdif_crtc_state *old = to_lcdif_crtc_state(crtc->state); + struct lcdif_crtc_state *new; + + new = kzalloc(sizeof(*new), GFP_KERNEL); + if (!new) + return NULL; + + __drm_atomic_helper_crtc_duplicate_state(crtc, &new->base); + + new->bus_format = old->bus_format; + new->bus_flags = old->bus_flags; + + return &new->base; +} + +static void lcdif_crtc_atomic_destroy_state(struct drm_crtc *crtc, + struct drm_crtc_state *state) +{ + __drm_atomic_helper_crtc_destroy_state(state); + kfree(to_lcdif_crtc_state(state)); +} + static int lcdif_crtc_enable_vblank(struct drm_crtc *crtc) { struct lcdif_drm_private *lcdif = to_lcdif_drm_private(crtc->dev); @@ -548,12 +610,12 @@ static const struct drm_crtc_helper_funcs lcdif_crtc_helper_funcs = { }; static const struct drm_crtc_funcs lcdif_crtc_funcs = { - .reset = drm_atomic_helper_crtc_reset, + .reset = lcdif_crtc_reset, .destroy = drm_crtc_cleanup, .set_config = drm_atomic_helper_set_config, .page_flip = drm_atomic_helper_page_flip, - .atomic_duplicate_state = drm_atomic_helper_crtc_duplicate_state, - .atomic_destroy_state = drm_atomic_helper_crtc_destroy_state, + .atomic_duplicate_state = lcdif_crtc_atomic_duplicate_state, + .atomic_destroy_state = lcdif_crtc_atomic_destroy_state, .enable_vblank = lcdif_crtc_enable_vblank, .disable_vblank = lcdif_crtc_disable_vblank, }; From patchwork Wed Jan 25 06:40:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13115014 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 5B3E0C54E94 for ; Wed, 25 Jan 2023 06:41:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=7WRUah34dZymFP/x6JzTwLxoTm9HEB7ImIMTFC1BSb8=; b=njo5ffg5HkOcCa cl7eh96r1FzjT6xh1039RcyamU8Z+tVBH6gYwqL0xhiPerb/jBvAMl17h/7OwSr5QzltketCZBVGV 5/sTAku38/YsQw4B/4V7BArCrDDS3bLE7Pc1mx6J1SN6cYBgRBBq0o+psyrT4+t2Cw7k+MKXSXL8u g6gwqXZ3gbNXuKWPUjc8dWKAQVXi1fygFXwlsvlV4GiNdm6K//VYrmDXLrl/Dz5lTexGNMGuK/hnb x4OoCvzEapXbbInLOYxpAWyQoXmt67Ew021ucBRVLbeDcAvLCEvOqY8PZ5Nq4F5TcgYzPL+R4Ttrv HfVX+UNDxYyBtvjHNd3Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKZSH-0068oO-Fo; Wed, 25 Jan 2023 06:40:21 +0000 Received: from mail-db5eur01on2084.outbound.protection.outlook.com ([40.107.15.84] helo=EUR01-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKZRe-0068aN-R4 for linux-arm-kernel@lists.infradead.org; Wed, 25 Jan 2023 06:39:44 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=mquCdv2phPvTbt4otGFYy6Xe1mnRjRbiIQPxD257xkM8JIXiHVsnnmZXLzp5PaUioWhj/1VZpwQDAVEOsjnH6JDSPmaKLcLBW/EpfPpHEzZyGminEJzZWvlr12OG4u7KlJau1bhYfPJY9hgSZyHLoJBiQCf0WkKz+UED2c2gJhcUwK63XoI0GLllko+7pHBvndDRVbyL0AYQjrvroComg025SmV0WBLfbvJIgzhtE7UldkkfpxVfHeX4YAFWo2EGdp9mVjpinrLw/lmTIVQS6Lh06YQRP6zN7Iml2kugXou1fmTSsE89iYZ/i10dNSjbXY45KrHPPa0jxfJaLcVlKg== 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=C4KpjDAKpcyfTxfU+kwq99MhSKRDzG7SBeZbAwQR2wo=; b=KVYyPqmep1M2DraXVp0lmOmJYP0Fyhnjy1Sq1J33wokP3BL4QFVx4L38FTDzr3vKg5k1PZfgeSRsOnKCMalchHKv3Vi6zLD5G0xuh6dwWussp3QxLNGAXs3XB7AhgiloSMd1H2NOcAcvOwKmMDArok+JIdQWsMu/3uPxAkYSTfTiMu6tiXenzgf0K8fZBIPR/iJKTjiG7F19yp5HraGniSQQ9ztqSpNWG7GHoLOxAZzH4eHBH55lFoTSgesDe20pDBVjOScuZbYHp9C3B/rPwz91zHhlom0i7/R9z5XLpPyk45140Tgq1+isgnZMH6qCK4JgxnLhqg4KJO/6qzluLg== 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=C4KpjDAKpcyfTxfU+kwq99MhSKRDzG7SBeZbAwQR2wo=; b=ZloBV6W6Vl5AE9+BQd4t/aoRiQVW7f8Jw9lAI44pJPFRz8KXt7LSpkU4aLMopkxk/x+wiQE2URlJMM7M/Wh2xPrQM4p2q5DufsyC9l743983Vri+5Ls2uXKerWUHRLAGVmuxDnvXfpboy2MHkkKsDDApgx4j6VwOY39ROx2ej60= 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 DB9PR04MB9425.eurprd04.prod.outlook.com (2603:10a6:10:36b::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.33; Wed, 25 Jan 2023 06:39:41 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::5725:92ec:f43e:f5fc]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::5725:92ec:f43e:f5fc%7]) with mapi id 15.20.6002.028; Wed, 25 Jan 2023 06:39:41 +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 v2 4/6] drm: lcdif: Check consistent bus format and flags across first bridges Date: Wed, 25 Jan 2023 14:40:28 +0800 Message-Id: <20230125064030.1222121-5-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230125064030.1222121-1-victor.liu@nxp.com> References: <20230125064030.1222121-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR02CA0073.apcprd02.prod.outlook.com (2603:1096:4:90::13) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|DB9PR04MB9425:EE_ X-MS-Office365-Filtering-Correlation-Id: 8ec461c5-0760-47f9-0883-08dafe9eefc6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +GOae8EvoESq9wq7Ciy0670r4dvlzHjqXs5TH7OltSrrefhNP2PfuZx/yPTEthV4LDalKlPfl6Xc2opqjsuYdkSLaVmhDGxEMyjMkHqKg/i9Op8Nieia1yr/rfiVcExTXtVkL/SUwlwIkszInmAzL/a1LmvfXrNcHVF2e2rV96FBVKezT1Ig7vJFPA+oG/l3FW8LtXuPPOP/0qCeVSv1jEAfnvHlBfbM4miSf8rW+HOF1odBpTsxDV5JOm0OPyuRLp6n859nP1AqOOOaGotuG7XWAjzeWC27oq2f3guut0H1MqGHlK6I3nnYTI4pyyS1Cpb+ER/oh1gVh1czYvx5jDvwcpXtLc43tAlzqdfRd8LXCQD8hwJutJyGcLZSqWfP9AjWiR37vMxYhcDzzbpIDdxSaT8/U02SE4g1aJlXYLky4Bsg38B0iy+8jDO1KUIktwtvynlbZPqtIWkDo5DMk/FZbl2D+c8NFUYJF76F9frW1IX9Hao+pkJlCwKs9/vsLLj7YWyeturgTDnOf2jZTMVQ7VtFyJA7BVeYc0pGYUFIpjd0f+7Z32pIDQQ8PGLdcNw1YhMIpx8ubF+IoGYkCfQhLwjKt2cmhOxgalwu5+LFFMKW8FQ+JnmjcWXTonlXL+qGRVQh+qfXhsKRaQPJ6IHnaAhttucKOVZlzR4BGHcc+rKpSkkZVDeeKdfhtE0jf1iYtZNw+NYQfQwkcqS08w== 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)(136003)(39860400002)(396003)(346002)(376002)(366004)(451199018)(36756003)(1076003)(38100700002)(8936002)(316002)(5660300002)(38350700002)(2616005)(2906002)(4326008)(86362001)(66476007)(6512007)(66946007)(8676002)(66556008)(41300700001)(83380400001)(6506007)(26005)(6486002)(478600001)(6666004)(52116002)(186003)(7416002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 0QXiuIHKYFVVnhBhSZ/5VHn8Aku71Y+mfc4DQp95WVEXnvdWrXZGR4mAYPB+gBI5qiz2h0MlOjqAsM7A/VqkrY79bgRGDXCel+q3wHWR5pkcoAtWR327YiVce0ZWlQG3atFBLamXUuLeJcsFepjWLvlW7yCTbSBk/CMweledPOYp6cJX8TF5N395iYDTfQG29fuj5kOo+1SmSE8GQZf0gqVMRYfE3/b35yPrw+4uSoHUKCT4NDnnb2DrQvYz0SCvPwPydEN18RhdsF11Qu55lD/ilX65HHx/Pp/OO5fICbS7SgLYY3dkcW0Xsp5mFyzhTJteoFvhY0ZRIvG4yHDpHCzgDiga/x5o/TiPAFMvjTCy+rKHsxYFzTyoB1emBitrHDMlKE5gG5M782ke7xf7t2Hycwxn+OvbeGzZX2gMXkovSjqTs4jmr7H1eyyNHf82oQi/LnNpKh8Na98ZOB1ilk/c2Xc+kiiEks4+hdD2JX6z/Yupa46ocyPV2W4Cf/oPF4zXQj3JWUpFwz19FomcA5BCI+Z/1yHU8YiCYUO/onEvCdCgnEtagGKuqpd09tMqQl09mpkuYGK0jTLwrR+YcpNGNnndX7wClNc6iBz7OZffDa4oRLQ+YaQ+NVhjrw1wlb0ZFCN2jKRNbB3CXCN/zxpY+fgynYagFpfhjKsxkVIPwSLqTN0l6JqGDXLUsmEJjF41RF+TO/ZutBa5pfzjhBFflDICKvQtiQjKHTDEW93NSUjTbajOGIBktXup5Wt0QA1KzBXOhpq5t3miygmf8FEEROmzqx2ta4haZJMU6HobsgrOBqybCeLIjTeVC+/YCzjf3o3IigKHo9PZQ34BVKQjZyA4DxL/0wQZkTklf7UV56sCyPgdCQul1pGARhfD8n1xFo6KPdZ9qtZkXbfFQOy5rKQglApUdEGv06R+P5jFEqemgeC5XUYWaCSLlXvvB8cgGxaZ6Eit8hfWT5LRtAhsxhhRHviKKPLYmUzQcHUrKhdzKFpJiyZtKThdS8vDONpNTiAeT9iOxCF6VCbYv8w8cdXs/0DzDbZRwc/824SaNDrDKkVoIzmlDIKjkfFw55fNs3iWIXNNoIc8UFPKOKvcK7qz9CStgCBSz+tJsiVhC+xqgH+WTKvgauQoo9yJ+6i8N83zgj7YyC4RvQdETXe5s3L1Tpopep/49ukwvlhXiJfVzFUVBQIHRNm+UZPH2aEG8NDuCwZXhHRg84o4zbMyMZfF6sCLAFpEk5ntJQqsEEAIYnHMV+i+XOrOosEmjbRz1/+6Jedo4VIGcWxggcisCpiGodWNhqchKvsurpkfz9Rb7sQiO++YBbzjUvp5C+0aw7gOkJgxFABUOiPqhuuUA/nyOqYsZPXI8EuuPBy2C0M5iAS9yM5qd9n9W8cqFKGlYRAiNHc1IEQO6VLKVRk+UEVGHIcWcJaCaa70YyojZ5VfZpIfXmE22J3J9Fg5roe0nvmbbmnwe2iE6+0tIoizo3fLcnVx7+Liyd1NjFXwmYvEIPSTJOMDbwzK6k9JPhLjE8SdHUPxuOB69Dx1HGmIuUAnjbIf6aMYhkvfzfYrNThrkCImSKg2Ts0v4W/4 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8ec461c5-0760-47f9-0883-08dafe9eefc6 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jan 2023 06:39:41.1911 (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: 4ZMZjpanTfqzrVkZuQ1rv9j5dB6b0335Ay5rMqzx9bw2/Ka5q+LrPLDLCyFjIn1MYK1wzIPEHVuommfZVf/8ig== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB9425 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230124_223942_941318_A33E3954 X-CRM114-Status: GOOD ( 19.59 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The single LCDIF embedded in i.MX93 SoC may drive multiple displays simultaneously. Check bus format and flags across first bridges in ->atomic_check() to ensure they are consistent. This is a preparation for adding i.MX93 LCDIF support. Signed-off-by: Liu Ying --- v1->v2: * Split from patch 2/2 in v1. (Marek, Alexander) * Drop a comment about bridge input bus format from lcdif_crtc_atomic_check(). drivers/gpu/drm/mxsfb/lcdif_drv.c | 2 - drivers/gpu/drm/mxsfb/lcdif_drv.h | 1 - drivers/gpu/drm/mxsfb/lcdif_kms.c | 76 ++++++++++++++++++++++--------- 3 files changed, 55 insertions(+), 24 deletions(-) diff --git a/drivers/gpu/drm/mxsfb/lcdif_drv.c b/drivers/gpu/drm/mxsfb/lcdif_drv.c index cc2ceb301b96..b5b9a8e273c6 100644 --- a/drivers/gpu/drm/mxsfb/lcdif_drv.c +++ b/drivers/gpu/drm/mxsfb/lcdif_drv.c @@ -52,8 +52,6 @@ static int lcdif_attach_bridge(struct lcdif_drm_private *lcdif) if (ret) return dev_err_probe(drm->dev, ret, "Failed to attach bridge\n"); - lcdif->bridge = bridge; - return 0; } diff --git a/drivers/gpu/drm/mxsfb/lcdif_drv.h b/drivers/gpu/drm/mxsfb/lcdif_drv.h index 6cdba6e20c02..aa6d099a1897 100644 --- a/drivers/gpu/drm/mxsfb/lcdif_drv.h +++ b/drivers/gpu/drm/mxsfb/lcdif_drv.h @@ -31,7 +31,6 @@ struct lcdif_drm_private { } planes; struct drm_crtc crtc; struct drm_encoder encoder; - struct drm_bridge *bridge; }; static inline struct lcdif_drm_private * diff --git a/drivers/gpu/drm/mxsfb/lcdif_kms.c b/drivers/gpu/drm/mxsfb/lcdif_kms.c index 294cecdf5439..4ea3d2b2cf61 100644 --- a/drivers/gpu/drm/mxsfb/lcdif_kms.c +++ b/drivers/gpu/drm/mxsfb/lcdif_kms.c @@ -17,6 +17,7 @@ #include #include #include +#include #include #include #include @@ -424,15 +425,19 @@ static int lcdif_crtc_atomic_check(struct drm_crtc *crtc, struct drm_atomic_state *state) { struct drm_device *drm = crtc->dev; - struct lcdif_drm_private *lcdif = to_lcdif_drm_private(drm); struct drm_crtc_state *crtc_state = drm_atomic_get_new_crtc_state(state, crtc); struct lcdif_crtc_state *lcdif_crtc_state = to_lcdif_crtc_state(crtc_state); bool has_primary = crtc_state->plane_mask & drm_plane_mask(crtc->primary); + struct drm_connector_state *connector_state; + struct drm_connector *connector; + struct drm_encoder *encoder; struct drm_bridge_state *bridge_state; - struct drm_bridge *bridge = lcdif->bridge; - int ret; + struct drm_bridge *bridge; + u32 bus_format, bus_flags; + bool format_set = false, flags_set = false; + int ret, i; /* The primary plane has to be enabled when the CRTC is active. */ if (crtc_state->active && !has_primary) @@ -442,26 +447,55 @@ static int lcdif_crtc_atomic_check(struct drm_crtc *crtc, if (ret) return ret; - bridge_state = drm_atomic_get_new_bridge_state(state, bridge); - if (!bridge_state) - lcdif_crtc_state->bus_format = MEDIA_BUS_FMT_FIXED; - else - lcdif_crtc_state->bus_format = bridge_state->input_bus_cfg.format; - - if (lcdif_crtc_state->bus_format == MEDIA_BUS_FMT_FIXED) { - dev_warn_once(drm->dev, - "Bridge does not provide bus format, assuming MEDIA_BUS_FMT_RGB888_1X24.\n" - "Please fix bridge driver by handling atomic_get_input_bus_fmts.\n"); - lcdif_crtc_state->bus_format = MEDIA_BUS_FMT_RGB888_1X24; + /* Try to find consistent bus format and flags across first bridges. */ + for_each_new_connector_in_state(state, connector, connector_state, i) { + if (!connector_state->crtc) + continue; + + encoder = connector_state->best_encoder; + + bridge = drm_bridge_chain_get_first_bridge(encoder); + if (!bridge) + continue; + + bridge_state = drm_atomic_get_new_bridge_state(state, bridge); + if (!bridge_state) + bus_format = MEDIA_BUS_FMT_FIXED; + else + bus_format = bridge_state->input_bus_cfg.format; + + if (bus_format == MEDIA_BUS_FMT_FIXED) { + dev_warn(drm->dev, + "[ENCODER:%d:%s]'s bridge does not provide bus format, assuming MEDIA_BUS_FMT_RGB888_1X24.\n" + "Please fix bridge driver by handling atomic_get_input_bus_fmts.\n", + encoder->base.id, encoder->name); + bus_format = MEDIA_BUS_FMT_RGB888_1X24; + } + + if (!format_set) { + lcdif_crtc_state->bus_format = bus_format; + format_set = true; + } else if (lcdif_crtc_state->bus_format != bus_format) { + DRM_DEV_DEBUG_DRIVER(drm->dev, "inconsistent bus format\n"); + return -EINVAL; + } + + if (bridge->timings) + bus_flags = bridge->timings->input_bus_flags; + else if (bridge_state) + bus_flags = bridge_state->input_bus_cfg.flags; + else + bus_flags = 0; + + if (!flags_set) { + lcdif_crtc_state->bus_flags = bus_flags; + flags_set = true; + } else if (lcdif_crtc_state->bus_flags != bus_flags) { + DRM_DEV_DEBUG_DRIVER(drm->dev, "inconsistent bus flags\n"); + return -EINVAL; + } } - if (bridge->timings) - lcdif_crtc_state->bus_flags = bridge->timings->input_bus_flags; - else if (bridge_state) - lcdif_crtc_state->bus_flags = bridge_state->input_bus_cfg.flags; - else - lcdif_crtc_state->bus_flags = 0; - return 0; } From patchwork Wed Jan 25 06:40:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13115015 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 5BF40C27C76 for ; Wed, 25 Jan 2023 06:42:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=5pLEibbHJURCd0IAIyeyi38IolipznY07HgnbG8aXnc=; b=1U+L1OUjcA6xYK HkcDsx51QCT+rqevGd0JTYXaSE5SziIL0WMlMtfEPiih2YV4lFVAYoQzlmE+b73uFePD7ZAZVs3QL yU1tObX9rkvTtjyZNvKsEnVHFveEKAq2p5Rx/aJvy7pZz5I9aJezXs8Nf2aLlRFLx/oJs3xCDeUPH nt8pT6vhCmNzebMTlZ3BVRkJXsUN0lNgvh3Rvgzgh7SE8RJ2gTklxaCITOrrMaoe0LwjaeJkiHK1S pq8piOsVvOruMHDQFMvxERwR5kniBaQ1Caf4+LG6HYXBAUw31p/vOVJNtx1+1asZZxq8uwBSK+/3Y R/bAJ3gcL3iGvMc8ZmpQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKZSm-0068zD-Q6; Wed, 25 Jan 2023 06:40:53 +0000 Received: from mail-db5eur02on2044.outbound.protection.outlook.com ([40.107.249.44] helo=EUR02-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKZRm-0068dz-HC for linux-arm-kernel@lists.infradead.org; Wed, 25 Jan 2023 06:39:52 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=J4eo3j9DFibXNb3jjLFYayWxVLZ98Jrf3/UI2rLCfuwv50hAzFOJ0Y4YNxHXA7frT0KyUYnN32TIbo//0edmUmNVaS86/fOYPCyspYsMMTCjm0TNvaOEfglTPWYJJCWu0HHn+TcnYrw0ryMaRIBtPZyUGmuV8/P2c/+sjuNaLjqUYz3IuYkpNXOON5ApCXdIEvYGnUbBoGaf5jO2nEDOsIYYJRFn/tdAKwaQ8wDA2LamjfZnqNwEG/hdETJmrtaWJaJzBdUyX20DANxIIfI5UP38OAM3fuoZPIh7awQsXnOOmTgMfBC9KinCsizkB7huHX+MJBTaSV/mX2GaiiuAnQ== 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=a7xbrzQXE526yhSX7xtTpEVwQodi4YtqOzy0tAlMi7Y=; b=DUMyhGUhiTfujpz5a2bnOwNDKHmDUL6XLlKWAg+5tAzKTD4HRfrPO6fF1GKBQ1+xDBEdvcHNXRZenE9GerTb/RAwWUY/7aeYXdCilczcLF6wiy9tpv4F07VVIWsyOd1YQUyR4j/ZC91CP/oayJPEADDG9uGuUJK4OpVDqR5yVGHFYHe8Gw1om07zh5Apd8/bPMNO4CugjIbZ2rc8C603n4eVmtX3I29p3irE9WLxKS0/NorpSt+4o5C/Mbnsoj790Kp6FMKLtl8Z27FpmPguTtNCNnWUi75EuaV/pfTy3C1RFwWSh9vNYJIWcizXX+SxnSCTBdpRSBQAGMwSUGj73A== 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=a7xbrzQXE526yhSX7xtTpEVwQodi4YtqOzy0tAlMi7Y=; b=o52W2skM8j55+cixuKOkYPnGNZpT3pq36kbirXgWu5ADKOjMWVkog7zYFk2M2Xv/5ffQLM9Uyse07Zg9dmmUIhkxYwIq25Fh1y6Mdmt2JnObtk46ONrAey66NadZOi5UBamEd7vYqIlST0d+O3CNBoIVBGKyb6n4H+UjG6KlUpw= 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 DB9PR04MB9425.eurprd04.prod.outlook.com (2603:10a6:10:36b::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.33; Wed, 25 Jan 2023 06:39:46 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::5725:92ec:f43e:f5fc]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::5725:92ec:f43e:f5fc%7]) with mapi id 15.20.6002.028; Wed, 25 Jan 2023 06:39:46 +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 v2 5/6] drm: lcdif: Add multiple encoders and first bridges support Date: Wed, 25 Jan 2023 14:40:29 +0800 Message-Id: <20230125064030.1222121-6-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230125064030.1222121-1-victor.liu@nxp.com> References: <20230125064030.1222121-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR02CA0073.apcprd02.prod.outlook.com (2603:1096:4:90::13) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|DB9PR04MB9425:EE_ X-MS-Office365-Filtering-Correlation-Id: 251b2399-00d1-4a64-6d1b-08dafe9ef2ee X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: gQzc6+bJrScwjQabBdANDZD56Wia0vETMjSHcCijYWBSjHfcL8gIFi3c+73EFiqbypAkmdvwCFjnmeG015LqSiXj6i+xsqia3L3Lov86SfrQ0YbYadBtY3Dt9jneEk41jX2KIrxYJ6+MFYBnN9wgAtsRIx1KK+Mf6TkT+VVQ1cHIOfOZrQx2H6EeRqso+lIVmOV2z5iZoYCTRHrYGC7dU4UVZor07I+zD6S1wCCkPX2TFXDqRxoX4vFFC8t1KkPKh6Q3NAwuVtntMX6TvdRxRDQ7fl53AhoHnaJQ7diM34QD229ErAnWv98Oa64kzQNZ4BFSngl/gxqOXwav9TDYY5CCfc0io6wqMJjquMvM97szdRwY7qj1WL3DoG8tnUDeJWYFcAxcGfcsAwuP1dsv+56MoW6WHjC3TVbObqyKr5oRg9lSvBQLYXSSqhntCszFFK7/gI39eryHLUYel24qIyEQ5Ag8ObLyulLVg4y7DIcI/iuw7zInF0tbanDwF3G31HGvynXnxG6UJ/HYRwysD583Sayn156K3BIzTxCzYjKy92Bm+HkkKQ3Ns6titKMdZjnek7eFpHyiNSQnxsZndWX4+0BWEZ3ElA/7NZ09/M6DNYLoJ1DD7yjKEOJ8ZcL7i4oLhhwjyO68dr82nZ2BDp1GSHMUeyYwCAWrWB+LODmCfJ3rHUr9wUOreZ+cWk1A00vOgBFXG8QglGPf1IT2kQ== 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)(136003)(39860400002)(396003)(346002)(376002)(366004)(451199018)(36756003)(1076003)(38100700002)(8936002)(316002)(5660300002)(38350700002)(2616005)(2906002)(4326008)(86362001)(66476007)(6512007)(66946007)(8676002)(66556008)(41300700001)(83380400001)(6506007)(26005)(6486002)(478600001)(6666004)(52116002)(186003)(7416002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: Ctj47KpYEGPRdK/n2g4Y4HaYVwwdPPn1LoSc2AjBPMSjuGTX/SHThWm31QHZaTU1xdWvXCGUG/Xdd8jsWrKYfW0TzC/ahb9QbjdHNtNCNi1cneU+K3sI6xLLErIYOWacO8dtaIWklDWZTOHdtTwWHECS7FWKUznsXyDDE8yPQwK09mu0OJ3I3/VTPmOEJI7M55iL6V7YUNsuvSttgmq3CYnho8rFa8bwClJJbSGb3uWP23OCAcnFI7OZOezMN0YPaANEXvvMqS+ycktVNazuIFz1wuj4Ir0dLu4Q2PmH5XrvLgK5HUyH5SvGuk8V2G1Y1qRA63i9Fw5kyiF5I4bm9gpoz4wN6Jsm931bIM3lhbfDGhk2kmVwFsbczOwVA4aQAe4WjRA7eOQyLUnh6mLaIfbMBwUCCvBVtDHJ8fxGyybIh1a4iIjL1oqtSkv/g5LiLIIR3aiTJdD5D91PPInAMZu4Y3x2+hsPyVcqDMfsqdA8gMOkUz6ukaox/iRLlf6GXS586gip4siGHyYhN/ILlk3BNyzY9x0IAeo8YlFCbU05po9KF4jhImQXvkHQEJRoBIoj0dtAlh/ZXGoKQ+jyesJPOsXxu5ajIG0vWfc7Ew3qT6vbku5u36q9V6RZjcKyScT1VutJBMzw75OIYTSbF/mX6RNe7R4hXj5/2juWfzVL9liVpr+t1qTakN2VW23ssNZDj4LWyacvtTolZVT5MquYUfEguMEeYaZhZPr79lJJ8hND2eSi07S8IYl+VppzTSnNGpOKYrh/vo4Ymguw+nwfcvYUytmQkRg6T84gs/T7GamJ46I4SvUdrayMyfB4bDIJ46e+7UYE7ZdT3u/efZkWjyoO5zTQ3K1na6dRDtRmYn5ppAasv2PBHPwQmKXlZJd25GuNtPBgKp2WOPF20j66SZaaIGnQ0CFv+/rKxGLXb2vzZe7kb5dyK41VXsOYaR9ih/oWHIdow1doitjjWABiPE8A69Seph46ykUf402BDS4hqcEKdCmhGNFwFtsKB5Tl8gVimb81snGOxSgApp1RG99Sy0OSu46AUGa6W5+/CRr1gcyOOP/qNe4siU/dry0C2YMyyxZOPPTVedT+EKSllMONNy+Zp0mA2T9T3sjBbBmAoQzDnS8K+P1KztIRDZsXp3UjRT0tBL4+twvWK8Q4c0Ln2oac+pNSivC7F+R5+Sd/Sw2em2zEG1UN5ywpxhnhuiAWj6rm/IUzutMyMDf8lZFHQr2/lso7wJ1xgx22TnMKsT7wjQjNeJXI0lWCQYbXby9ANjXa2Cl6JbsheUuraRbjtpqRLY+Un9D+QnC9lopWlA9kxP5OF0uL0pXrkEnE9pZBvigHVXaN78PHAKi9hz4IwAlQfOCnxcbVZO3xj5vmlnkG7uaqApPq3BVBFKbUMSFZNSqELbzNxiQ+XYSt2rv1ExSzwl4qMQkmhReJaXTxNIDFyjR3sFC7kXR45WFJ6OpClev0IzizRIoBc0agxk0fkmOKE9Y+T1u0NjM4JpoZczW0sPwjoNcLREczmKFC2ukoiI6U9WUua/XXKS4z5/1rXF19iifp2fQRuWlSZWV+dm907ssd3ec2Mpgt X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 251b2399-00d1-4a64-6d1b-08dafe9ef2ee X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jan 2023 06:39:46.1908 (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: 8d7KMXDeKReolZIxSdCbjl2meBOKwRzLFidR+03eUlDQuIqAEGvqDpLVnV+B1MbvGrSI9x+JmzD0fdI8UBcizA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB9425 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230124_223950_654346_A5602645 X-CRM114-Status: GOOD ( 18.75 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The single LCDIF embedded in i.MX93 SoC may drive multiple displays simultaneously. Look at LCDIF output port's remote port parents to find all enabled first bridges. Add an encoder for each found bridge and attach the bridge to the encoder. This is a preparation for adding i.MX93 LCDIF support. Signed-off-by: Liu Ying --- v1->v2: * Split from patch 2/2 in v1. (Marek, Alexander) * Drop '!remote ||' from lcdif_attach_bridge(). (Lothar) * Drop unneeded 'bridges' member from lcdif_drm_private structure. drivers/gpu/drm/mxsfb/lcdif_drv.c | 68 +++++++++++++++++++++++++++---- drivers/gpu/drm/mxsfb/lcdif_drv.h | 4 +- drivers/gpu/drm/mxsfb/lcdif_kms.c | 21 ++-------- 3 files changed, 66 insertions(+), 27 deletions(-) diff --git a/drivers/gpu/drm/mxsfb/lcdif_drv.c b/drivers/gpu/drm/mxsfb/lcdif_drv.c index b5b9a8e273c6..eb6c265fa2fe 100644 --- a/drivers/gpu/drm/mxsfb/lcdif_drv.c +++ b/drivers/gpu/drm/mxsfb/lcdif_drv.c @@ -9,13 +9,16 @@ #include #include #include +#include #include +#include #include #include #include #include #include +#include #include #include #include @@ -38,19 +41,68 @@ static const struct drm_mode_config_helper_funcs lcdif_mode_config_helpers = { .atomic_commit_tail = drm_atomic_helper_commit_tail_rpm, }; +static const struct drm_encoder_funcs lcdif_encoder_funcs = { + .destroy = drm_encoder_cleanup, +}; + static int lcdif_attach_bridge(struct lcdif_drm_private *lcdif) { - struct drm_device *drm = lcdif->drm; + struct device *dev = lcdif->drm->dev; + struct device_node *ep; struct drm_bridge *bridge; int ret; - bridge = devm_drm_of_get_bridge(drm->dev, drm->dev->of_node, 0, 0); - if (IS_ERR(bridge)) - return PTR_ERR(bridge); - - ret = drm_bridge_attach(&lcdif->encoder, bridge, NULL, 0); - if (ret) - return dev_err_probe(drm->dev, ret, "Failed to attach bridge\n"); + for_each_endpoint_of_node(dev->of_node, ep) { + struct device_node *remote; + struct of_endpoint of_ep; + struct drm_encoder *encoder; + + remote = of_graph_get_remote_port_parent(ep); + if (!of_device_is_available(remote)) { + of_node_put(remote); + continue; + } + of_node_put(remote); + + ret = of_graph_parse_endpoint(ep, &of_ep); + if (ret < 0) { + dev_err(dev, "Failed to parse endpoint %pOF\n", ep); + of_node_put(ep); + return ret; + } + + if (of_ep.id >= MAX_DISPLAYS) { + dev_warn(dev, "invalid endpoint id %u\n", of_ep.id); + continue; + } + + bridge = devm_drm_of_get_bridge(dev, dev->of_node, 0, of_ep.id); + if (IS_ERR(bridge)) { + of_node_put(ep); + return dev_err_probe(dev, PTR_ERR(bridge), + "Failed to get bridge for endpoint%u\n", + of_ep.id); + } + + encoder = &lcdif->encoders[of_ep.id]; + encoder->possible_crtcs = drm_crtc_mask(&lcdif->crtc); + ret = drm_encoder_init(lcdif->drm, encoder, &lcdif_encoder_funcs, + DRM_MODE_ENCODER_NONE, NULL); + if (ret) { + dev_err(dev, "Failed to initialize encoder for endpoint%u: %d\n", + of_ep.id, ret); + of_node_put(ep); + return ret; + } + + ret = drm_bridge_attach(encoder, bridge, NULL, 0); + if (ret) { + of_node_put(ep); + return dev_err_probe(dev, ret, + "Failed to attach bridge for endpoint%u\n", + of_ep.id); + } + } return 0; } diff --git a/drivers/gpu/drm/mxsfb/lcdif_drv.h b/drivers/gpu/drm/mxsfb/lcdif_drv.h index aa6d099a1897..c7400bd9bbd9 100644 --- a/drivers/gpu/drm/mxsfb/lcdif_drv.h +++ b/drivers/gpu/drm/mxsfb/lcdif_drv.h @@ -14,6 +14,8 @@ #include #include +#define MAX_DISPLAYS 3 + struct clk; struct lcdif_drm_private { @@ -30,7 +32,7 @@ struct lcdif_drm_private { /* i.MXRT does support overlay planes, add them here. */ } planes; struct drm_crtc crtc; - struct drm_encoder encoder; + struct drm_encoder encoders[MAX_DISPLAYS]; }; static inline struct lcdif_drm_private * diff --git a/drivers/gpu/drm/mxsfb/lcdif_kms.c b/drivers/gpu/drm/mxsfb/lcdif_kms.c index 4ea3d2b2cf61..5f34d01e133e 100644 --- a/drivers/gpu/drm/mxsfb/lcdif_kms.c +++ b/drivers/gpu/drm/mxsfb/lcdif_kms.c @@ -654,14 +654,6 @@ static const struct drm_crtc_funcs lcdif_crtc_funcs = { .disable_vblank = lcdif_crtc_disable_vblank, }; -/* ----------------------------------------------------------------------------- - * Encoder - */ - -static const struct drm_encoder_funcs lcdif_encoder_funcs = { - .destroy = drm_encoder_cleanup, -}; - /* ----------------------------------------------------------------------------- * Planes */ @@ -754,7 +746,6 @@ int lcdif_kms_init(struct lcdif_drm_private *lcdif) BIT(DRM_COLOR_YCBCR_BT2020); const u32 supported_ranges = BIT(DRM_COLOR_YCBCR_LIMITED_RANGE) | BIT(DRM_COLOR_YCBCR_FULL_RANGE); - struct drm_encoder *encoder = &lcdif->encoder; struct drm_crtc *crtc = &lcdif->crtc; int ret; @@ -778,13 +769,7 @@ int lcdif_kms_init(struct lcdif_drm_private *lcdif) return ret; drm_crtc_helper_add(crtc, &lcdif_crtc_helper_funcs); - ret = drm_crtc_init_with_planes(lcdif->drm, crtc, - &lcdif->planes.primary, NULL, - &lcdif_crtc_funcs, NULL); - if (ret) - return ret; - - encoder->possible_crtcs = drm_crtc_mask(crtc); - return drm_encoder_init(lcdif->drm, encoder, &lcdif_encoder_funcs, - DRM_MODE_ENCODER_NONE, NULL); + return drm_crtc_init_with_planes(lcdif->drm, crtc, + &lcdif->planes.primary, NULL, + &lcdif_crtc_funcs, NULL); } From patchwork Wed Jan 25 06:40:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13115016 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 4B552C54E94 for ; Wed, 25 Jan 2023 06:42:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=dZR94hKhIoVlF+ZyQk3+RWZHfvzTSSkQqrs0EakU+NE=; b=tpkZlOGwM2fkWT lfnRxbDrjIa1hLSZvylgY3SwqRqmYrQG1xgpa1PuEqXsvEhhJcBWNWVs5fBRCoV5BvAprxtKVL+75 YTaWTLPSOgEk+5QXL8k0EpMvkNZWg6Ct/aXT76sRhoBsiSbGnbtTxvdee7Dr1R8/ljC1K7JOgNMJZ RDhhGaF3rfuuKsS4t2tR9nThnVcDjV/amROQJgHikLMvRd5emgxT7AjlEA7kOrmZY1Y3croSc4GtT SwrhLvSubrRmHfju9lHKPa/f3vjioWlQ20PtlHCD1D3shOHg7q2gOd1aOO6zgeRcXyZMFeqBMbQ2o XJvNik3xb3HRAA1Ml9Fw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKZT5-00696Z-UO; Wed, 25 Jan 2023 06:41:12 +0000 Received: from mail-db5eur02on2044.outbound.protection.outlook.com ([40.107.249.44] helo=EUR02-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pKZRo-0068dz-R1 for linux-arm-kernel@lists.infradead.org; Wed, 25 Jan 2023 06:39:54 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dhHnt4BKGBPsxdoyFRnTuGaazglidi4eeBMJDO3HfectOFLMXxn7QbHoVHjTf4jrQi45O1ovrihDEQkXZLb0ld3lO65wVW2SuS+UepB2x/jFhP/+jb8F+PDmSg8INgT7M/X/t/XgQ+aNbaMlO8l41BhB2/6rEvjBBHcAqtT414djHFvXE+OFyEe+7pgM1WjwZ2wwg2grSeMGUar8t4UsIZJ9LmUEJiYxKN2DGYPdN7WgV+ey9IAYzjoB8H3EDhUMKFRHoW/v0UbbQdA6mgfzRf7j51Mbok2F8cZ4EcvztgFcMMGnJaVH/LRsOVT01NAAElgO3mKYT87yd4fav+DiMQ== 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=ejD37PBFxcbuR9dxvWzFzWD6+snC12C1C9vO7diPB1w=; b=RDHqWCwHhzqdEX/ze8ZdK/i1Ouk9aH2vV3Rdw7Wfbq+I6Re6y191ADCem19AptnR3LzbEGQR3jwENnmiD9/5IeUFcDIJzkVTR53HWYdKSIc6tI4p6C6FQmtsfpFhqcukRZNjki2LzFGYEvatIHn2Hvu8kwMl7cAaGdziYmhA6IC0q81rpEoZJSR/kDOOTZHJGPcRogGU3XyEI9zk/iZ0JvD6LS62pm/Reid+YAu9O/epCgxDOvkcc8uNg+16r0ag8RufdRA/Ms2DkWMmC+eC7liktiQ2+p3/+/SuaAQq+NNmK7viZwy311gdMPk+xEzLy1W01EadXR4Tn7ZZIZNiAw== 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=ejD37PBFxcbuR9dxvWzFzWD6+snC12C1C9vO7diPB1w=; b=gFhpJMTx9+2vD9ER2tefTByjGn3zXhBr1YXnQIYW6GAh1QGIsjFc1PtowH1buM1D46EkcmhOYsyyDy5T3uV0jxjnnZ6ZGbyKCakg36/ivuy61/5bMjWER16S8NFpwdY82LVmfEHf9yy7GWVPAbWFcvKmiBKeyRVXKsVMzsUGYuo= 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 DB9PR04MB9425.eurprd04.prod.outlook.com (2603:10a6:10:36b::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6002.33; Wed, 25 Jan 2023 06:39:51 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::5725:92ec:f43e:f5fc]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::5725:92ec:f43e:f5fc%7]) with mapi id 15.20.6002.028; Wed, 25 Jan 2023 06:39:51 +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 v2 6/6] drm: lcdif: Add i.MX93 LCDIF compatible string Date: Wed, 25 Jan 2023 14:40:30 +0800 Message-Id: <20230125064030.1222121-7-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230125064030.1222121-1-victor.liu@nxp.com> References: <20230125064030.1222121-1-victor.liu@nxp.com> X-ClientProxiedBy: SG2PR02CA0073.apcprd02.prod.outlook.com (2603:1096:4:90::13) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|DB9PR04MB9425:EE_ X-MS-Office365-Filtering-Correlation-Id: f8b9efd1-6279-42ff-e591-08dafe9ef5e7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: q434lK9riU2qPq2dWw2X58jFWynx9WeEGAxfP/472WJUB6zNZGSQtZH4n7ntcjaKMTfm5+ZbCH+/rygLpAMm6bZWQ2gMlCTpi3c/CEzB81yf/v20062mpG31fI6zcncIQd0kXluM1BpKQu2AgmrHjWNZt4hTbhEqEq1SE7b8xT+4simoevTW+mBhB2IvrNYOoHM83rcuw86ALOL695xwkFCrLLBtu2x0HRETUa7kBgSPmalxZ2jJnhlINYpWW2+W2DIuHxghsvl9QL6JTs7I5RR89mhR5Lj01ra0TrSGHLwEZuhPVzhl7qkHWLFPG/2hX22ml0iHbTuCw7yVKcfE1gOqhxAmain4+wphEPOCfcVuyS7CQCxJSrFoOQ28X25ExzWglEvkMzI0IV6m3yHVyIAwh7UiynIOcPbqtqDvqOPfWeRZt6iMRgsy9iNlSabcv5fGk63/1bVaL1HWvrwLlE5ZyW4IDFD/6UC6E/tWS9uF+vNRWpyo5kgQzzQjUtkGFwMlHOLBm3Dpzn77tKueS6YDv1DaxKewMd6hs6GE2KQdarivAeaevKvjUUCBr94Oa1tl3MHLYzodAfvbY8aUW/PtrMYRSXT0QloGDuSI8wmAbvlldZKSIOlBIHyiBQVNAKt3kj2NfWN5lxQ/QHD6NoksvEB2HaovOj+ar5VE5em/L9bk7gWCIfcqb8g+K3hcSWEBJxSjpTOzGrdrUiLMCA== 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)(136003)(39860400002)(396003)(346002)(376002)(366004)(451199018)(36756003)(1076003)(38100700002)(8936002)(316002)(5660300002)(38350700002)(2616005)(4744005)(2906002)(4326008)(86362001)(66476007)(6512007)(66946007)(8676002)(66556008)(41300700001)(6506007)(26005)(6486002)(478600001)(6666004)(52116002)(186003)(7416002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: C7WUG6S6yxy44lu3fekVmW+XtCtc4mjlIKgSce7guKcVFOA4zvlQ0zxcz69PgimVZ1rCvVJ93DFIX/ulkrDtq23pHWlXhwnCo15+bMi8r16uG1XMupAmtpP+L1Ai+rjtUVZZLTipY2HGcqSpuhcMGpTUb3+qoIybCirO6jFMCGyPgzjG5Y7pS1unrxM/Z4QRS1nioZMr++I3EucYj0n40TwzdtKW+3WqUMqM//nzgk8Cy6fvaFIuHmUmOygqYKI/KbJCWuWObQUtXMYU4fQCWHvHc+B0KkeWafoJ/FgQxd9gfFtGLZ/Qa8uSSpQwUcBHFtwJHUJA392rEsmBAa7wSR01/w5TFfjOXfxEqKH69G8N83SiEhjcuKP3OhXqAsEopSdnh2adAtjXHMOg10Lsk/04HMz1LIsd/ayqpFWdRJWtlD8vfb5ZzWFw99Y9pBtON9JhGkIYH8p+7NSWN8u4YyYtQSFqniP9Bq5aG5A0zNGWQ2cVEmF9an2/c/NZB2Ohgfn56qlW5YvQ0V1w70+Ls+ayb+eb1ESwzetP5Abf/BQMF3ag4w8tNnFe7wcZ62Hdiy56Q46v0rf4yUVW1Wl/2U1zbJzZmIf41mZbnCz+87C1X0CvyogZMeUvO9booT+wcAoRlpxWvfV8PBEtNslx8nTyUHkOHmFGT2ScoafWFXcPhowjiuTOIdlFU1bPsGsSxWCmfFaZk8Shrsf4ZXJ3Iak0Dg6N2I59TUzHqOyGW/UMYEfaBeWhbSDagCW5bF65yPvjrr/1IaEbf9j9yvBqPPSVeSX7rCVVvOxq9h8aoyOAXucRQiShrg2buxtGBXwCtZVJlFzuZYhUWYuDtqHQ/iEvPSWMUO8QH+b1mocj3RQ9AEu8vG0I1I4Tr1YvK5w4UwqZNsUVKyt/nE1Ve2jYhsUuLtyMIWMAg6OFdiDi2+PYFYYwefsGsezZ19uVVDl6UvRgcqeaAEkc3hGZPPvuYnHX3G/r9wtlwbobn0ePbXHdekLVoqEICOdlZRkucR2LSWr8qg9+x0lVIZxmOoZy+bhiiRMM4phfylpoTE2d7EibiykhdxQxPbqSgH7ziw4kepTNc0dybLDdqezOklbYG6ZPa4Igf3DVzUupeJpu/xhVH3rC9tQMZcmz6HJPPWCKuf62ewoi15YFX6W8sk7lOzgT2o7OLUA4lzv/1hUKwNKaSsk5W7QTl6g2FjuEdI4Dq44MedNb7duTjbLsUULpzgrWqZcLSxRPGhfyZGuURM+ArDlFV1A6OPLE7FuDJ5fIZPHiS/AL1OuAl1CJCkmnknQPb+IOpKiIorzGUKQ3HX3JM6vLbFvWSrM/jh+kywV1r7d3lhjBW6vwZ6NuxP8RDP0ecZ6eaC32EX37rK478hwFaw0hBGjX9rwYyhYCBsh5yk3+9xe1razr07Cxs1i2IRkgs4VoBLUva/KcP+61b8Ophd/nAmJudNPM6M5ygm5k4TpfX0XyCESUo9+4UF8PdMAn8DBRprcXq2dzojtzFLFnvN4qg/6vU7GyrUnKzaCLPyR5FJcRaFiexZOcuxmXn0spsBt3o32VGRuNbtI1anurF8v2kROhEhcTBOq6Ak5x X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f8b9efd1-6279-42ff-e591-08dafe9ef5e7 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jan 2023 06:39:51.3999 (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: nUnvN282wvhanGqAszl5g3O7Sl8zuvRgoUF03fPVcksFudYT4aVkK3+OxgSnVP08wrJbjMVyA3UgO05rNVD0wg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR04MB9425 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230124_223952_916149_BB0A1BBD X-CRM114-Status: GOOD ( 10.97 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org With all previous preparations done to make it possible for the single LCDIF embedded in i.MX93 SoC to drive multipledisplays simultaneously, add i.MX93 LCDIF compatible string as the last step of adding i.MX93 LCDIF support. Signed-off-by: Liu Ying --- drivers/gpu/drm/mxsfb/lcdif_drv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/mxsfb/lcdif_drv.c b/drivers/gpu/drm/mxsfb/lcdif_drv.c index eb6c265fa2fe..48c43b273a4a 100644 --- a/drivers/gpu/drm/mxsfb/lcdif_drv.c +++ b/drivers/gpu/drm/mxsfb/lcdif_drv.c @@ -249,6 +249,7 @@ static const struct drm_driver lcdif_driver = { static const struct of_device_id lcdif_dt_ids[] = { { .compatible = "fsl,imx8mp-lcdif" }, + { .compatible = "fsl,imx93-lcdif" }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, lcdif_dt_ids);