From patchwork Mon Feb 13 08:56:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13137974 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 8BCDFC636D4 for ; Mon, 13 Feb 2023 09:11:45 +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=hanmHU4dFeJyCeX9mbCrav9j3xmtx8kDzD/iJqkMiLc=; b=nyo/AxP/8alCpU t3MYS58QtGbheEeY2W9wqMNNsSz1iTi8lizP/tukmN2R4cGIfcoYykZpLZhE2Ix2T48xLmz8+HqPa YKvbKUzaHfNRM/Q0o6RWZFTlux/cGJqXWsEtm77MBIAje33A8IjCY4kFWTX4BzxTuUkbqmMO6ufU/ t7mXA4WNiK1DWWgsvatoFj8a5mpoqKctDB+QrtkKSkHICtIkbYUlAz7o5uiRLa2z3ZjDO5cRnq14M vLh++/Za9RN5P4t9TANUOo9MFsP0hTB/jefvWmMyO3Hh+24Pj1PvMEGE4MDQ+q6Ga1ynBC3ko2Wfr 3ExoHDU7+owptfGpKIsw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pRUrH-00Dkk8-AC; Mon, 13 Feb 2023 09:10:47 +0000 Received: from mail-dbaeur03on2060d.outbound.protection.outlook.com ([2a01:111:f400:fe1a::60d] helo=EUR03-DBA-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pRUrD-00DkiT-Rw for linux-arm-kernel@lists.infradead.org; Mon, 13 Feb 2023 09:10:45 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lG5N2t/9ZOjW7BQLuWh0t4qv+1G7xWJwftom7HzsoUXOojtA+pTstbGSGwM/tGkUDrN2c6PAM9ipMRlxlGzihAIoEPtjAXAz/HR/4QA0r8wEpI2N4GtJC45AtQrWOcxj3PTK/7yh49dBI+jiaPvXAEE6I7rf+SZuqixUiI6a9RdR2TWNHSjZxlA7rJvQIiFFtXhAtL6wVgerveaEtMA9hhaEPpOXKomJuLhyRZ1ZnAlDvLWzS52xz0YuYzC6mTRq/Lu65SZEdOrnQF9ONq513Jii/ZXg7gvbFg0hROut9fw0HyIat6es+3ozwUIw6NpqiRCouYlvjPhcVg3jW3DkBA== 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=/SUhQVQzokpbnZ5hLrxn16lkitUjkIbMyWXVpWOhCJY=; b=DS8SH64AWK8tgfc5t+2Eue1ACngM2ZvmGlYTJNcGnYTZX6DMGt7sJyMB11ZXZ7ykRcHBoiktzf8mlw0bVWhB/XyaP/AMb0pA/Kh+4if//22rw3U+nBIMre5gGUnedjPHJq6l8M92HsiEonj6OawKZEsGCc7lS8GW7gehegF+NI6SMVfuwDX6xtT1+hYbDMUpdRDhG5e2vqL8zL+JMBJRa4C41fnrZQHk9YO9tysOSk0IFIVBRNJayk3Yvgso8UiXWgG3HyLy0ZKa9Tn1HkvYL7NGo341RqgLpEdNJ/q+uL05wanlE5+oc+yqoydAWzhoSjpfdGyWp8ybIc04/msDVA== 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=/SUhQVQzokpbnZ5hLrxn16lkitUjkIbMyWXVpWOhCJY=; b=pvFnckTLdJlr9MGdLiLWo/zLZ0E1IDTs+VER8KIyEmi2vumzLMP86VXJTNNAXSP6PeT3G0ljfrorZPI/bN5Hmr6sTnaNfRMLzlUowJJd95RGds4QLtz5rPmG4/gQZkw7JigJ9TZ6qA+O4V7XkWcqOupwLEeGyiJeuXREXXt7T8E= 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:12 +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:12 +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 1/6] dt-bindings: lcdif: Add i.MX93 LCDIF support Date: Mon, 13 Feb 2023 16:56:07 +0800 Message-Id: <20230213085612.1026538-2-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230213085612.1026538-1-victor.liu@nxp.com> References: <20230213085612.1026538-1-victor.liu@nxp.com> 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: ff2c6fbb-9d7f-43a8-7773-08db0da00433 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: nwDVYcBx1lzJhbB83re9vGKK3lnmVd21qtclL/o7eorEwfsPFG60ZTA6/bi/1aJti+ge16Yy8nnPIGqHpqIeEO1qeZbQDzas/ApW16mgafDQ9467tqjonEHDqJlfJ0zyDn+9fDxuTbUY+tfEyb00ebA+OuU4e6xcNJqfJOx6YH7F/8rNozjoWjKtKxmmsBhvcZZ88d5vSu2kHH8oVS9iRRqz3sTlmT+NsqpgB4nA9u53Rwoc9kLsm4HoZ73QJ07j1RK/9vsZsFp+PzGuuKXomEcsS4hsAaoEVjUW8Dd1Or2e1/3ZwmZ1ay7SGgiI7Vq5EjLvJOXHovue/2wy3+mKZyCIKzqVN+RyOydF8IDOejcqBHEQTCw9Au9/jwBtjFsxlT3zOGpo7k40mG2G4pKYxtuc6jkMZEGruuvYpJS2QRdPONLIi3QMb85wEJb79of4tMXa4VcPkFKC68+TauL1CRbFtQ9cQZHSjgyIJz7ZX3+dYpHr48DxwEKF1STmpJ5gT666tQ7FxacG3a7o8usoMYa3DQVZmfBI0PbYWyaIk/wdDC9X6y3hIAwWzep/0mEJAxqGgwYBLm1CaYhqzoA8JFAqoDoTfBW7TdkKXYVWGYzFy+vyX9b0AM0vPEEOdx5NztK6QwoaQ1+0n8rBl1+38NWL1aYMUO2xMuncG/E3bK5ey+hbmRIaphmTz/3fP6xrQKpA4ow9ovZdkFvUedldYQ== 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)(6666004)(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: nai0GX83DPAdmaWc/iPq2Fj4Ee8/CIWHlXVqsrapkd7iA2X1qlIwcByO+FYzIvnVssc8WePNdQTPOWD/Ixx+vj0Sf22N2pvVHcmt+w+N886gLoo454uacP1CARRMA9S+jB67cnJ1byGqj5X6frDDfb/jCl2+mhrWDqcSF03Z9e2JPqHVo1IWOT281R3t1f+cm7wSgS6YzRZ6Ok7PggnS1fTAuNd1s5I0m66PPfpanexV6NhwZuMY/+jnD89VChkt+9nm8qgydMp2zjfkUB3SNgFKVktCMYtvSeZ5GDvXke6fqRbIOAyVMEpLwbIfK5c7jtlvWqvvY+AJ5KPFaG4gpuK/2Z3+u3MFGX5U3SJrZXP8WS/Dofir/pgJKNYsBApcs9Swepds+4Vzh+4lFsFPvfrZ/VGzXjWYXbT385xc3kcSOFqW65NEnIPueg3ZZtg+WYsLKAiDrHivFi7LXTvWt3Ei18vDMQ76p0Gj7pmbM5fThVapmlKox4S80aq0qBkdFiuNRTB0gkHeWBJIi9I0McBbj+GWr+FJfybaNwGsoedUh7LJgcWiIQyl2pxv5pXbIAx8n/udl3b62kwwevir0PBfvYHI5xDl7kvF8kvjOCNFzZQl9/Qp5V9SLPj36wcTfCWFZQUxABvSMMr9H5teZ0iodyxGn7NBagM96eFRuSKQrsKkwNf0QWBVyY20xXihUjvgJ4LM8MmuKM5QR9EbITLA9EXBm1uCb8eQniIKHJJIeiMGkV9CB+Jbq4/C2dJVH3VBtUoAehACrgMKKB0SGiXDlZyXaQXHZOvM/QrS53lR2UEXEn+mJ0QQjxGY2y9FoBiASAypEn8brR1U6KmPEAmjDnR8DnbV8yVpg/MNui50tlx8CTAMVhJiaq4Oi++Wp3dr3J5fQCSQYm6Ep1TORnEHi+bcR95KbG6jCDibGSaw7pB9vYLQLfL+OMAegsy+eoJ3Gzc2Py7bTAv05LvLmbFTJYewXpTcgvCVSyo2jfcx31AD4fg+30SMH1YNg32uZQtQszFXU7AQGE9h8ORv5A6ndaG3mlBjwPjICdsnBh9ay7An1dqUYq4RK/14aM3vJ7IV5jytw5nxnXGTLzrydazH+A4sgr+zQqgwg0CBlLuBB9wm1t/MNOhDdlNvbuOvTvEz+ZlleoXV+Y4zRmGopNB2/ZRKG1YbxW7f6fmcxgtfdhsV2FkYOhlSrzy2WUqUFYG7qAcpafJbawizWO19z6oRQX7BijnbtzXhZGBXGpSC3D/CsesDl3STe2Q5rDRVGSBTGhMu7ht0bEmRnWLsSRMlirI6mlssmi+m4434ZllUPSUtrGy9GzDQWYQTlpVIWDF4so29wZ9bZokF3UxT2Q+ixFeCYqfY0+6xUAim+DA9ycq0SEMnYDQzAc+zO8HDxYuYLFsEnobtSMfFFqbaTjrgqWdKB5zVjNlyO6TafmDYQLmbFmASUkPJxOVgz2q2DDRUKA3fpf7OT9dm3amcmfkLliByjQq1oP99wgv8DNmGtF7+Imr8RVY67KFkyBfoqK9tTI1Kk3TcjDpOiWHtxw3KpRxi5jzH6Z9EfDo6xpT8o14Pf4oSc6k1zRNrmasL X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ff2c6fbb-9d7f-43a8-7773-08db0da00433 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:12.4634 (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: T3qmzM2mFi8F91tXOQJZGM1AQQbLlMUAA+IP7kGY5xbmoDK/RuqzssNJOu6M2OudSEN5CeQu3n1/pMjEZHFnXA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR04MB9135 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230213_011043_919199_07EFE088 X-CRM114-Status: UNSURE ( 9.93 ) X-CRM114-Notice: Please train this message. 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 Reviewed-by: Alexander Stein --- v2->v3: * No change. 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 Mon Feb 13 08:56:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13137949 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 CC82FC636D4 for ; Mon, 13 Feb 2023 08:56:32 +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=1WYqGAMyyeSzHlWiJvYNTLlLBKFtwVYCRcA+em3xSdw=; b=k7rgRHt4v4wGgx vuymk6m7hFhVkt4uenlk81k5RYqCwrWLtTg0hGIAos4eOsbwGbuAwriLqD9bZ/WkUBdh8N6lfAK3H gMNNYxf3VTlswdrWtCd0RkaA+2fb9get+61csq5yT65P3hZL7qan84q96JopIackj4oCR+5Wamzi+ oLnZpl+TCjpjGTCQ3ODMApkyzCwoXru280mOo0Vtzqt9FicORu4KuxhM9HZhHhGl7e10tTy7kjPzH c8rq3u/yy13vBGdnkev+qPZsIWX9kwEsH8K5DBjGdQZ/PX2xcqaZhpzTCDjwHP+e8zvM8x6Y1ngeY Svbcp6HER+ziUILD5+Kg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pRUcS-00Dg88-1N; Mon, 13 Feb 2023 08:55:28 +0000 Received: from mail-db8eur05on20601.outbound.protection.outlook.com ([2a01:111:f400:7e1a::601] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pRUcM-00Dg4y-Sj for linux-arm-kernel@lists.infradead.org; Mon, 13 Feb 2023 08:55:26 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=V073yHrwnl0guTrdzfUrVjL0dn1xG1yE/kqHPv+k6+2RXR1E2pUslMayB9UTRWSaX+Aa6JPEn6NSP5Ut2/dQoPNLhPWBPSIPNc59+Ki40jWz1M6EN8ZkFMWrhYUNZajwUgLrPa2bxBNIQJvq/4ZJ/iiESlDyPtfNgiSygbmmgUjyAXA7ulLyoQ3YNvmiG7p/ZZjousBMq6nLXvpPkY0WaeGHm471epnNV6diEHL9X+YiUuqOxoGJNG9wgmJahOxALTmKqT2z26uYE9cHoqw9Ub9h5NE+PwMMPANa1bKdmQyfCfu2cQOq7XTXD8P3ERoyVvogl9U+ORg1+MxR2X26GA== 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=L6NnXmZ44ctfaktKFPzdLi2unr3ubsu9j8G8/JUVyNU=; b=hwQeu7ehP67u32n6a4fMNIm/wlO0y5WA80wcLMzVRBnEsc375tYbKpmk4+MRVFwgkjoLO6FU9h6QkbWlYORD3OMrjjqXKzjl3EWsrB1IZGU+1lXODFunCYrvqszomLcp0DmyNB9uy3OKJU1TW4MEAyH/masw6pmMPTnJMQ0iO4h9Swu7PY2biN8b5SgBLNfU9+1f30v3ZHe3YPG5cdS7iSRmppJL2yDuXM292dgF5rtpiswW1M6OAqB38rKj4LR6bwF/gAV82MdSxN4ol7Gu+PlKsba+0eVWw5y8sT7WYgbOT28xeaEnu5e1+jG+49NSy97Y2wAWfgflRrWZRIxJ6w== 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=L6NnXmZ44ctfaktKFPzdLi2unr3ubsu9j8G8/JUVyNU=; b=Yoi4PFGlgCjGeJkPoHdNVHUbpBDWPYa+GjzDLO+1EYVVjksh55Cz/H47sNctCHjkBFAGBWlDgpC4IM8//9Vf7h/IudCatJ/ZTCxeaW1dpjmhbx/0QuePfvy600FdZkWGkxqF7hLLSOZ1uN931SJG0vcsrR1WodIDY3tDEsNR3HE= 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 PA4PR04MB7600.eurprd04.prod.outlook.com (2603:10a6:102:f2::8) 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:18 +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:18 +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 2/6] drm: lcdif: Drop unnecessary NULL pointer check on lcdif->bridge Date: Mon, 13 Feb 2023 16:56:08 +0800 Message-Id: <20230213085612.1026538-3-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230213085612.1026538-1-victor.liu@nxp.com> References: <20230213085612.1026538-1-victor.liu@nxp.com> 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_|PA4PR04MB7600:EE_ X-MS-Office365-Filtering-Correlation-Id: 2c4ac0f3-54ee-489f-a698-08db0da007d5 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kH6pjT54zSkfCpwQuieUIojh2BM6xlgUMTHTvWW2e9mitbvb6uc5d+ZKaYjk+RT8jJoQIFGemVeJjX2dZ3AGRBJHsmnz5+h9fLWj0YYHJIiHY3nDqknh4PVCz9aw33N4uHXlsNuIPgs/cT5T6jiDt1NJjlakXCT23A4RJ7UKzly0+39v+gM6yMAOLaVXhyhEBFUFxguPg6TuvY1m60j+4+0t7aRf8rwElkjoklPhi9ZpnvGwE/l6qRFPqPWmg46ScMf3sy0TzcyXTy1zvGHnK58J5NtMvQ9Opog58UO+SWwpzXdkDNUgOzulEJ5cTmEVSghJnLqm1wA9QHIfhhoVxTm95NysDvmrDPUZLtk7mvJ4A8StDg4LpsRWOUNCeMeA7LNHQMYUhO8wczS/3MAK3xY7IWe1db4dDKUWVsOdCQsjU6Cb/4n4mskqPCPUaeaKiCxs0oud4jujp9kCSUIrwtR9MHvil0lVOj3EBzLDcD/yW+1WLf+5bl4L/thGqxsWGq/dQeW5JTnXS8XzUH8zE/pu2ufJi1oyxqHTXdjOlqPZ608hzG4cwWpRgGcYGwIAFao5cA9T58WFEIjYM5//bCAh0hIjQPCPer3VAfxnxV59o1nki1ZD2ICFSPdsZ4rwlX0HKX4hyns3pj+bM2hIEqmqBSWBkVhN8fHL9CHci+gjy82JTYwD40VmVtd2DNYdoHg8TsGQOn0fTyClyj22Ww== 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)(366004)(396003)(39860400002)(346002)(376002)(451199018)(4326008)(8676002)(1076003)(66946007)(316002)(86362001)(36756003)(2616005)(186003)(83380400001)(6512007)(6506007)(38350700002)(38100700002)(26005)(66476007)(7416002)(6666004)(478600001)(6486002)(52116002)(41300700001)(2906002)(66556008)(8936002)(5660300002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: JSLu4/LZ1HUxum3HLJCF5pQbu1v0D4SpfM/g7BrsAX2+mKqEKnrfxIqFDac66CyCRCMIPDuZVmfap589qywLNEHOaPNrAzAYXy1ljfhrcKk4F0BwbnoV6B+ZPWetsKgjHfmdF7M4SxQpLee6tkhU/pYznFt1uaAupj+oF0j6PGPiWVdQEqsiDIvkHnTHBjHxR7b2ar/9YBGZcsnR7z5Vt79ss8aAoZ7g7+AMJ3funP/qYmSaM6OcW9yHKn3vzho4FnWBMixZNAveS30b+D01qqqHXRfiaVaEKSYP9FS2YmW+hvVuzkiXhTf9pd94gJWLGwlm+1gpdPdBn8GNM29B9KoB8cNOsmpR6fEpUQqjqBsAHO17WRfaDqAG/tWsGe+c8Xk2N55ZV2aDfL83y0jpAniCwixJz5ALqEM0UID+8vinX+VNx/wyTgD11ijvmc9Pp+E/hH0zC8WICHyQLHVPbjKxPJp96Kvy+PUIbgKXt8hiWjJjDxlXL2oqLHqXVZN132H9ugKT0HQwhTmjo2/KBpevHJb0GojgHOnetMcK+GF+trhysevIpuO9NcZLQhX94LBn4c8yNlxH/4W4R6juIgIw36PSX1u2pQgulxZEb+nd1PVoYKTln+J8tAmq+gJdbA7F/siGD6PMyxB2f2fvFmiJKyG87PbfSTj5w2PmNGNF0gxQ9Dg09a3j23i96gokj3RneKXfg2krpSX/c+OSKZ9PqF9QllWCXctf0y4oSxzSM7MfxlPV1Xo6KClBy0ifBxM3FEGp1ORzUTEpD8gmpwjzHn8Jb1YLoMNP3M2xFpYa0lF5sf+EHzhyHkzvQIzTO7VlCfzkJrvMKA7Mky7JPXT7mSddEzS3/Uoy+byWe9rcYw7K/8dhTm+fyyaohlanMXv0O5SuDwMG/LsUsk2DGO95t2bY03oMESWhfydgWBoNLvyxDxLtgwkrfQYqYsKP5WUZACPzELlGqEvDnHCFP2hYLyclnOEZUuN7qmwPB3K/QGHFjawz4TcOtna5Ysh9FEwjH3LX6OL1XXpTSZXdUbpX6c7HKJSX5ZZy7mjeuKQO+Yd+RoVU4V1S0dQNQvZ6lDyWYA9ks+7NH2wilbdqeWugXEp5+AVSSK4FcYa2/s9PCpudttnZeVVc8eOYOycbUP3DZefc8bcDQy/y5WPky4GMIYh6bYxCxdaPtckmgfCQQ0YD3bTSaWoUINVwYba+//aF8xc243PXHpSHVuHMXtx5oHngf/uBYeUFslEFwkrI/18wNXEzVdaWAhZwOmEUSVMzOU/m4m40W9cucYOSWcPaKMBTcC3LFxa0g6cjyYksejjA9girr/ncBYExTm3mAL4ptTTtbKJ5XCjGSKuOfqM7RSpv7xKl5vEb3bwSale6ayurti0FMnXLISrjikMaO0Fx7VpOaSPdFUAl2NxPqTAbAg0pV7nUKJ87QvRmi2kAzewFOcXG/xEMtS/10qvW+X1bZUa5XoB/93mQjEam6xv+KQp5BIR9mKJ0gQig45BbLVo+Ur14SXidKj832qyBo+4YtuBnohaLWAefnO0Si3b3Gabvs13FCTNOHdlRbCg2GQURI+zhATUELzZAcbAD X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 2c4ac0f3-54ee-489f-a698-08db0da007d5 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:18.6080 (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: ycYhzj9qSi6HicPSH9RHRrEtSShYizG1zaPE2sLdKzv+U6dRTvR3YEI4RP5MNpqf8MZ/GMTyTQJ5axmBcT7KYQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7600 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230213_005522_947419_251EDCA8 X-CRM114-Status: GOOD ( 13.35 ) 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 Reviewed-by: Alexander Stein --- v2->v3: * No change. 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 Mon Feb 13 08:56:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13137950 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 844C3C636D4 for ; Mon, 13 Feb 2023 08:56:57 +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=8iYeZYj80SMjWtylxiBzzUp/X4kuTpDyK4FHg0DsuUE=; b=PS8UCdzs7HLMkt JjuT7IktDkiu66E73EEEV5vqhSKrmEjP+l65KyCyHoljJZUV6qSB8R2EYxEKcB1BtFDr5XcMzWbhI HHSJJSbcZp3/6Uw4LBNE9Rz7G0jozFBMr+ZulXzEX5at54pJDX3UiyGqenmrJhHINcO97oeuLnr0J YMGyFtBXgMJD+e4Ouokv38ZuezN1Z/l17njp6fjV6RbxwWdlRf3h8ZSQHkl63l+mn5cr+h5Itfrgf AeEMETfq6m1DLc7mrlecEo7gZx+tGfp7O3xhSgaVGoy+gipzdXcFLYoU83eCU+/0eboRRXqe30QpV QMae/0D80dcKPDkjNaVg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pRUcg-00DgDx-Hd; Mon, 13 Feb 2023 08:55:42 +0000 Received: from mail-db8eur05on20601.outbound.protection.outlook.com ([2a01:111:f400:7e1a::601] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pRUcQ-00Dg4y-Lb for linux-arm-kernel@lists.infradead.org; Mon, 13 Feb 2023 08:55:30 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Wxt9eeoe7qn/EUd4AbInJ7ILSGIwz/BItaoaUUMVOi+q11vUxZhfQRULkAO9BTwwtonm1TiTjrhcsOEOsRkEDHczL1MRJYD+eXsSasZE+2tcb/cue9bBz+18Y30jC5VWXxPiuP9KWY0WMUZ1hKqJdCMVmScBzTHbNye5DoKjMJXLTGsDpSfyYLUjrlnJUjeRxAXZwwI193hd9K8LE09dzlZHj1qiuDZ5rIJVQoQWAaF06lYL+yaXMsMJ/7161WJ1a8iHf5FQy4rEx01GX20G0WVnusI9NSgvJ+yX/MSV968k+Bm+kfq+qr01U4icSYPAvt1tQ90SICBgwVbW9roDpQ== 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=Qbqn7uamqwos/5+ZTl6vBAsthI3M6HVDcsRH60Q2aEk=; b=QVrNU0Xs+5RLwdJy4yBq7tAC+8IQLxUBqA9iLmySSjcLc/ejCFV2zdCiuzlAgJ5Q7Aw0kHbgqrr0t20K5uRUzkWsMMO7cGqzlCxrzafuJEdAyu0urdi1lZQ+oYgrh7qScWrxNZqtQheNQD8Uh9jYgWe34bLxryRIZb08Lc2x6XLe0UNMpRdG7i2ZbVsWxKHlmdg3VFRDxMcvew3watzUiiMg173oOG6trAvnB1g8vjjpFMGPxrS3ZhSiWOoQG7ms1M1xDCeTOD37DAo/+FV0untuhDXTFNaJSHYWTDAp7bvzQYhL9jmunxd1SLtggn0Cs3dls/UlYO4amKsREscFQQ== 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=Qbqn7uamqwos/5+ZTl6vBAsthI3M6HVDcsRH60Q2aEk=; b=kwEE2H+2VAs8gLBlaHKhL6oVchJfolnLpVU/zmwjq6KHT/DVVQwGE8SyZOR8tJudoOu8kAXSjduqPMH4QRBCJvHKlYJr0j8cZNB+glw4iP6rmAJoR7ZeWfZ97gnXSjU01UL2rl6d6R0WrzhkvfW7U+fW/TGZVEiV/6bi2R+o8GU= 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 PA4PR04MB7600.eurprd04.prod.outlook.com (2603:10a6:102:f2::8) 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:24 +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:24 +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 3/6] drm: lcdif: Determine bus format and flags in ->atomic_check() Date: Mon, 13 Feb 2023 16:56:09 +0800 Message-Id: <20230213085612.1026538-4-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230213085612.1026538-1-victor.liu@nxp.com> References: <20230213085612.1026538-1-victor.liu@nxp.com> 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_|PA4PR04MB7600:EE_ X-MS-Office365-Filtering-Correlation-Id: 0681deb3-3a17-4300-348d-08db0da00b22 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 452z3K0a6TOKKOmMm1BBFoEnvN7V96yEgVXGBLul9yrO1Kn8iPgwnmmi9qd/+1z8nt1HrfNdH9FKD2HyL59J2QkR3hfo8EW/1hprUbbAY4fXf29RDWGp8ztXhykVrFyi8i3hrUpilU178TTwAn3kzUUhCBDL32R3Faz8tJ8aS/UeCzE5eT+fyXHxlCOvysNTGb0D26bZdctwkIey5gVAqC2v3gqd6mGHx/ZJWBq8/sRCVqHGzZWYgrezrJMrRCvP8LozG3trtQ9hQeP41KVcrN9P1AO41HF7I81HfWebt0gIVWTeihdB/srkIJWNH5OsACKFFuN8+AMYB9IcsuFvHexbkVp2CvKTtv6HVvWttB2mOLzAKfSUj+zmIaofuvxMuuc3uJj4YEVMyZg4e8+Gou7LHgMm2Ay0CaXbRU/70rQdW+mGOyo9HAr9JiQZRGGxUSw7s+LmHODPZf7U1hlEPrT9XC41u0LsYFyJC/UtUsxSLHrs8Zgv6OdwoE/cgJZhShvrfou/m6LgAx9N7FN7fcMk11TrGiSIdBRtpcgZiThhuW5yeZhdoK36BA3QdiaV2vvtkXCm1DKD3aBOXLwo0gsrnQRamPfoh3BKbXSWjivDjsjMe9ATPBJO+eTaZbqLc2fUZwp1F2lND9Eg7IrFyhniGY+OYl4U1L9TWGMiaPEdUFl/pG/h06V68gmVzdA/krpRxNqA+MFbbfHSwShFIg== 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)(366004)(396003)(39860400002)(346002)(376002)(451199018)(4326008)(8676002)(1076003)(66946007)(316002)(86362001)(36756003)(2616005)(186003)(83380400001)(6512007)(6506007)(38350700002)(38100700002)(26005)(66476007)(7416002)(6666004)(478600001)(6486002)(52116002)(41300700001)(2906002)(66556008)(8936002)(5660300002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: 3m5EOvqB35AXLOfunyWTecYHKpvof7tfNcZMCu5aCTlaaZeydsLRHSzLmqMsIZ4YYRVQRdQgfA1uxqQK8Tb5KncV/GmCwsmWjfSA0ig+1iCLc8BUoqjgBzAilw3DerF6phyn3Dcg+qnO+zUlfVJYbd2gFpie4IpSkPCnA+/E5W+Bq9fJMvfF7FEZiPRAZ0Cqgt5L/2WXqRkd088OVzrq7V220/ZvkjWz3LLlMSThwWXmuiNhb79bDTFg4HXDgQVWJ3s15Q6Ij59euhvs239XGZCUgE/En/cPGiqp8i3KQuYjaCbNy4LD7WC7onsTQYXcJqLaemFb9gR/aOxXFt4XtoalkpPoh2feEyCFHv78i2O/jwqSAhWZPtb0TlrcMHDfPakhlcMst6IN7gVcZsv0Iq9PqD70GIHpCrbfZxku/MXI9uWqL4h6F4+mnaFgoBdMBNOJKWhXcQCMpnkfTWcT00owoxgKtBWzXwkSy1CB6vvXZ6t4sx8vVm4nWVo20bEcuZdim1ZQauHzl7aYzwL4FoAWAondHtU3ChB6OybE04G/BPH7bt5FfUuI24w4/8rpkvnvRcu6lwRcPR29wikAKWGyu5nuSWNkvIry/JQ+iQfrIKYIS7koGeNa5AB+LozMItzf6E/Nc3srMr+ZsrwlAYI6puwT+dKkSX3KNrx+KgpWRljA+3pa61sDMbl8hNnag01BLwSvqd7wNAPZQMPtvsU5/VaiOetgcAIe98Yys6lRfjlYsIq/dP2IGWurY8PWaI/9qeZPHaDAHobE766Wklu7g87qRTOFmtaxE7TFHS9NGiHZhQaAOQAGReoq8oO2qwo0KEezT9ZQRA8HZ1H7xWtoeccQ6XykWac+jJKHQpewkc/UQzYu5H66rm6vsAsGhjbGCyKbhaHssVT/ckkZ2VC66i9ywtslD6s2yT70POn8a7lC5xyn/ul03Byt68MH6SNGRiaegDJdMe46b0SFBC2fp/PGOkKCD9CHq3NkIP/SIhQxPSE9uZ/ZdIOoC/1ni3Ft9tIGPNmAv0/17x4/xw04u7hFT2n6kcsN9YAPKdl+ZK6yng+WunosDvHjPdtWyZjzaUBetpufLLdA5xnP5d53y78AHQOQsS3xWN33Hcnue30rc0VV1W0umJGhNC5Nz2UBMMDf0xKenk8G+njYKUzvMknkMN5Cp3xmNMjlSwkhI5wEO2EPlPDXWDaa+JiOS087/MTGOg1vhSWLA/+PmyfxJltEC60tu66P4gGa24aS+fPxoeFsSgbPYfhQ523dJpG5AzAMtxIRvWAvmFxOEXig1TLOoCG4JjFWyyneQAlN3RSSFpSU+h3Gug73NoSjiKtNNATi1wYTLhB4zw3wIayK5ePYz/lyUGnPhimOpqz1ORpnGzZJRYWsq5qF5f1CmN+kr+YV5XF6C7GIiLlv+KUB7XDniSkkl1pdx60z94toRlPUORch9lwHQHIHQ3SKsNBP8Fy+v+RxM5vh65niJ1E5u9sbB6XI4FEAN6zBNDN/D+vMmWEt69+Dw1Xgh55AtJFFSI3of6zai3Xn1uaq04XhRufPJwkjk6DzbVFLXxwoRtUUwVwEzfZ9KQ+JcD+3 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 0681deb3-3a17-4300-348d-08db0da00b22 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:24.5787 (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: ClKlsxBa6tLpiw6ikzClw5w3Yke39Mx24bGH8Bd1l1f4a9PFxuPHyWMLByXLfeboZgUHSc2fmyqD+zHlzplbqg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7600 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230213_005526_889901_0136F5B8 X-CRM114-Status: GOOD ( 19.46 ) 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 --- v2->v3: * No change. 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 Mon Feb 13 08:56:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13137951 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 278D6C636D4 for ; Mon, 13 Feb 2023 08:57:02 +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=O+6rEGk3eibt7sNE5R3gyn1NcpE2yngQ2gTpCyEF4CE=; b=W0zjYz+t+dO0ok z/+4azs55yRjszlFe0Spjyjri/xJ0rcAqvjlK4fQ+PepbENXrcpqJ2TX+aqrvNQuYj7Xqgx3nr56U xiDIvekMSztGPKPAzFlrwNeWT6hm7hhLvclUzb+QnMlmh0s5aJdI5yMc6cNRc/XcM32Cihsie3+gs +iDRHnmtuTqKle65SpOYeLbvI1u4fxcQkmt9kvlFfMeW9ON+qMCPKXOgeP8lCpCI1sxNBUK1F+tCO R98fIOtAebFYNT2rUqs/Y1DlhDRZevt2S5tr4IvdB2dneUYVHbnyY1U9hEGW/WTuVV3EqkK7rllC3 s1xiBanncg8pl1KQraVQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pRUcs-00DgJr-MT; Mon, 13 Feb 2023 08:55:54 +0000 Received: from mail-db8eur05on20613.outbound.protection.outlook.com ([2a01:111:f400:7e1a::613] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pRUcY-00Dg9k-E7 for linux-arm-kernel@lists.infradead.org; Mon, 13 Feb 2023 08:55:38 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iCAnVHn6k94fvQ3X8X0AkW6mTe+/DY5sLO08M+YoubwPGYnj8DnvM9LWUc0c1n0RTTW5RhjWFxhXAkzkAeRLKVAX+INL6xgcYRIaq7OXK4fELAJOgaKq888z616gHXvvPnlvVZYLL+3hT3uOzbCC/VEv72Gc90lXFBhoNq1d1nwKTn1WQe2iPKuE2Qm1ZlsYaQyJu+X1Y5vt+5ZHrPcWd5fZjSPQszWwSFOnUyXb29/0dSoKDjgTuD/IVVhcj+XP3gqvAkfsxTHNSu1CVU1TC2fHsnEpwFK8IePpGnnvfWrZS1pvtbJdSn/up+s8RQ6xUB8FJ2CEUD7ldZmpDGs09g== 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=NLz1nghvDdeU8XX4c8mS1zhXYI5HBw4HFppFon0xTiY=; b=E4insgQn6eHOTw9Z300gPizT5MUGHZcPjFoXB8cJB7pFRmHI7rCknPSeV2PdfvIdKN6xHZnSAOKaGLVBdF2P6RkgNBTVsiAzgvB6ytl/cNv1GTkqCgAmkHVvlWsyPwCO70pDfS0hn5oeXZ3YdwiCuucMlrp15wrt5UyaZ0O/6OK8iZhMLaHYz2vnxjG6NvS2ZrToquybsI50O+xDFVJ0yIRz5jgKFqeG0Uyy/f//Xl8dSowx5xBNpGXQ8g9nGkXDwI6ut9NZg+5km9cs84sEIqpyhAwSMpjJI/JcTsv+sacLbgwKCSoFKnDdusaSEY4TcVzJN3llLeQDT4FhCzJsAQ== 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=NLz1nghvDdeU8XX4c8mS1zhXYI5HBw4HFppFon0xTiY=; b=oEtHM8Iyy9KaitMs0nXzcu1znDjBbRmYAGd9fhVtuLEYqAQUis6CQYil53fr4m1+lmLsrSyFTwU8A73XoWqhvEqqqNGscvpPQQojjxKAe+kkCSlbkml5TCRI19aosOt1TKNZLVLwqMTdlZMHcmvLRGqzY/V/lB4+C+nU6JmQLJk= 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 PA4PR04MB7600.eurprd04.prod.outlook.com (2603:10a6:102:f2::8) 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: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%9]) with mapi id 15.20.6086.023; Mon, 13 Feb 2023 08:55: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 v3 4/6] drm: lcdif: Check consistent bus format and flags across first bridges Date: Mon, 13 Feb 2023 16:56:10 +0800 Message-Id: <20230213085612.1026538-5-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230213085612.1026538-1-victor.liu@nxp.com> References: <20230213085612.1026538-1-victor.liu@nxp.com> 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_|PA4PR04MB7600:EE_ X-MS-Office365-Filtering-Correlation-Id: 4fc3dd94-8fcc-4d32-3ea0-08db0da00f37 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hhmHmGbvOEHgFL2T1c3czTMnnNwkSWa9C6RsxRXcABkWXfabj8dG2S5XYt2/oQsWkA1eQ41/juv4oIC96mpVU8T+UM0XahOcKW31GFlH07wt4GuXVqSf3zCgQC+UB+e9JZytzdGiKjTz8zDowtlgmdcL7/ASfKRSxR25Z02x3oqxYK2jHJFixW+CGXkoi+4MupF4s+XtvENIERlZ9ZZkSzefC/ta/rFADTnarzVAVdC8gfl3wuHoRfgUFva8puuCOwJfYdAD91MWQUeC8mrjQk5+kHJCNd9WnTSO2hxi93QFs2d47cU7u8spIZSA+PswMRjdVv5LwOVKahAXLvrglByPUV3NqA8OICyHzTfeZknWZrIJFcOZtQd3o6/F2NLTS/xEPJWMEbmGUFsef8wh8tdX0YJe0VW4mUG1dRjajtmrX+OslsI261escMgcWhKu1ahOgSpTljVTotMVJmEYJIy9DRXkH64vw2O+Lx4kdxcbBZ8HFF7o4UrTyLyA+au+PC3fqt0CjImqEpyrNmCbJ0/6tGZRczkYpEtJIibEayCel92hxNAkJnMpn/hHgMY/EUm7vOkY7or2w8nmM3PrZEQD1FRGqXopbn7yqmcl9TC+ueBNZDzo2ER9/weaYBKANN/hrZ1YFtnI36y2UpH4NzkJ/ylkIW38OV2WpkIFYt3/hg60yBhxjBOAjUQ6SCyle6VNP0LFyZygZMKvC8m8Cg== 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)(366004)(396003)(39860400002)(346002)(376002)(451199018)(4326008)(8676002)(1076003)(66946007)(316002)(86362001)(36756003)(2616005)(186003)(83380400001)(6512007)(6506007)(38350700002)(38100700002)(26005)(66476007)(7416002)(6666004)(478600001)(6486002)(52116002)(41300700001)(2906002)(66556008)(8936002)(5660300002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: uHKPTBaqBqksCDI19n4TKMlvar9Hgz7XtHzsKbEhYbhSp9KO32UItG/dYfjGycXofSPdjErZfNYQk9IjzKMYYYuFYR3j9mSdh79Z+ik2H+egck/pAd9qkRxcDS3tKl81hKsClTj/tbyGq+XjU+2KcrQ58g8K9sP/zXrEMVBYI6lAyF727rgCKFhCQVvM67eZxpWaypMai0BHtQ/h4TRwCP5RKFvKvs/Sc5pzV9DHGgxTixVwRzmsYJD+l98S3ctMVwE8XcdHbat5XqiqjvkMONF3PqeqKkhbCyT6TzGDkQAS2I/StiYNHi0Vt4ygnwNGrki0sK6YwtxaqxCYd4Uv2+7e3+WyHCA0YcsFM1+Zxi96dlooq+BbO31N7rYw0Hcvej0ACGFNbDXQOA5eLWA+kr+WwkjSTDufkGrTtRHhjmeOnPv+C288A5sIz6ZIKqLDfDqqtvb13eB3fqA/U8SnHyuzn1XEAaLh6l4o+ZJ3zrT/jNUeVPAuv/uVv1ZFW4d+GJA9nCYu4suTPzHmMADrLs3q3enPGN7kSs7oVqoiaUuRgovwXaHoSzew89kFY5iGF3kAd8zOyNDB5KiJwCAh5BFCmjmGOwbjovOLPeqU498PxA6yt6nSF/LvQ85FqorSo/mZGtMlSHa3kY4qMsChv5r7sOIS7PSioe7JtNOLc0Fc8Hh34SEmJF79C7VuihsN5nPx2kPHW4WlnEgZeUiVz86M47FaubIUdO9FbUqQbvjQiSHVtKVodEpE1KgLct08AjRzenCOh/2WzY59eOgNYYdQQClD9uFv4RtSTt3yveHsc+8576110LHUm5enY/hk76vGD4zAReNLNiaxtI1yCo/YHcKwoj2EvnrKBeT7vooguX4r8uy/xgkMjjXF70euqa2o/kEmfNDe9JfkKRlHstD0xysZ3K+7encPxhvmjbCmQS8aD8F1+zGqm26KIGSbiSsnIYquGXKF3BPfQuFWumQwYVzpG2GHIiDN/eXLNuuuQWGRTaeZQdn/gUgjBoh/oTqb48sVl3VXBKb5x2B0h2L8FtnbQjKbMFfw1wYe5cT+YzrcWsEbtZJD0YA12FrAfB7cenLUljgk6yPgRLYLxUmDk15Hg56HjOvUkvROAN+oqO68loM2K114U9B0mlD3h8lRHTCl5xL0rzkoZYa6wHXZdjkyCZVn7+LcfsXVqMLW/R9urj/Hi6pgO9x2KubW+1SjN8wDbq+cF8x/xiy2SqaCxHUdUcfUBKIrEjvN+6xU52XyusnNnVGg+5QjQ/OcBbn2GSIg9GXR35PQbROhSRKlQp4+kO8X8Z9kKSUzEBYuqHitfhxLXwHvTXbpPQLsqgzYH+L2a02TcEgs4wAiteLBzl/hxb+p1p7oeQJIQZF5WwYTzZsMZ4YTCtcSkNj699OrzHPEoJmF8wTHkfzPTi1R07VOp4xVrSxAcQ5a6BaFstqNSIoc+wswZqYuAYFWdw0yZ7GeXt6sX5PUvXn43Sw1s8pHqMj1lsaO0f98BO4AzsSlmZytj/HBg84I/X5Sc7Gwm6tbkvlaKIOVGRdMDRi8VP2+/Ls140yZmqoWCU8q3rioaRiHzWnLidRx1iCX X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4fc3dd94-8fcc-4d32-3ea0-08db0da00f37 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:30.5670 (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: gEb6K5FhNL9y3TUj9o3Cgzb39TPFsH2hVtqhpVlTE1vdqWlBJpKLBj2bKehcoqghqGaV8lHytDXC8nb6A+Tlyg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7600 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230213_005534_555843_7C7061C7 X-CRM114-Status: GOOD ( 18.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 --- v2->v3: * No change. 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 Mon Feb 13 08:56:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13137952 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 2741BC636D4 for ; Mon, 13 Feb 2023 08:57:20 +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=NN4UgLjf8mDHZKuNUH7hhELiRUvTUaFlLjHSd5i4bqU=; b=fWALDfknhNmCM3 an2u4TJ7GvoIcnXxQ4maRtHNqu1NASwK+AnunohEnZthIDQxJh3cdMsw/7UbaW54UFaXe899z6aQv +Ng1Lvng0GPNPW4Me488VyjrSdRMzy4Cc0brU0tHkOLVMPwqOB3AsJ2tpCXM1wgU5brQJA7PfU2Kz r8zUGZ1Y+Mm7rXyGugrxmhlWxOLNWAKlTVVEhuT8Xio3AQ0pt5/3LXVXCUQ+a3UMBRwYvb+Tj5nXP St/I2NRjO+JZgJPuTMNE03px41wbVpnSaEEdQf6zv70g8XJEPaa8BpHipRRHtKacFtPKumlYj909Y k4o1ES/LgPdNOkwi0EiA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pRUd5-00DgOH-Nb; Mon, 13 Feb 2023 08:56:08 +0000 Received: from mail-db8eur05on20613.outbound.protection.outlook.com ([2a01:111:f400:7e1a::613] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pRUcc-00Dg9k-Gm for linux-arm-kernel@lists.infradead.org; Mon, 13 Feb 2023 08:55:46 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WR/KK3m5Exy1+JygnECvxL5NdjifdmYFHoOEdhWD4Sccy6392v7FgVgcA/k5jrq5JgeUS5+OXBtnOik/Q4c8wcWyKiYzT5/mbvFkA3TjUh96guCYrx1IdROYhTCw6hB9ud8WVv6Ros9Bq9l6bVPCUM+LJV9/37IDC1Nqlj8xUduvlnY4CdiXEUo/dAP1k1rW1apoJLTwoPRvPP3uuhzB7rAMgO/lthRPtIVWxvVGCxRgCLmFAkS6j5IHOt+vkT5O1nm8aXEfNCH5OaX81ItWPCnukBJEYNPTCGnKO/vySmq0zwxJxSPQs3HJeaSLYPQ2tTOMzaZrzPGEIEsa94o23w== 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=iYic69GlxJLmbZGNNJ92I/sTEku99+XOdbfKZ12DIp0=; b=Edn3wDKmLrZIWngeuJ2dpATuWyAgIJwXkuUursA4n7KNJCswSy917yJkdILCL7n8XESB1tcqTe4VdYTyvrxSHD3kP29XbRwO19Oaim4ASJffd6bZTJCoaiBbU+Yx/f6KkPTkSko2ekWGfzMsxCJO7VI5RjRVeqsM6/vboRZRVzuAFq/ihJeVRwT73FDHwl9lyxqHA6eqxsSW5CS2B0+Vh32oJZ9pEP0XDcZsBDBz8kl3nyhXH/wPT0N9k7j5M/cw6tTXkjiwp4qNN+LfY6sDdoWiJBa1ry5HytoFtvadCDBUTouJAvd3u8PAN8tG9vFR9V6zi5q60pupqXvllveDSQ== 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=iYic69GlxJLmbZGNNJ92I/sTEku99+XOdbfKZ12DIp0=; b=Z1GGFUNYI6BVAWzQU9xaBr2fSGVQ/2Z84CTCR75f56F+ApuI66ZQjQ3pDwYY+WfpeAyjOWglCpkZiQ0GkoBknBlaA8krCyNBCNX8R5jBa43lpH+D4HfVUm5ijf687LpJK/XjkrrIKhtoM6T/y624Us8l1jgm5t3vfvkZ1ot4a3s= 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 PA4PR04MB7600.eurprd04.prod.outlook.com (2603:10a6:102:f2::8) 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: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%9]) with mapi id 15.20.6086.023; Mon, 13 Feb 2023 08:55: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 v3 5/6] drm: lcdif: Add multiple encoders and first bridges support Date: Mon, 13 Feb 2023 16:56:11 +0800 Message-Id: <20230213085612.1026538-6-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230213085612.1026538-1-victor.liu@nxp.com> References: <20230213085612.1026538-1-victor.liu@nxp.com> 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_|PA4PR04MB7600:EE_ X-MS-Office365-Filtering-Correlation-Id: 9c30c05d-3879-439c-1994-08db0da01284 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: I8wav9f0dLUp01/WIWRK8TLCTu5t09W7L/5PXxaU3xG9qHHtKcdAKuFgBU9Z+X4dw6/0BXPLYTJowa4rNZNAWNADSpnTIDCjb/GgAZbebGQfoKYmihslFlGC6LHDSsX3rzEelFHkgSItqwb6VBPcjkNhLGOE1Y6z968oOpgGnFcVa/5sTlP1FYiDx7nxHXIeIQs5VRCSY60YXWvwcxJz2OH1TbSqQ5yxx0T4aYb9RUy/ZbkrVdWiFy0Y8kYg73umVMxOpv9u1G0mOEDHjiFMSBKYLK9NTB6hDSj1Skfp08tblFLCUU1QW36dGTUpB4MvResceqlobwEl5fJZlduX2tVqd4sd7paa0vtPXd8eOfWf842Ta4vatQuT0/8UXMFANxeFaoOcPuFjHEdze/npCFpXTjfjIyJ5kK5wSTg/RAJe3EeuwS9jf8HwHOmT79vmgE4pYi7atQTdNj4jwA+CeOFDRn5R8dj3qa6vz87kqBBxrJdHOMwoBJgwO8f/g7nguMqO6v6C0i2M7JXRImTAB4rmzG7O7fuwn2R65bdcUMta+252/Fac9DGU2Xe4BtqhcN3geAcSBYfRKc/w0u01fcRv+qomnTvzX2WhskWewi/nDuu8DntOqm0mlgk/loEIYrXvUwy9jG/h6RtNHjc8zUWJLi3QVus4pYVv/CJBd2xd50vAwGRNdSoCfT6cQopFytILUmd9d9flDIi9rHo01g== 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)(366004)(396003)(39860400002)(346002)(376002)(451199018)(4326008)(8676002)(1076003)(66946007)(316002)(86362001)(36756003)(2616005)(186003)(83380400001)(6512007)(6506007)(38350700002)(38100700002)(26005)(66476007)(7416002)(6666004)(478600001)(6486002)(52116002)(41300700001)(2906002)(66556008)(8936002)(5660300002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: /al4g7AnZhpNshsjdqM0hGwiwYr3lreyDVL64MwykSXQuZ7gxwD3LSGZCghDma/WRU2weSRqm2iULp7213oGHT7AEXob4pKuR2PpZkHD5pMXOu5balKokjSWFCtuwCf6srdNOiV3H1oub1YxKgtMV1A0MQqoWnKWeVmY6p1wJ+5/jiYKDZPd4rDrdCXdGXxiC7D2DjxpKIvrDEIuoHP8U99MYPbxsqgS6wJqShNp6rmxGhlAbIQPQR5thdiPQL2NXjpp8vZnCt5oiLaDFAR0pnvr9Xt+Y9hvUkiAPkbhwrn4E7MgDLj+9VMdRdcAl4o4j9VtLf9aOHYwdgmJ1LmMeIObI2Hk8LtsGBdetBJFHnWby8fLX4AFFulbGhLKYY4l5CI0ol7XFKGun9/UJIo7ogbyE0etXQe/Oz0uHhyaFrDkOGx6NOCwjN9utAlXFGMhpRPHpEgls2vf6kaTtCcM3XYN2HSjr86V1guAh0fa8rN+5JOneoW4lU9fVrfclYiCyAw3bm2jdvwVE9G6uL71l9ZbsEjaNzP0+rA7hjlW9KLrfvmAN5MC6YX/5801EBrKGpia80V9lXs5o0kInqW/08HWvVqertt8N1BBn7gL+Tb4/jW4VlHKqGUAyRNm62OH1FUWLvqceFjlX2Ar8rRzJf/8/KfZVIyOM9+P1lDiKPUvfRXspvKvHr4JvWBnpGWPh1qYFV6O01LAzHYY84BVlkrpk+LATJsbmhLWKEU7dYeN2ii0r4W9MjUWngJ5x+nkdaLLQ85Ap8EFtgGiMcLOosdC+bUx6ZLnbwK60SAAS0rgJLfdrhxAyQe+qWLK2trDjzHAfbpKlaKsywkgf1VPvO3oj+YGkeZzJRyoRJ0eDrRoslIAAjFsv8ynPMq7tgfD4dNL/EXsAw+SFwvXmhepR1WBHzBxN4TvXxPgC/klAQfA+eA7G7wqpGBEfLuQwiiYFWd+Fk4yUR3fvVpHhpC3VUEm44eBFKddOA04+eTJcXpSUGZDalwcqoUGtRTaPRNK1aoLTltQgT8TTASE3ICzYYWXD7exSV3m+S/RkA3xxQ5SmdVU6b1ToLT6aAbekAlKIlz+w1h2DbJnPJo4XPBGJ9dkvTM8HPPuDKJTgRoCYTscDWy9A7S0orYRWg6ckRqZ4YNkiXk2MOQZ7bRDKQim+zNC61UQ0AQWUh/7fKo5M3lrNeKSfT5SSd46BV+YKqfvJWdzud6XHKd98XL+6shA+3ksIdq5ESBjCLGxNnzB4dMes6jUYSH1/GJ0OrGI5Zf/9HqhKzjiLX84Q2DHlVM54rDpNwbXov5TLuSzzXj5OZm2CBQXKfFrl6Z77ska1UrtYoP+6419cdR4iFJYgUPZKDTO04+sLfx5/wtXTSX2ttvAEc4RKP/xYaGN3sWpk9KKz1y29HMX+uQLdbwpkCVVvUlKaJ6AwzeybJAx2ADgQKm9MwbXy9GQYB7Y94xhF3XizBJunF36UH3o18INATdRN5e6dsfcVTCuPNiaSToyx/cea6rB3xNCD2xxLeWaYciHSQ2UgxekpiNeWh8OjrbujJpPnBMFAd83CF0JcC1vs2Hu1e5LW6SfTOAwADbEUldL X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 9c30c05d-3879-439c-1994-08db0da01284 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:36.1825 (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: RDvaKCoMmYVfntyNo5dreBJzjxSpovwaTzUg1w+f3zXMraQ9GUZAZFxtQbbp+Nf84QJM3T+AGoKT49n8Jby/Hg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7600 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230213_005539_105648_331AC4F0 X-CRM114-Status: GOOD ( 17.66 ) 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 --- v2->v3: * No change. 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 Mon Feb 13 08:56:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13137953 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 76880C636D7 for ; Mon, 13 Feb 2023 08:57:35 +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=9PF8QELMFSR1iM7kji0ZZcY9Kq6XSg9ZF2Wje7TqVZ0=; b=zqoKW9WQe0ljCm 2Y5aXwGPly+9XHpnBS0fdV/WLXZiEMQPnr9JDHrPQXt0+x4ChCXtrkSSBFlEm2EzAnCwxLWdpBcgL P5Eq9BBDuvEcc2AQvfTk7rURwbbkWxYhcur1V1/iuNKXPVwT8nAUvInYz8or3m+kXWlvRVt1qCZ4j i2sXqOIXwIH8KDBp5qw+7ag8g3R2PqI/RnfaTLhgj+ZuDo8zNT02aQn/LDvt/xH/lILB9evPVaWaX ub2CvntN7oEhhyHCHggVi/5gTfGH2JzWnwqxeFPhH/L2BAcMqnILDURCHOENZWwgBsc33P121YnaB 7nD1ZpllX9FwGA1MS2Lw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pRUdR-00DgYC-DS; Mon, 13 Feb 2023 08:56:29 +0000 Received: from mail-db8eur05on20613.outbound.protection.outlook.com ([2a01:111:f400:7e1a::613] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pRUck-00Dg9k-LB for linux-arm-kernel@lists.infradead.org; Mon, 13 Feb 2023 08:55:51 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GFux/PuL1QL6vfj+OyJ4pBMMYztghMCeR11i5QCY7wmMXIPLbWqK9Xtap+dgR3sfbRLmDOYgOg45PLtBznD/mJbCGfx8kkgZzoRaTSdCCYbGX01AAQC1P5yYVi3Z6azKhevCcprl+Ah5m6kblae5gg/CDYVP/GFpvKVifwptZh9/ES9skhKg4epebySJNxVYbylWI4qVEWKSMOZvJ0ICqwCrqnXim2VDY56+UF63WDjeF2PDGv4y4JnavgWKNbovoogNcfRHFTGv2LFOiVV0J+XQdCwRxnc6JrD+YpeTPI5Vu01FJ3kREC2r4ow7pFd/nQH4oSd8YN6uk/Y66c6gkQ== 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=9rK3sw95nfTh2qO/3gaLHLHDQ7W4NNjug4tGJycrlp4=; b=RErkLNQTruIBEqiD9oLCtfXyNntxL3mpWsSsDIrrELDXTRCxYyOYJpxLVX6Dt/wACK8FDtxW6mn2FoPoXRdawUAPaRJUknLnQ8xCpsoZTlPNm4SZ0VVtY1ojAMiYR5LXPC22abJnnFi7kZT4fyBcQ3AJBUswlZnL0/g+1UWpPEnN58VDklg9d7v8BGCayDKBwksHburQqy+w3skpsgWicKD5pKeK8xogoOp8R9A4D6nU4o0N/naX0kFrXKY1w6nDoiGjaPvnOBp9ePAMwwc7Y1sMuZHs/F1mWumDKNZNAUBJ2KypvrRSXMsH3TLaT+Ljihl4S5skyPRNd5nn29WrAw== 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=9rK3sw95nfTh2qO/3gaLHLHDQ7W4NNjug4tGJycrlp4=; b=oSR99yJWnqAvfJTP3bWfTemt9iB9OgHKooHqUX3LyFRe4EDCHfFOWDnBC6cVBF2oD8Vha/lnPz+OjAiuEIV0fW2ml1koghhH3I4WjH3rZrmJTyh41gUzgpuSUkcuVyJw88FUzHUKC6zdOPkfYK64+sgOtFT/BBGRLRcRsE9oMTs= 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 PA4PR04MB7600.eurprd04.prod.outlook.com (2603:10a6:102:f2::8) 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: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%9]) with mapi id 15.20.6086.023; Mon, 13 Feb 2023 08:55: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 v3 6/6] drm: lcdif: Add i.MX93 LCDIF compatible string Date: Mon, 13 Feb 2023 16:56:12 +0800 Message-Id: <20230213085612.1026538-7-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230213085612.1026538-1-victor.liu@nxp.com> References: <20230213085612.1026538-1-victor.liu@nxp.com> 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_|PA4PR04MB7600:EE_ X-MS-Office365-Filtering-Correlation-Id: cb680e75-1646-49d6-ecda-08db0da01590 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: lNM2frljo9WM62nXROCd1jWPeJTVWRrBwt0SaBenkF/Ymsj+jpiMqvQNDJ3q7kxYPT1UpVpIH658iGIQ5Oo6i1xuzvMDPyPkaTyFyBTd9wsj+J6MqsD2abKAJ/n6tJfdtqPv6ubM0++msQT72ffoVrfni5uLgw/jf+j9uCIvnrBxFLPTuPpyt36p8te9vsqtxaVNs3fxudN2bestUknTyIF3i24u8HG1U9zGfzGz5v78IJ/FpcOaLrQ6BS5LphAgs1E3Hjnn3XgJnrreOzDULPLesyuSaY5ezreXAunmjPlABQ7sZr+6f+i2ZesbIbEoVPdXCWqm+rrPcgCbLODwfPIinJqTVU8EbxJURMgADKLqJn43hOS5pq2TOuP29IC9gaAavP6h3r7OquEzeG8HTqqOwIKsaqdj0GF957n4cwifWCd/FC1rbFD8PFvsxfkCpmhqjBXtPA6HHW7ghSfS2o5W2b0tKyAyOeXvU87eoGlY71hp/BpuDi63KUom4UT9sRePgNaZ4+toBLpHzMIT188XONL5teChZX0+6bL3dSm8ylrqZ0S6pzIXpH3JzERUCLDBcu4Otut0N7FSVCJW/E9IbxuMdWOk4uUT8NeSFqI6QJIIdZbL0JdSKxvDAteq47j0Nr0P5x0zcF5eNqqZ2JW0T05xTRF10ets+gpiK4Nbt1qpBhOQW0DFR0/qdHKM1uo/wfyghH2BJOcBtbePHA== 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)(366004)(396003)(39860400002)(346002)(376002)(451199018)(4326008)(8676002)(1076003)(66946007)(316002)(86362001)(36756003)(2616005)(186003)(83380400001)(6512007)(6506007)(38350700002)(38100700002)(26005)(66476007)(7416002)(6666004)(478600001)(6486002)(52116002)(4744005)(41300700001)(2906002)(66556008)(8936002)(5660300002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: FLxvVElAq7fF74UC6vhmqznAEnKSAJNW2Lxdf4182p3MhmSmRU/vCb9RMbs2wljGjHNImpx7/3c7RTv3BY0zijUf/2IZMsV6762i0qvKr5iGonlUSwmcb1nbA6GEtwt5f/J1ezexEgdUa7nucsoBcrPLEqDxVONJAG4QldzAR/vtrYZxrUE0AYdhFztUVPAoAt2XAMEPfjlqUaMllvYuPkKiRp3/z/3VkRpFxw+T4u16w3+GnApxGCdmNhb0Au0bUN0VeaqEzcNES0CYGnXLlx94bYRGRCQT8jYNvfKWyop0AtAEJ+t/8oIgwZQJ/1RKQa2zdoZxPOeienkgyUj7r+S8c2i3S02Ueymo4EGPhmkf/HFrADvydj9lz3vgvj7XjEcS0AkonK2t9kgrDw9R1wy7DB2ZYKj0/I6C5GqVzNK+DbjTz0l+dEblKn5Frf59UkEkXAzXsaF75I9Z8euX6kb+XsgiBOf25oUJODH714vwB+rTmAACRdqKGPgVxoDEu55mds69+tvbYbKdH72a9BFJQXqQR0oxUK9BPGsePQVTUxY+hetxoDISCJmmJJDZrhFZGUky76Tkmpj74TCzu4YhjHmbygnzzlccY7wxAC8iytGK1TGRBcfdtCeh2s7DrawhRgE/EJajjUh0UjKgbavZ85KP7XF0Jic7ZIuwn/LGA1x39z34ZM4AeYu7G2jtgdMKqTHkK2rKWKU3kd4R9wUgGa73AE5glF9+zd2tCxpk+VnVbzGAGZpfPRFz40PfNbp7WFYijPK1K8mQGWlca5cx8ZMFHj3gvNQHR1E2c7I6P1YoDUtip/mOpfuqUGyC/XpTGjKK2qxc/XaZDFefvz+OESzNhZZ38ax7Bb1bGkxeajPhKb+aH2f3mwZEzgf+oT2WY1endFFgf9o/Jt/HNy2VMuSoAGOhCbR5cadr2OEnemclBagQcuhGBNNeUZ9d6j5t8YpDw221II0Z8jT4rbLRqQ7o6hvYvyyyZqZFU+ez4SdDz7gQAuED1lXK3K0tTyv33D/QrMZAfR2K1J7BNhmFAXso/OVMd1f85h0CF1hj3nSecAko4e2E3OpGl9XbxWX6Q0WnAUt461cM7Q7qLuIo9nxYl14Muhb9R4g3VmfyMexme1OJQ9ipJMCBqZW+vDs3N/Vlhn7JmzDvVInslU5wfqX4AVBHRNR23JsB9BogE3HrZidOb0vVm+qFyVzx5InRLslwrqyUDBY4hN6b+fDaFw7gXG8jHC61SHV85bNVJAM2qwb4vV/g5pytvtPQkeOHfkV/fZQts0rFllQ5/nJLGJeN4PcZ7a0KfzVVbwP43aFLfoOacknrcvrG8CHnaEsCbhavqBQdaj/GGHfanUwY+XYbWZthABtrrcPFwxUw/E1klg7rZuK4gBTqRNVl4Lm4oP6GBQ9CuJDJL9Vx9fh3VmS4NVfBMaEkvY+7uPT0GWjAObIQLgMjQeCqPehfsCEE1wU5f2nsvPrCTIIxcrXnSZojqfH18n21vz0SlK/qdhP6/Vb8ynxo2M2Wpy7dCq3FzmQ5xidZ7PSTP618ebq3htTxV7W/8ssvoRhqiWkqiRMxrI3pRLe9qCvO2ESl X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: cb680e75-1646-49d6-ecda-08db0da01590 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:41.3907 (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: JxBS9/iQOSVAM+EEelFIXVkjk69EOYKmOuErhH6Y/WLQM0zJrCvVOsBwrBJtAA3Cp9ngBdiRSsp7Jk4+BJTq6A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7600 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230213_005546_806063_62B75B10 X-CRM114-Status: GOOD ( 10.42 ) 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 multiple displays simultaneously, add i.MX93 LCDIF compatible string as the last step of adding i.MX93 LCDIF support. Signed-off-by: Liu Ying Reviewed-by: Alexander Stein --- v2->v3: * Fix a trivial typo in commit message. v1->v2: * Split from patch 2/2 in v1. (Marek, Alexander) 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);