From patchwork Fri Feb 17 06:54:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13144360 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 78835C636D4 for ; Fri, 17 Feb 2023 06:54:28 +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=78J7NvFeewO6dcqu+gYNI7RhpzrylAbLn1IO+LzohT8=; b=s5IVVM3scz7co9 VPPqnsij3xOm2s2TnVt3c5vUkhx0eAc//AKuwpkKH1id+fnu1o7UizLE3B04xACgfI0nVtHlAVZBg ApfuopHLDNqlzkmmFv0CA6Gww+VdpSf+uqGZ5XC+T17IhQHjcUjOGWkgdBuTWF19TZ7+9bFg03b4Z efmt5Ck6GceBigP9nHIRyJcmSy2CKReCKYnir/d3ARLoTHrpohE+LUXdQh+f5L22nkJUXt4PCz81K S/4JJk79VAT0z1xsEEtV+OH7Gj8i14tEdmCBkFBHtp6p/AVTUlgwAJ1HO8+CGwLHnboEwcrr5Qy3l rHMEoGoNGYxfScb6MD1A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pSucT-00Cz8l-GW; Fri, 17 Feb 2023 06:53:21 +0000 Received: from mail-he1eur04on0624.outbound.protection.outlook.com ([2a01:111:f400:fe0d::624] helo=EUR04-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pSucK-00Cz4D-6f for linux-arm-kernel@lists.infradead.org; Fri, 17 Feb 2023 06:53:13 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=keh+NmuxdR1TQ+IguE/jzawOVqsCSFgFT1XFagQ1fN3BNdc59OHUY8DFOKqLh40qr0FV0B/1iYKOQgopgEm8lPumI145Dsn/uDZ9wFHe8vgCzYjF53R1q8SocxrMcC7HyZuWt14/ZHfaU+yvvGmsysd6P6L3LFW55seUtyDAyQcTSrsqvOy5OMOpL5q2+4TLE+RzacayeCg1gmwCFhd3K0PZJ12x3MNplfieK2zlNJ8lGxUKyxyzTgnzsniTUCbJY/D9X7PXHxQu/cAf2rBkK8IqNOITucn3+jlCas1J0+jcR0GdKW+cnpA4xNyiM8mVcNo4YUK4fLUmCKZScubq4Q== 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=O2HHqZCmi8hseR+UVb+THPvMsd4VUC+JCmwjkcYGiTc=; b=atS9nlWZ2qdo6tUVsgsjlENMm+kXGbIE/tSMsKsQW3n+/Spf/TEDmlHoNhQMUDiSQO8yTVw71oFy5MZFmVaAKI3FUbBMkh4I3YaSQaVrkSCskWUy8tE/dYMYSrVBqGVTQYcl+XukHsOClQFjoVWsI0KnYFB10LaNr6ajEUWq8nmoW9mkzr9yo6kefU7UgP4kr5WcvteP7W+t53GlXi+ecULQKNnOAshXSMSz7yZete5FrPBxqnYDanNRm+O4GfBXn0xPO380vIiyBf+5dUHyVPmhoQ/5U3JaxHsFRUf4BMeW3f1g6afW5ADEMqnPWZxswNLWKSZNTN0viJwVWD0yTg== 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=O2HHqZCmi8hseR+UVb+THPvMsd4VUC+JCmwjkcYGiTc=; b=bjz8jnm5z+Ga+jdt3sbOabp1cvRsSJnIIJRpQd43c5xcAso6hdBZRkwy/yI2xtwwzQmIfTeM1x/nPC2w9LFhuCcr4UH7030HK7QqHYJU2CyTnGJtxtY4Xsgwc6eShaXVeX4QzrBH8lryBkiTrjJjWrIVY3cSoc252MkBV/oufus= 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 AM7PR04MB6840.eurprd04.prod.outlook.com (2603:10a6:20b:10f::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6111.13; Fri, 17 Feb 2023 06:53:09 +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.6111.014; Fri, 17 Feb 2023 06:53:09 +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 v4 1/6] dt-bindings: lcdif: Add i.MX93 LCDIF support Date: Fri, 17 Feb 2023 14:54:02 +0800 Message-Id: <20230217065407.2259731-2-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230217065407.2259731-1-victor.liu@nxp.com> References: <20230217065407.2259731-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2PR02CA0033.apcprd02.prod.outlook.com (2603:1096:4:195::20) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|AM7PR04MB6840:EE_ X-MS-Office365-Filtering-Correlation-Id: 45dcb056-ff48-4fd4-b530-08db10b3a101 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: GBk+fdzdaF0ZcA+2W4eu8oz6zjPyIr7IFvwCWgFlN//wnhljrKe72+OAPUV7JM0RvmoLOWyQqE536GN72tReBhdo8kZfBqIQFg+EB/AGhlEWmxGdZIhpLZrXt8p57odlcePYGecazHY0T3iuTtLH2wB8GSvf3WHovTlCrLxhnQpRftp5rA0heM1qStj2szAmNKqG+NbnqA1HwUiLuV8riTaTDpCwTjutvbkIYWiFuoVeQzwr2eeka5NdY983IPd7jVbg+ztJkGpsN9M0LZH1NW38Qd10LeUPk3Zcp3XvoXTCboDmXOACh6LJmsG7phYwHG7ku6z6+HkYzWCKxc1mM5BJJLb8ukrXrdnxFyNTUO9uL4O+UU0eSIQo/a4qE3KxOp+G789uPyKgynUfctxXnbkl+5/FVDneDOU0TZXH/VGBlzwUFMqFU/M70O8+ftnTga62WE3abK4gXUbMnnJFnv6/d+xmcjJs4mnmS2pxPyS/tkY36ZBmAbOvxa/M2S8ezkHVyRJ6aS+T9KQLOBFGa51d6LlELGjrlIqZkRUNMdPIBm/8OKELeWn78IHqbyORgbmEieJbqKk3+J5Pj+RupG7V00e7gIN0QC0DGDIovbzPwwqfrrVXANoB2mP7+4gSVBhrb7REaMbMiOfkp5nnAtkcpJZOiZG1JQql67IM47PrQRNNCU7Qd1asJ2mobhTKfIgQHp1G+Geqps03/g3sWg== 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)(39860400002)(136003)(366004)(376002)(346002)(396003)(451199018)(36756003)(66946007)(4326008)(8676002)(2906002)(66476007)(66556008)(7416002)(38350700002)(38100700002)(478600001)(1076003)(6486002)(41300700001)(52116002)(316002)(6506007)(6666004)(5660300002)(86362001)(8936002)(83380400001)(26005)(186003)(2616005)(6512007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: +0kPZtk09FUEMD9ftk/Fi+ERJL9zdhUvDpvdEIwaSNCHh8XZwnwHpmfn2MzCJK1S6BJBPRcBctceY+QQmx8AUmGB4pBXT02L3xVvmbp82SSdKcXDOsTysfcnDnvotOJqHvuRd7OerkTUA99GDAkK3v/p46cTwtD3V6bbV5BBAw/smuXnl7i3kJFUeHYErXvDDN1Uh/FTG9cdWqhV+o+lP2eSuwRsJ0U9VyS99NqF0MnI0dgywz6CWeTr8wLgKLH2DZWXLgTNEPaA1wQBG8FQNjisa8RYO2j71uKlAepn6nBDI4jlnX3VHsWkvMgvVYMKIyVgtIGw8lO061amz6QV/h7HEKnJ7WiJoLhd62WMQmvk4y2S+SgIKmK2v2TRrH6rhVoqXxbJ6ObwfgI7a2mrERAtaLlEodnP5/yZehd+zctJ1adHpt/JtfbLtYcsebqGtg/KgTuDQeMg9Cwc7vrPUtVKyB6iwJ2kUU4LhSC7OECLseIiBAnHna10Cx01pFkix/H+/z6lieIBFS8SnjARdmNRnfugcxzOfi+4WuSHwhy7jQEpwEKMLwxb7O/DQjduY19zxNm9GAYlPrAj3Y3j+3+3tPFr+Om91cVedGt2VZp44Hgu/0iV5AYjpZ9O5HumX7A7ZxmTzFouSIhWafzzqTn7fn8dpeFdwHKK8VP+v26iLNeEMcUXMrgNvGsYUj+U5dIGjP2DBlLAUjrCRJm8EA8YDN2/jpmZyhGFXdJ38gj876dFVhharxNdD0iiRcHc8zvzHd7NWyt2zpsoZTtJ5e+JNN/cWiNNoTYenQRrSjfGutbKZvVIldjxu7PjUMex/cVZiHm8RN8PQITg0PdWgIIMAzOn/72j5TwHCRNUEy2xBzbAWe010AP8hXdqfKxtMVlAtq1eqcCq/4M1pfksn86o3Q1r7hnqgMTSBZyB/pBgGEQdp0qSajJwjwkemXmI/nQhGeoyuhIsiBrF6Xg82fUFhCOXaJ0CcyBrtuaXGSb5ElACFJXM8F9Dz8losRhrKX/DI4G4bNzYDwZ3BZIQlYIwE99r2PqNTDbjpr5ZrkQTanfWgUd7onvc0fOKapzk4wSMx9yggjqh0M/P/uVuiemRV/uO2ih/NI0YqnTtSWXaGKq6ch8KV2/NyrWpswEeBc+lUDJlN9ALzT17cH87tBhiRoivKVxkxlhlRCx1oSWU4HQxEGzj17j2YSaRefyeTDIIoI9P4IvCjEYC4PIe9JdJ5dl7yK3uHpAbgUG9OCF+Y5A1H2pOb30ANElCL8HYQyIyolsCObMUrktNGAUra+pjK5UTdtwBGqCWXPqlwSDyx3DaFqBMeXhZl+/0Fhl1BpmJGr2B/8UcZyh91EFzkRUpjrjjQY0UEssvEPL96gB6N4LejpX0yAVxir3SWC9VWTUCfA5/S4s7ApWUgc/uJhTAOTQMHdpDG1b+eoljs2fZXK4im/zKb6PS0LtD8gIw8tN79z4++oKguNkLEe+u2Jr6Ymv3NH19RBjDIbP2Q+im4DehoHXcPU8iaT20NcOWcfJCVq8M0oEKQyuctznccyhLakFzgFnH8VFy7iiuaWCC+l4Hgvr1WcBtJho4lE07 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 45dcb056-ff48-4fd4-b530-08db10b3a101 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Feb 2023 06:53:09.1990 (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: h3WHG/6e1nommGXRYdreFoEwhmxNWGxfW1T4HOIAfXVlQF/NvgH58tUgdTbBtDAEmdjzc+5ywDd6AF7hYBZ0kQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR04MB6840 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230216_225312_265165_7265FD5D X-CRM114-Status: UNSURE ( 9.64 ) 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 Reviewed-by: Alexander Stein Signed-off-by: Liu Ying --- v3->v4: * Add Alexander's R-b tag. v2->v3: * No change. v1->v2: * Add Krzysztof's A-b and Marek's R-b tags. 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 Fri Feb 17 06:54:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13144362 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 2982FC636D6 for ; Fri, 17 Feb 2023 06:54:30 +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=5Slop0acF+/8yAM90cvU444JMonjhsmIQ13xpA5ycI0=; b=2IKjxeq+48ixzx rr3fPy54maQvJLl1PW+WBhygzdUo1wFLDUM+AInnMRdaCtQ0WllzhnrdvAJb9BzZhxrymAkRK7F64 9QP/bdOT3uGbXpudof9rWG+vE+an5DGmsjNJuPyCbFhd/qh1szSequ9VBsb3sc95c1tIiaA67M2RH JI9MbPccRhcEW8EtejlRXTvdkRp/aFPicjaH+lFaruuDWIOEpT59OTsYFxz4mU9WqSj+xaQwZhp6D WpuG3x0ZCjQKNu3o/omawPT+GJp1BRl4ZkQVhWpa/j4gxi21YpcarY1HaN38f6Q1tj0PjjIWIoerf EVcLzIah2GfIZJhbz08A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pSucb-00CzBb-TP; Fri, 17 Feb 2023 06:53:30 +0000 Received: from mail-he1eur04on0620.outbound.protection.outlook.com ([2a01:111:f400:fe0d::620] helo=EUR04-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pSucP-00Cz6Q-NM for linux-arm-kernel@lists.infradead.org; Fri, 17 Feb 2023 06:53:19 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=js9ly/1aXv87mt4DrP7JMTb3pCeDhC5L9Nk9D+AKklJIJ/lk5tC+EX/HnqT7FwXa3cFbRHA2/INBWQmcg73ezhSbbPjJGAuDQEuM+sNSQyjN97VvFawUsM80PjR6Ww9zc1+De4JluMd5lxexs+Gq3nbLnFUK7iO8oY4PcgGuko0dLnV8R0r0OWWEirMp6pIiuEwaZVzKZJ1QWwpaHljb9F1MCOa9Ajfn7sUEOpWWM9LCowDSYJ8snF0d6CtK16B5R0R/wdxxKD5/oav+gyKMK1y8803eCbBulHWD8mlIjm0Y4PsmzNIXTK5CZZ1SM1BpGw5Pzh+L3RjGex2dlqCzZg== 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=Rm+uXIrRFRUERyeKGHyZ+IJuwEHT8DMieRjce/w6qNk=; b=BiTrls11YNZtkGjmz1r3fX2K5wsq3zAlX5i3RnB6QE+0JqGjyN4bfjjIHm8ZST+BEbdTV9kQHj4yofhTtLD3KlgTGxp+No4QpbJLCrwpcDIqCSIU0gAr4vNITlqHKymHJcWTgkkXPOyjJE3lnApDVI7x9/IUWZmJySyT/mL6GPeyWtDNd/OAx0yL6txFYXz2fAFxfsWNUXx1YtlXeP/EY+3w1Xe2s6GIfkhO74Ov1BszkEkuJbTeS8/XeavmhJewqE/WTS9f9sig3JUqCRADt71QPwlxWTiHsMtKYO6fN4wWh5okiiL09dkVDF3b7wEcdfWYOtbCm6MqAF5K0Dff/g== 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=Rm+uXIrRFRUERyeKGHyZ+IJuwEHT8DMieRjce/w6qNk=; b=jUgrHHGcwOwnHx3yFNMcdyIV9Np9m0eSXtvdPd1h+TYmwOUkNrKpPadlIOHBNDqIEWKEVwg0x5CH/KxrWr1K1n3aU3MWZ8ZDdQeiKSqu9O6kc0fuXz/i/ZJI0K1tjHjlRRa/318R7aqJiWHuqyDvz2BlmMsAJsbzhIfmuzfqWl4= 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 AM7PR04MB6840.eurprd04.prod.outlook.com (2603:10a6:20b:10f::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6111.13; Fri, 17 Feb 2023 06:53:14 +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.6111.014; Fri, 17 Feb 2023 06:53:14 +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 v4 2/6] drm: lcdif: Drop unnecessary NULL pointer check on lcdif->bridge Date: Fri, 17 Feb 2023 14:54:03 +0800 Message-Id: <20230217065407.2259731-3-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230217065407.2259731-1-victor.liu@nxp.com> References: <20230217065407.2259731-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2PR02CA0033.apcprd02.prod.outlook.com (2603:1096:4:195::20) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|AM7PR04MB6840:EE_ X-MS-Office365-Filtering-Correlation-Id: 51ab0cf8-4f8c-4a26-a745-08db10b3a40f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: n8d1GnZ2m5rQ35jZiIWBPcdF7F1UDb9+1sM2dpSqHNmqu2VkBpoOt8y+YGbeVYsEYqANAAzNtW9vh4A9d198Lyz6j0H0vjhgY59IMEpMaDSs1LbGbetxbEXu3joB1kgwUe6nmIOVK52J+hTmRAg6i0WTjZrIztaRp4i8aE8iNbEsulQq5rlrj2hi+r5BdDMp2N/KCosywzdcGM3yA1bnm0MyCgDBQyV+zMzTzCHGwCJ+fPeshxR0KPLG5MmgoFDmOBTS4GX9KfPqLE4S+G0KjmHCKtEdqmeTFs5IvLaMaLZu70wJk0baVxlbB55sRh4vSfrsJGHZh4mak02Aog0dTRDfA61rm2zYvVuv+2W37EW2Ijopl4bmEReXBlHlO4vE8Wwc1B0YaaawoOXPT2UzdJoZzkoHpLTs05w03LwpvgMDMsU2Gt2e6h5cXWh/VdZ4Cg+ZN2HYVrYQ2Qt+Icg+tTYCU/gjjmype/FiN5Lejx12Mruh7AaTq5jA8byQ+i3Ao/NQDu1bjRb+k7MtXIxP+XyiVxZgx8t4HK2vpEGe4ZUks1SK271WdklwNBxTRJ3KbM/Gibv9w5Cv0VJCKx563uD0DhOlODx0t2rMIX5xtR4127IiaDiQyQoTUVeCpuJr/KvaJDkbqZSLECDjcTO2tRuetUpAYJZTCIqjA9r5FvvcUYkcXvelud4cCdRZ5GuH96uh30LLoWk0bQHnWJLBdg== 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)(39860400002)(136003)(366004)(376002)(346002)(396003)(451199018)(36756003)(66946007)(4326008)(8676002)(2906002)(66476007)(66556008)(7416002)(38350700002)(38100700002)(478600001)(1076003)(6486002)(41300700001)(52116002)(316002)(6506007)(6666004)(5660300002)(86362001)(8936002)(83380400001)(26005)(186003)(2616005)(6512007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: vU84hCMpHpPheIzeOt+fBU7tcbW7+iZZKXfqxSHAYdVvYeDlwqrUjbdwemuOcT4f5pI0J6hLze/z3qsedBT7nmTaU1xSSbzm8EJzLdAERJFEFhA9WdkQztGiIPgbjoxb0j5gfzhnK8zfAmpcXzM/9r0ND/uI6dB9E0zv5UVb4J76LZKvSdJQXNAeaJyhpmIIFEBgi1ITI7nlrP/kHvxTBcu1bnblBHSyEu6EIgP5PFsuDVcnA9ZAlxzXfyWF4UCq3H2/U4Ai1lVIEf4oiDYtblwOgShNO25fZ7qwcYkvb+hrGHV+6uK3DzZlQHhfqCIANKcvBudFnBVItqrzslCXn9xTBF7ex1GMGzsfrNN9/Pv+iDQdE13UMgkUtz1jwJSgNKTBiD2jtKgxAuor3rRB4K8fhB0LnF6FUQS8pRMWPpGryOKYgxquY+ulv0X57d8uXgS/pyRRKDdDm9lkhBan9RAvjormNX7Nq/vk1UOjSrkNyWCKeYbc6Dy3elTGVjq3zr82R5NdG+HpIP3vgMW1WpvJ71pzH9Qkh4mwdBUh1FQlPGH/I5bkwnPfJceBinxYc4w45R1CGDMPMKBIiKNQ2aR7AFcvDfEMLBppuV0ukvHfD7mL79lE8dSEb0WvEuQo0zDKwTnaFmRUDXXiYJUmfIEhDN2vcJqdpUBcnQzygz0WaViKAbuijrc0bZZ1FbHLKMz3pbnO9j/0qdlvYgZpnjqI4ImYgawhG+XiOsFaxOJ6kopwl9sUZCVacEboV0Y73TIjV0McSMjHpthr9keUVJglyLZ5oWDfRNsTaVD3aQvMK2cz2bwmpn4kHcrNlbZceF01MkGOnoPSdbEexnhrAKFDauI58Wi90tuqpBDivogiCHhdwT3dsWc8fMsPz6G+AVNf1whQrO0kiqmeqX7ZCIFkCKIVFt+MSSTzImlxVJTPkXbvPUcYXdY4ij4/vo1LjcdSgOgU87CCqteTZbDzxAGHprsYYQRmE1xUGh9UPy1trx7vMPgt1UJTF6k6c5vS89CM3cLuiU8NZgDR9vfRm0/t/dxUO7DVq3WcV/u9gahYrGBhx3qpmBDP8RwCrELAw7y9QwKivyh11YhpbKXDjkJYb0vMNVfF/AVBmt/CFonbeWF8yswazgAO2Ku+oeR/pF3/B6LhjVjZgYHGR8jukEpe8dlbcgboPAdP/AfokjaSpj8PXFdEbxPFYYP/yZfgOZ6Pc1svveNrgrHnldsjpbnEFgNh83oDVis1YRpYxvs+qWWmXOXUvcJAu52UfK5QMeh6IaGtK/VdzppsaNZ7M2Jo62uNe+JbvRqTAwoFEmFnnA6CVjIthQYFp5t0m2R/mf9BGgSK21A8X9rQqeRLm+1MRvIMAcGcaGh1WvQ72fu4Ohn9h7LtS01vmgmKFT5A58jRh6LMKUrglVcjfWQZFkwQCnKKKo7YKp7qpThsFvr/mHW05JiHA11/r/Jh/h1FyqPOYhDn4xb1PPe3GLZrcB16yw6oUYCi1Fi7BT2LGojCMF18Mabja8wWwruW8/phfo4MqsZnH/TJjjstW5KoVvGl9x3zTm6SuTO5yCYo02VsMlr/y4X4hCMJxzC2O8fX X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 51ab0cf8-4f8c-4a26-a745-08db10b3a40f X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Feb 2023 06:53:14.3392 (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: kH2srvnDAfQXhA/EEGrqwXutmIevRECFy/nbIn2HG0QcFiczHIzSm9nJmRsB3pUuFBvOMfM7ULsSv0ec2nVu+A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR04MB6840 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230216_225317_789461_A5E0CA51 X-CRM114-Status: GOOD ( 13.43 ) 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. Reviewed-by: Alexander Stein Signed-off-by: Liu Ying --- v3->v4: * Add Alexander's R-b tag. 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 Fri Feb 17 06:54:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13144363 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 49ED6C05027 for ; Fri, 17 Feb 2023 06:54:46 +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=7gPvDALFXrbyC8LhgOhDZ0iHlT05lSsRIV/xBx7OYJE=; b=ofr8kJDgYcRsmq rP47vNT/kC9ML/6KGyoE+1j/TSwr2Aq43okP617EwO8oAYC0DZwL1A8Sj/bqokda3YvypGiBFxe7h wN15N2KXhTGE9I0F6xaGPlRV2RKawIAS6kWBhsr0ewlLXsi4SFjhIvgkQQuOkyx5FSN/QfKOWvCV1 8DK5NGUF8Mv3AtwjJ2smhXLrAoJLip46fi9n6s9FqCQCNbi+fkEjcwy8iuatNKK7r/ICZVJV3heEt jPLD9u+x537f//E5Ul238hBiq9bEuGUXqDu6+vu7zCt7RJ8nyHyp2QZq+XzUSeLEQ7tqeshgWuTS6 57UJBzTbgCPCqZ87i0RA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pSucl-00CzFT-BM; Fri, 17 Feb 2023 06:53:39 +0000 Received: from mail-vi1eur05on20628.outbound.protection.outlook.com ([2a01:111:f400:7d00::628] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pSucW-00Cz9S-F3 for linux-arm-kernel@lists.infradead.org; Fri, 17 Feb 2023 06:53:26 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IQeraaspLZwA6sbVpIPgVP98luFSXCgJAPbhQDpuIQpf4DwFd5YBmyD2tWAlB1fj/FxtKjmGqVzCPMBIIOgZTfUPtJg/94VQEzAqwJhnTSthidpjvvjW/NjtLYmG/ZxLwA1CGXVT0fpXWOLMo0M4Bf7NATRQ9HoklVxNiIsoKAHTeLfHIVpOuz0CeCPeE2a0o2ODok7IfFFFITfTcTJNCO9e/5F2hImLTeBlNpQ0Kq9r1JttNklE19b4E7XEmBF9h1o+uGCt3W5YCd0lG+wo+hbPP1YsDSIKJy/RuTVKxwf20tTGsPSinK8UKn5ZEMhwWVLGjUPGHcxHbWjLYoJAiQ== 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=XcTqDhdohyQQSQqHWgeTGMrWfiWKhF+XMgLvrmk69T8=; b=Fihk2ckbBpwHVEurZ+DRBM3pQ0KQHy9hRrOEGSZOTQxZvq35P1a+T9GMxJrBIsIa46iHYF/fMQa7n1np2xJ/6G9sH5KI5kILHo+r2JWaIzLLqzp9veGkeeg1FHpyfm5PMQ8I15J8jB4pylpa08pFvGY2dq9CKZkW3kqn3CcJ1FIuIwC1Tws5qiIUccw/6xFpaHHZ6jDq6g7ygIv6CDTxu7qjLrXK5HHW97QsxS9Gd5iRilrLK+lz0phMQydjrysR7QAsS0ritsFsVKxI0f8sulBmf5c/Or13SH6gbnvV3fHfguGn1zL/2IgjC3NzktGOcotrw6BvysO5H9gzCg5W+g== 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=XcTqDhdohyQQSQqHWgeTGMrWfiWKhF+XMgLvrmk69T8=; b=sJbooNolrSPoN7aNE/+JlR/qiJ+Yr4b5bsnaMxBujWALES93TPxPD/2QMMsGB7cfxe1/PVdv9Vx+4G2vEckwNXrU82BJc5yD7qGeVDbA/MnatCwUlHJxkw5KELOJoOCjBcO2+sjJNNVOBnJM3zVHwx6jrPCjIRkJj1f+XUSnPR8= 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 AS8PR04MB7541.eurprd04.prod.outlook.com (2603:10a6:20b:29a::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.22; Fri, 17 Feb 2023 06:53:20 +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.6111.014; Fri, 17 Feb 2023 06:53:19 +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 v4 3/6] drm: lcdif: Determine bus format and flags in ->atomic_check() Date: Fri, 17 Feb 2023 14:54:04 +0800 Message-Id: <20230217065407.2259731-4-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230217065407.2259731-1-victor.liu@nxp.com> References: <20230217065407.2259731-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2PR02CA0033.apcprd02.prod.outlook.com (2603:1096:4:195::20) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|AS8PR04MB7541:EE_ X-MS-Office365-Filtering-Correlation-Id: 7e7d225b-29f2-4601-d0d8-08db10b3a74d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: GCBfSAc8aX7dEM3D8lIKhstwsV0g5K6DhLMz44OHwldmIjq9va5kfg/YmwGm+jOF7ZsMvQo/9DJbnm/tGuJY9eRLir1G25aHhxSgS5NOkxZrJIKjgRDl8VKz9hVqAw0Py4TKjLvNuqBnWfpLlYm7KttBAoHIcad9kFWo8/3Q9aN330XodZxqbTiKxYQuKhbOV8ODJc8fv4ZxdzuWJgLq1tD6f9hRd3yOXxjxp/LhBfc9gPU0NHeN2po1q0zWcpq+pbzKZ1PVGieApD3QDN9cH706S6cZQ799VQc9moqi3GO9/QUwdTl0dMVgrdNdNiJ7ctRiC5q6On8nET07xG8RR3rjid4dzXeXQrQacdnlHG6KwBbEJS77ru7d7ghY9wvnhKlpU0r20pounWEOhGmJ693gMn4G09LxK0hMUsQlFiARwqF/79Ht9JLHFNfj7dCdP//8ZPK1tuYBXfYRa6Y7914oqQVEfRCibap0ob4iXT3TbGC2vlYvLQo9Mi5oSCR7PnyNNQiHTLH67y8RmEoQD0is9NEVLFOp+NjD24xJCDhd9Q/iHTe25+dVfv9Y/2QulEfLAviRpUIbK4RbKgO0oQ7nS8v22Y+0VV8m4fyxPnVGkSvo2vidOWFcBQDd/MsMXn8C6vK5rxPV8aS+Ffh1/hM8gHAdENRUulXbJLz54jMRvz2uH35Rqp9WEZuC7qocoZ7tWYVqZ6lFG3DanbvdQQ== 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)(346002)(396003)(376002)(39860400002)(451199018)(186003)(26005)(6486002)(6666004)(478600001)(52116002)(1076003)(6506007)(4326008)(66556008)(66476007)(66946007)(8676002)(7416002)(5660300002)(8936002)(316002)(2906002)(41300700001)(38350700002)(38100700002)(86362001)(6512007)(83380400001)(36756003)(2616005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: nSmV3REnQ66FS7I6kdtPbUbSwz+eZlCrFERDFVk0f+5NuBgUTIVrjFp8D9gV5hHsCCyZ2KKOagg9ZR6JN9oeo9B3ZaFjJ4VXMOBjVmU650p2TdapCVzaZE/dT7eTUn5S6QL8L8S8P2Qcr6w3uEroMYBZVhebQG6uhS5bqc77Z7lJW4MfTb968/HBuU0b91YAJSesD94qiaNkJ3LqyxT1Ivw40lRgfh6JMiei569BZHd13SKQt+GxUN64YvEWZg772ofNkY+9mF6yDh2/50LmQ32dU1Yf/FwFGAkUmv75M6FzPfvAQOOcmvsfUARz64pSHllLCGUFWM+n/XS1A9hNTX4JcGgO+K5dTWufpO/NUIiH/9VVDX29ID9FkDUfnu1vKusECQhBZ0ivACA7FV+lZe/WDATB8yFHuKbuzc4M+4XxOAK6jMTEW3ouiP96MLkmym3Nst91bD5Tgscu/7qUddbJGgjxPASKHTaUMhfHNU0ZwTq+q0nSKa5tOl5X3rr9vPxU83xN58XkqR48jcyxlqqXPrUpE4xM6R1PzqwddxSqGz3JVLP0iuWyq3cVE0H6yG9RLCRy0l+v2yBppXvFcg+775mxJtKzBCR63nh0Hp+eGp4PkKNw8oMHU5C0NUoHcGbN8dEAaszUUcebyKci4qpXsiF8GWnEH+BONHu4uhmnojAne7oEybeU3ifPFseAyWzAED8NKRYYYAOB1N9Lx0itudM8pdt7ZRdPR0GZ9aVaeyefIGD+wSpGcZRJ5YdvlMlLOg3WV2uFmfUXkq717ZaZc6/bwAq3EJFi2YqIDuTz2QM9b5JHYHPIHOb+Utu/yfIbRiPpJofSpInDyVIAwaFBxxgeIU10e8TBBLCuPZ0TIscKBOJ3PLuPahRVxy727Uw+EzmsMx64dynsdMFa+8j8jFfK8pLlMMkojQWHvS6MiVki+KGzZZOlmHFAfaDEFUQmV2kXUJlsbQHnptoWI6bVCfTCAICLCER4jmMY/HFLRqmhm9dWGlkjb7G2J3wnVi58P6QyzSCwLnxMEuOgdJY/MKqdEEbneHD6JLo8hnEr1gudLSmzYEupI8pCZV7FXKj4vUp2y0gFKoqxtV1+Uk9ZJztvcp619E4jMsNSguiGHWSig48l+SLT6mUpYEUxHsQd1SKCM+ju1L4c7DLKksOD+ZHBfH7bH3fV5xVyb+k95kaeqilgqmEHU3YgWhfI9ETQtm8MXV2Olq99mqxwaF9FjW+KUBq26WS7WcrD6AUqe9U9QGl+D2Dv8bOUPJ0i+CdJJxGnMeeyUGd65ctTtCe7wp1OElKcpG+hUkz/CjqHWKBc6KzNIjbOoEuF+SwvixvaOkf6zElssuaClIkm4OzufxYet0hrQVy7qRCkVjEb7KxuRkiGJJXz1BKmo7iIjq+UhqqIOWE/DXH7L7wrBK1FHSncDmwCnuVIB/mrjmji1/Xd2eI7FRPzmYum2FvLJGlKnthkR7YdqbtOkcvt7su+bWEGsUplLX6ADkUIBaIUf/3VAUJFE2MqPLbHvzdDklEEbC5JMqb9LH17uuHFM3WCqjrjWqp1XVH09UEv9aQfp0aDMDNB/OtMjmGts0Sf X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7e7d225b-29f2-4601-d0d8-08db10b3a74d X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Feb 2023 06:53:19.7017 (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: 8RM1/WYx8Dx+29H5gZsgHQkY6MLb9NKRjUsmIjyP4BwEmWSwg8kBHy1kArWHWE3w5rGkgVe8gOMK/sFzu8vJdA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB7541 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230216_225324_692383_3B8E8DFC X-CRM114-Status: GOOD ( 19.77 ) 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 Reviewed-by: Alexander Stein --- v3->v4: * Use 'new_{c,p}state' instead of 'new_{crtc,plane}_state'. (Alexander) * Simplify lcdif_crtc_reset() by calling lcdif_crtc_atomic_destroy_state(). (Alexander) * Add '!crtc->state' check in lcdif_crtc_atomic_duplicate_state(). (Alexander) 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 | 134 ++++++++++++++++++++++-------- 1 file changed, 99 insertions(+), 35 deletions(-) diff --git a/drivers/gpu/drm/mxsfb/lcdif_kms.c b/drivers/gpu/drm/mxsfb/lcdif_kms.c index e54200a9fcb9..d46de433cd8e 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,32 +494,18 @@ 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_crtc_state *new_cstate = drm_atomic_get_new_crtc_state(state, crtc); struct drm_plane_state *new_pstate = 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_cstate, new_pstate); /* Write cur_buf as well to avoid an initial corrupt frame */ paddr = drm_fb_dma_get_gem_addr(new_pstate->fb, new_pstate, 0); @@ -520,6 +542,48 @@ static void lcdif_crtc_atomic_disable(struct drm_crtc *crtc, pm_runtime_put_sync(drm->dev); } +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 void lcdif_crtc_reset(struct drm_crtc *crtc) +{ + struct lcdif_crtc_state *state; + + if (crtc->state) + lcdif_crtc_atomic_destroy_state(crtc, 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; + + if (WARN_ON(!crtc->state)) + return NULL; + + 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 int lcdif_crtc_enable_vblank(struct drm_crtc *crtc) { struct lcdif_drm_private *lcdif = to_lcdif_drm_private(crtc->dev); @@ -548,12 +612,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 Fri Feb 17 06:54:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13144364 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 A367BC05027 for ; Fri, 17 Feb 2023 06:54:56 +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=5M66LYDVKSRczD0R9jtc4j2ri+Sga11riCyvZ17m5Ug=; b=qflvDWy3gwZjyO p946oPIBIKsiCPTDr/bbX15AZr+sVgbZgs4kZGdS6ZNheWi5HWzSf76iMvy/a8VrEi5OVEUhrvFpV mR7b9d/STlQ1fyAUYjN0BBCJtbxpxRxDNq/whQHPcFwYSHMBo3uqmGEgjrrDmbEZaNcJVm00ruCDb pMZC7fMA8qbFDMP3q3Ptk7DedNvNf194QpPjZ45L+cc588HV4bsKnUi6EsQbJhfxnEsoVXDVNU0Nk FK3i8J9PwqUz5ePaTua4NWzRxQ/RS7hFxj2l4no2PLq+etRA9EYJ/96CTXvGFP4S37CtDP/DZBGHc UDyZ6sQWG6hBDJYPWIBQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pSucw-00CzKT-Kq; Fri, 17 Feb 2023 06:53:50 +0000 Received: from mail-vi1eur05on20628.outbound.protection.outlook.com ([2a01:111:f400:7d00::628] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pSucY-00Cz9S-OB for linux-arm-kernel@lists.infradead.org; Fri, 17 Feb 2023 06:53:28 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ho19rkWkZPkbbtmwCTdj+HQ+9eo24185EEJM3CrPACq6IUdRU86bHMmXuNbOnkjR3XKRNr9rt6iY2Sva8aofrI2L2s4P4gpclhBbYi42moTO8VTsXyBHZxaQzN1C+v99dDKQxLsFr0gusb67rpBgRgJFgXrzqaptd3j+cxzGQ42nBAxDZiJnMJ/0czGv1OEGgrB3wKVudy7C4+5s9b0b2keuYgb7H1mXxcziljXbY++Pe+gcHSNLhbiDlq4/Iey76a/ib3S8Fp7szpLRkB0TBJboE8qmPaL0jAExe7P2x1HGaq16zydUPcQcyF+zbWp8a+PrV0slCyzBddZsVqYWHg== 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=45Pt7RvBtxBF0Gwzd3YEF57mgnD0zEJn7sUE89fFrxA=; b=jAfHD9Qxi7woyHGntaX66NLYHe593dcX172bwznEf6k6pt6XsvfX4NvB4FBJqXPZ7XeTXweXJczZkmn4f31mSW493h5NoRrvwOeyIBB1M8dvt2blIO3emXMz+Vq15V6ocOVCX91zxO5gXjeQHuGuysAIihPBN+Z7hbZaDPiVlMbX9tWYXdF5OrgNL3tSwtWYppt1lm4f21YAWOx7PClrp/c8sJRwOB5M+w3phISk9/atIF0gYVK1ot282a3WOAJsEANRK4wlhX/HqC1KwJ1wDu70MNZ9f/NH8Jq9tt7FGaHvX+EabOHeD8qzHCiVU+NTqskJBatMLslrzhgCH+WfiQ== 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=45Pt7RvBtxBF0Gwzd3YEF57mgnD0zEJn7sUE89fFrxA=; b=eh0Y253szI2IKXoLkYwwSvvOkapKl+tUVWLQSGcF/Rz8lsRlay8x9y8SlDLaRPzJlX1RL4QN9Yfvspm0ghRF4kKgwLC8CLHZyFsyteEsNhDSwG2+HxgMRfLI8I/Dpso1GSXMS0jph8ICz03MaRXFvfhXrAKKkO1ftxdMzXn5vmU= 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 AS8PR04MB7541.eurprd04.prod.outlook.com (2603:10a6:20b:29a::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6086.22; Fri, 17 Feb 2023 06:53: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.6111.014; Fri, 17 Feb 2023 06:53: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 v4 4/6] drm: lcdif: Check consistent bus format and flags across first bridges Date: Fri, 17 Feb 2023 14:54:05 +0800 Message-Id: <20230217065407.2259731-5-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230217065407.2259731-1-victor.liu@nxp.com> References: <20230217065407.2259731-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2PR02CA0033.apcprd02.prod.outlook.com (2603:1096:4:195::20) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|AS8PR04MB7541:EE_ X-MS-Office365-Filtering-Correlation-Id: cb01bddc-0962-45fb-f44e-08db10b3aa51 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: tEvc0B/wOgk9G6cy0YmaHukcvcUuJth1TxnYSUy+ICIEWV/SMhpIujwZ7FvlzPpXEA5aMjhiafPjaaW/hksvPV6Q9Lx6zSWtY4MZRLo6Y2bJCv+7mbaM/l0pbAOO1eAS8R5UoYdPWRixwV2PR20PdeKSFbrzAehQtXT18Jpnj10jgqGNILV7oxkIVSkveZfeP6LN92ZJOYajwnVxaMZPM9mfhIevZHpCLP36f/C3kV0afYFY+P9O1uMBd4kzFrsiW1m2uyE/7bg40dkY7UGygvHsYqq8FAI8MFFpYMVfKYU6Is5+1/jxjn6JeUUoziXXAu80Php2Whr0X4MyEE17W5OLWFM4b7QfdwQbCZC/nFSTltGNdL/OOACrKx7nupQkNmN/E1efasGyyyqGXjlK2ycc0CHV35NXRjzjNBdHe3Xxhn+4F5bRnEbyEhzLtrpLAx17btJJDwsaD4xv5qV/KZD1KpynYpjt10+2dBN6HtVmSQ1BJ3vC1V0Xcb8nouZ8iAOOlBO2MItGINCQrShl1SFRHRC4VagQlu8onfRjOr0F2sHZmBMn32y587o0U3ofyGoe2a4WyujOtUeqWKfQHz5xU4ANYbBC98Kwbx2u2fc6R4xu7lSvmBEY5ryHE5WCaSb5ujnFy7PMna4q5WORdfcu5xtwXzailPj4GCNHui3UfdPprk3Frf5C+oiHuxAMYmjbpBpo/pWmUA0RyxRFuA== 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)(346002)(396003)(376002)(39860400002)(451199018)(186003)(26005)(6486002)(6666004)(478600001)(52116002)(1076003)(6506007)(4326008)(66556008)(66476007)(66946007)(8676002)(7416002)(5660300002)(8936002)(316002)(2906002)(41300700001)(38350700002)(38100700002)(86362001)(6512007)(83380400001)(36756003)(2616005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: KS1p8LpQHTH8iGGDjY6HsZNauD1AtEwPbIeXXIbot2vE9PTllhdWV6BmPQnbuFafh1M42FbuyAZalRhj2+0YEhK7PSiJqBEq24v3CHfG5iRoWx44qrRtSkri85xpBTF7VMf4OKt3SNYoHfZFRhoPeuEZsN/mY7gsZHZLn9loJg4Ld8clfmNgutj2aRBZNVVnJFqPLm85Gauf3EC0+VL226Iw8raUIKMIJNJxlnOgN9jFgQW3vxLQXIC5+L6U40bc36WFsV6P/wDnP3EGc3mt2grd6jzJbkRILvuE+482HpPnHOBkklpugWVH9NPA8i5FEODQyu/erlTWi+s/RZLmJinfD9tvwlw1HwrnfwlO5BpZW0CstFAxYh5P5k31F4T9SAHb+7bWUWKiZ39wtYoZBGZPEQ0HAEX0pJHi6sD7j+1BijjTkGvL5qfwhI4AS8YremB68UqOgi1L6I3fgTcJ+mJ9ih8gzFc57xVYkMXIOWiOS3VV2Ew3Fa9e6GcK/WxsDgYqpFa/RSZGKQIxjJGmEqwAElH/YypaNMGqkGdnhlZljF3YN+H5UyLY7DZlyQDAbMSXHBhDtkz6AMRE+Zrm7/+jT3NjEIpl5yMAerkAkB/rRmYRqgm/Twkrn61N0apS4QQUTm5Nl4+kg4vwWwMfSwP83pCG6lo2gH9Mn/X8P2hscsjUCKZVcYjLCu42aR7Kxa+Kyzv5MweUJKH+1x7VHXZiQpsbRm42wAt+Mp7DDyz51s5yUCDp0ROAXhjUYFneq7Sn2Wg2MSHJz/tntKm4nUtXcgUzCYXrMU3n4ed2VxqGn1pLJ+WbEjLQLATbUKb+NEY0701ssR2AmiEYcJR+hKkdGzjg9zKGwpMX5IyAUnuSsOQ+dBVYWjlAR+uFEWPR2EwAd6TWsNf4hbov4gUlE5DgbkYvNtkl//LJu6cm+Vha/Ulr7zYGT12fKHujJTrmJs0RIWFvYuF0bVH7UqN1Hl9Ye9vDH16dpGzCWLDJ5n/GpUL5BBTDPeW548iM+9n0qKqNkC/9JjgZch0nhCFt3jPKFJN9wXlU6g4WrKD4p10nb35usCcXUAQiqkEf6j5h+XVcXVKPBVTN7JQKwY8Z5GJZ1EUSW2j5d1QXRQqZq8CHG/o1tx/82hDAKzn2QLeucR6iEoisQlA8y9jhxVKcUgrBRWO2SuYdph3M4/ze+Vshmv9p8jlbuvfpJ8T+uj1/feU5oUdDBYmnlWbOOZa41YNaQBh5/igfco6x3cbnuz8A5xg0UCz2ZStI4ldDGrzMSsMwrnw0kUjEiv87JWMZvDiEvvAfl5zIFpIti7CoYXjFwVXQA4+qu3FFPLJ4wzp5inaobSAeVZ5uVwxImakI5ACOf4ZSqNpCPbbgI4jPxxd2Z7e+8jkLRXMVA+uVwKc9vqSO8pI30btyHgUEiNNNlWH92X7pLMEgT/OOBBgYr+ffib5/s6pqSWX1jSDyR3/c3tk4IIqFVT+1+ZrVSB2LEko7Snh2CCY4VB6Lbskz8V1TYZ3WrMzr4HZO2jt7oIxKGaVtk5xSXiFX1vqPFq32mJ8qeLnd6nmYAiWiZGcbu9Aj+tx9aBGuQjqpbEieKD8K X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: cb01bddc-0962-45fb-f44e-08db10b3aa51 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Feb 2023 06:53:24.7790 (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: 1oExaU9NmZNydJDtaIhtSU/k/BMuuk5sv9ZnHYXtnHq1ABipdJQpWg47aolyWu9Nv81Fx9qwdeOdzvGFK9U4Pw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB7541 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230216_225326_816125_36721098 X-CRM114-Status: GOOD ( 18.54 ) 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 Acked-by: Alexander Stein --- v3->v4: * No change. 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 d46de433cd8e..d6009b353a16 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 Fri Feb 17 06:54:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Liu Ying X-Patchwork-Id: 13144365 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 6020CC05027 for ; Fri, 17 Feb 2023 06:55:16 +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=TaGTPstxJi+emCxaPLpUDpwboh5m7xoWpcuIBqgffyI=; b=vbOgslwGxcGcSC cCTohl2PAmtFz7JmS+4REvht6pxPhTJ/vaTjVqczaXD+ev8fxMRCxiEDgW7EJBIked0dXXspgMsGZ s8orywtBZejJPvmIpSMB/poDw7IbWbMkvMntqwLA8TZ1spIBuMwXvZCojN9SPUsxWaK99aA/XVeKB QEkVlVcdP6tFtIhaqFoO9a2U4EEOnqwZzdO6SnQrVqa1Xcps5YYteyyjEHUnWIyeVxbupW+rYvHV5 hH6N5L5V/EJ5VfS/LzcTdMSUNqGi/ZS5JXrXzPVuJLHuT0jh+OLqWkCEO7R+L9ai28FaCmN1A2ait uMydkZmd3yj4eMm3NmAA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pSud9-00CzR8-Ot; Fri, 17 Feb 2023 06:54:04 +0000 Received: from mail-he1eur04on0608.outbound.protection.outlook.com ([2a01:111:f400:fe0d::608] helo=EUR04-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pSucf-00CzCc-GB for linux-arm-kernel@lists.infradead.org; Fri, 17 Feb 2023 06:53:35 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IhCj2MLtJEE5dy92Yzh4PmmKOJAoStob0fM4I+7aBNcpgKFjE4WY8uU8vb9RPtPCIo/ADEFeYpwMt6X8/SzN9lD1hG2jzrFgzNhgnqup3Yvn7NI4Op4aET5VOCLOES3JzBCHqnw735NCdPKFRab+iNbByRdMOdJApVA3gwa9PGRxJ7PwKfRhhWyKRFf3ixccQUlTjIqkelL8Y4NYHJZQJ6/RJlioeJu7jo8jKgpOzg322oOebDj6gcpHpcfoS59prYzXAQXB870Mu8cdxBdqLVXOE0kNWSpCopWuJeQfOCx1YeNu95F8GFXiUPs+UITAdxIYre9Hd2DyuVghDYIMQw== 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=RBwLD/TkwbrMLepjenPJEqZSFYZVyz7nF0iU6vb9fqY=; b=gZ3Tprp/iRF/dtdxZ3tcqUVevcianK50oWgVEryJEMBv/c0AZO0O7vXEbB+wpJQYDpc5p+r2PeZNVxhFWAxaxDERDVs/vjzXXnFkeMQgmbTAfX4pK7lq2p3pRzPolqtMoRyafTK7LPt6yDU4uOOaCfubVwnXI1yDCaDpaEd5LRkbg8FJlyigHLlGepjjM03XEqz80fNmWCk46Czme/OVyKZDJKV9I5Vm4LGG/vkpSVWF5IjwFYsu10LFnTW98gAJeLP5XodAeYu02j7SwrdJi6LX2vnrZ6XTt61StugZtk1G6byg7yJm8K/J79IxxjYehv2MAPZ/x7gCWIX56i5cGQ== 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=RBwLD/TkwbrMLepjenPJEqZSFYZVyz7nF0iU6vb9fqY=; b=IXzM0qFmxdH8xDuw7yLKdCI6ZEfRESBVtZ0DLmLVDCNhi28BbeTMcLozsy1yYksAtq3htwlPqkCT0KITFj9zQ2BlqjmfG17/Yo2UUP/Bjg9CZojdBi85esMfjuntDgaJugQtXimdVpjnLR/VBvGRyxb9yKui7EnRppr3oaEwIB0= 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 AM7PR04MB6840.eurprd04.prod.outlook.com (2603:10a6:20b:10f::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6111.13; Fri, 17 Feb 2023 06:53:29 +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.6111.014; Fri, 17 Feb 2023 06:53:29 +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 v4 5/6] drm: lcdif: Add multiple encoders and first bridges support Date: Fri, 17 Feb 2023 14:54:06 +0800 Message-Id: <20230217065407.2259731-6-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230217065407.2259731-1-victor.liu@nxp.com> References: <20230217065407.2259731-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2PR02CA0033.apcprd02.prod.outlook.com (2603:1096:4:195::20) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|AM7PR04MB6840:EE_ X-MS-Office365-Filtering-Correlation-Id: a00cf244-8c0e-4fb1-9705-08db10b3ad56 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qyPNavni6Wb/ODpyTr7BLF4i5+61tgWjOw6urMxEWuuo9LmgHCOM8rEV9REgnXYd4uUgfllPiBpYIyHP80H3EWFq80KMNWYDhYuRgHE3PAoJQaOn6dfQoGzztUaXYvxPWYupeogdxumJT9TKD+c8jpGsVdOAETo1LElyuFAvEMSwo7dcgdJkvx8hGXS690VsYV0xIimSIRDG3muJiux4TOS65pU5tjQwDPruooJvIG/kyahHlym7SvqEJa4aMTNnuh5jd00DQijmyj4aOPB2Qoqqop6H1wRo/hdRMtl1uJaa4QmAmjuuubeM3lVt61GOyZKDgUZ28FozbNtKNjZ4U/Iv5lDsyOqYOhbe9E85Le1ORkvf0t9TY+w1zlccTgvy6b5mVCDZ3FxTtL9q5L4N/bltfdNjK18V4vG80EYnfYMhYdQOj5nnmNhg5Kq9dGcsFgu72PUwEFLnZeM/Z9YC385v5Cj5ZbSnVWv00OI6ntnW7Ztz2OhYXn3sJ0fmEbx6W2SGJGde5jp1shmjPLPs2eHB1LP5gFLSIvY+1jNuHJfFIn+AR0TjNRG6UxJLyHSNQX+rAXFiSgZk/syveF7tEnObbn3oVOpoZTJIHVVWoUX2ZKmQA5Egex+SFBRyVmG7zUuPW1cKw34UXLGd6j8Y33pjbGQXzII/UzWKvhP8oVd2WB4/OiKoNcLz+R03cXoFRmzb0oJ3yAF1xVY8h1Qe3w== 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)(39860400002)(136003)(366004)(376002)(346002)(396003)(451199018)(36756003)(66946007)(4326008)(8676002)(2906002)(66476007)(66556008)(7416002)(38350700002)(38100700002)(478600001)(1076003)(6486002)(41300700001)(52116002)(316002)(6506007)(6666004)(5660300002)(86362001)(8936002)(83380400001)(26005)(186003)(2616005)(6512007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: ObxqFQ2b91oAOaa4uh6CHXCcQ40FKyDs2XBnvUpzr2cEHMLvV5SPc0pSdOJy5aGHrfdzaUTUABua+75LEJ+r6+CdTuqEYQfJhke8LAHscWxcmm2MrlQ+a3EU7IMkwEihIWdT7c5zJneBYPo7ci6UY7jLAzSSYtGuUEo+XiBJUv3QEXbocN3+ORv4PTsv0yo4Fl/SF1KBdAtTdHYQd1EL+3ujyezeLBrBORZjRO5tZuCJrvZm9nsR3nYr2RFdHNQcJZrNYEkAodtQT0ga2mCO12kZtTPCYrztpARWaUxQ4FKu1YtH445v6yyXNvt8G+3cu8DJBn+GK+xH6vrT4g/6j7h9uGUDgGQ/Ute5NnujXqV87FhltKdqk04HrDhqEl2QIUr+elBiaeXvv2lhWQ1Q0EbPUN96jX0xFfMPbJ+A2qFgpJeAwgPELZ4mCAhaPI+1VmryFFBv2KSO+UgSIOPEX/0spU9TtTJbyT72fw8iqRO7vdlZETxgn0qGu5C7MxutcPB32sXD0UWnSMb4PtZ8hbhtCpbuK5Jp3iL7bExazRtWc0wsGc0qrw5lnLQ07RNeowXG+Zk1r717n2hCurZOdvfCcQbBp0loS1vy69/OLAo63k8Qu+1B9IYfYJz1EMBrES7RPe6dU+SpBOtZA2ZABNW3/Wp0Eg34BSOWch+jwODfjrgbY2yk54ARNMuzMPI7wLncA0HtL7lSKd44IFswOnn4KdDKwDonwlf0PUYVTL820Ajb+tygcZ+aGPx0qEr98w7mt4ING//sakzhqb7aTRErN5JUd2EeQYqQm7rn9l6GNMyCAagVB16rNne83cxt+Hvhv/mBsCz+RK5sO4IAt2nPqI3BNQ6hK5YZraB/pS1JJrGm8B60jlH9ulR0fSelxy6NBeUmOY/Wr/WWwTZh8FqqyFdWzmk15GfVb9Hy0zEFGkubjFI9iQmsssn7M3VKXW6Vc/7R+ByPtunGXcrwL+mRYDVkTlCg6P5sCmXLmlQ7hcphiMUR8i4Lx8e5gx/OtLh8rWKvSkx9Top/go6ZRdf40K1TT/t/Q+hNVE90eUzsj+9ThMShLVz9TZsFk84QG0VqMRUXjUtJFTO6nrvf1VmibyY0K3rXUl0R6/s70goMhIloPdkCC+6TINdzgk2edZ7TNLmwInoxo9d5EJM73obRblMZOJ+Lg1ocBZSaxfSKL7eLITh4N2SXAFTrHgD/eHpNmL5kXMUrd9bvdxVdjFL49UW62YWVzBXgvRXrWiU2CWH1UWyq2RUNugc/T04etu0MeW8H1/SDjWdPGeO0pYk/VsAMvrVmfmOqJ0G2TFPDRzPihnvxvEMt+2UhETRckhRxFvgCpxYb1+JkcE/zF+Uwlxy/p9ibTuty0W+XYQ4v95sBgI83G84RR0wzGg9zVIAajoxulQg67rjhRZPZo6Gbh2sBYBWvSikFuPYGa6Fd5xWTFntHKHp6UzYKznrM8BCTVl0DKzAp2a+IIpRNuWvAyxOseV86VPMKT02QqtFOrpfTcVreDEtVDmN+xF5y3l7tr57lC7/Q1YdZLx2nF2v8ByI3l1f6w6SZQaqipiDD5R7+wfEZr9VtQb/pbBXC X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a00cf244-8c0e-4fb1-9705-08db10b3ad56 X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Feb 2023 06:53:29.8254 (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: ryYHq17Chb8lJOFzukmGg3Vn5iB2Jz2at/PiJmfswI4xOswz+2hBk4hLDrIfCJYmgZ6XQrxYDMe6W6huFyommQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR04MB6840 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230216_225333_592864_5BCA3255 X-CRM114-Status: GOOD ( 17.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 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 Acked-by: Alexander Stein --- v3->v4: * Improve warning message when ignoring invalid LCDIF OF endpoint ids. (Alexander) 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..f1f5caef390a 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, "ingoring 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 d6009b353a16..c35d769f91dd 100644 --- a/drivers/gpu/drm/mxsfb/lcdif_kms.c +++ b/drivers/gpu/drm/mxsfb/lcdif_kms.c @@ -656,14 +656,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 */ @@ -756,7 +748,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; @@ -780,13 +771,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 Fri Feb 17 06:54: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: 13144366 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 627D0C636D4 for ; Fri, 17 Feb 2023 06:55: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=AdXaKp/3EmmVyvsLGtD7Y4aAg/6evbJUCBcf5KeSS6I=; b=T/iNlQ3V53S8o2 FDDzPghWldgzKGyF6a/aFFBdUu49GB2VGiD1z00BNoscT4q5VFuR5Kuq8q2hxDlgAlnsPCLcqPYj4 VPhJtkR8HdxXLFjbSUR9GJIuysphU8/61Jn8acOJCkY0LNThkXMY3r07L+lbhYZ897V6Tu8Yo/mce d0DlyzibzPMdkRgu4o13Jm1TXoYTC+LYJisoF/C9cRfRJUvxwhQ3VqU4S6dRrqrN29qDWc8cyMZvN Td8l9mD5PeNWxQmB63PmdGhnKzNInNy2jq4uskWOEVuy4zKkASimjDUCexf4aMhht0ysiwGDi10zV sadJCzKP+qYOeCXGSGjw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pSudc-00Czgz-Bl; Fri, 17 Feb 2023 06:54:33 +0000 Received: from mail-he1eur04on061b.outbound.protection.outlook.com ([2a01:111:f400:fe0d::61b] helo=EUR04-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pSuck-00CzEL-5u for linux-arm-kernel@lists.infradead.org; Fri, 17 Feb 2023 06:53:39 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NTdxHGwV5Xej6VSCQf+q6+4ibNMqSo/QQ4tPQ8DvdtLExKA4KuXgkdbHHtKieIc5AT/cg5oVZl2CuKGboc8cCzSSeIc31ZinAfQ151gM5bRBTiIb99RH9J9us0ohnMkqQpVobGF8oflkwlUwGkB58CckFwvFLJGhvKWwIMdCKumTJuJ4eNVjUJnldP3h9fIqJREJK//ltRnUqWDDrTrTXeao73uyIJY8VZodB/V6gzGgyjhNTipSdioeq939KgUZo6Q3vSePNUVGx5ETtkFb3MOUXMxOVXGqrhasnHkApDOFNtmkj2skF8Xuf5eKtNfbLbO/9ECQIsCviJSgLVD06A== 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=LlUrH3hpx3rLt+nYA/CYaT8zoKu2SwrLq4NRHDueueg=; b=ZLZW4qbGP9PHD5iDvUkoHpJTf2UHG73hDbA4xMVOrtYbbkVs86TVvQqfN0xInqu9ghJJKfRdoxtlCMbhK74FgNBmAKIKv7kN2UpZUOj9SLX6YONXnvZmfVz0WEFrmSrNKErlwKr4YcpP1NNcSqdgxrNPzG2cb95PCb+qCYniaxOSgTNlkCrVPZkzyQngpPCZc9LpWX29PxwW7/BbZ/Q1/Ar3WeiL/1v8jh/ARwNPMXy0TKCEnEgSR40MkDIzAioFWVA1lVa0PBTR1RYa80PRa6eAgHG7a96QUMbkPq2G0gni86Qw9iO6ueiF3tj5jjXuaSWq0+v73uYYi6knrX6lXw== 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=LlUrH3hpx3rLt+nYA/CYaT8zoKu2SwrLq4NRHDueueg=; b=bxWLBjfXAOWHkqnvx1GZpQPu1m3wdDqc0yXuUeBLThIMHTKo4wjcYXnJoEnqHAhflChJYYuaGMYQh5cjzm+xKjNdSDlrHPAPLNn6q3V2UU2KZs490St51iomA/XzJ2ShzSMYnRbMmhxE4gJdLFvz6qeq0MZis+TtdMN1YxI5WZc= 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 AM7PR04MB6840.eurprd04.prod.outlook.com (2603:10a6:20b:10f::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6111.13; Fri, 17 Feb 2023 06:53:35 +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.6111.014; Fri, 17 Feb 2023 06:53:35 +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 v4 6/6] drm: lcdif: Add i.MX93 LCDIF compatible string Date: Fri, 17 Feb 2023 14:54:07 +0800 Message-Id: <20230217065407.2259731-7-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230217065407.2259731-1-victor.liu@nxp.com> References: <20230217065407.2259731-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2PR02CA0033.apcprd02.prod.outlook.com (2603:1096:4:195::20) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|AM7PR04MB6840:EE_ X-MS-Office365-Filtering-Correlation-Id: 7af8050f-fbe6-4c90-4b90-08db10b3b05d X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: oRV7WFTzAoOfma5MzY6UO2i/a3SPJwidpKCGYg/WoqeZkUFx7Bd1CRDE9iq3titjcgovgt+Le8uXd756oKLAR3hmsHUQQBpW9Xw8zPSmWDyTcYPUJZ2v4Aj48Pac7fc0CxQ/ZLP1iiiwpG5B9EMCxhZvf+LauA3eFW5W1QeQ5IgERPsni90PjgLSdyvTJ0y3fbkqW90Oqmyou9yMaJTh9OvTonTpVO4O/RklmK09tNoEUxsw+pRGGhmYPCnIh+tNvANzhXiF+FAFVlYG4MOXQbGYjViTPhubIUUdAM8fosUDfPE7GXulSMcztIAqIpVKtwCmM5zSXqo04aKpYaUumS/QMaiTx27DxKZv3Xhk6a2+JxeJg94L7nsHdeH5JsJU0+7XArcAn3DACz6lvbSd21VkLPuWn5cgG87T/gPd0KQxdVEwEenT3vxWhjkSAtpGsDcIqABK8bslodREQz34dMQI5HVmK4PiN/RN7EXmZWZKKjF4I3onvSU1fAoCFmYtSWzA9s5A3vB/Vdq5vmrEMVW2nNeirkuXuOA2FqMyhvgavTtS+IfYwaBVOQ76VnAW/AtmvFreOD8VptmlUPfW7qqkULQuEr/ioPGglMkrPli5Jh4D/yNcnJ6tHt3tDDnnp+a47VS8Mg379963pG7/WBvSOwN7JGtVc4KkDYUvgUxiafLG4PWC02zR2m6UrAyDdh6oYcVIVkwgLPayB8ecJg== 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)(39860400002)(136003)(366004)(376002)(346002)(396003)(451199018)(36756003)(66946007)(4326008)(8676002)(2906002)(66476007)(66556008)(7416002)(38350700002)(38100700002)(478600001)(1076003)(6486002)(41300700001)(52116002)(316002)(6506007)(6666004)(5660300002)(86362001)(8936002)(83380400001)(26005)(186003)(2616005)(6512007);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: C62RbMy4+fbJ5whwQqtMni3bgGrqJTJYX+1KUlzcNgwAxooOKcfNiL85t2/T/NoghXNCKcHLk3KEibHdpGVJRtWrSfDBYLJrwXvd41qIVGwY6URiKdcBuLmGNINsJT2V36I5vJjY1U4dyjCwLwRByqg1muMmmKJQqZmXXT2rpLQA5GNloMtjAuMKCGJZe14vVgZhqdfFnsg7zCfOjGmc9aw+8NO11km2V1Wha/j0+CpsPiDj+TWXaRDP2rUNrvNhkgAJUpM+/FJLzWzyy1xyvuQlPOTJcg0X0RXwMcjDwMTF1t1mJb/6+BoBN5S5CULPAtRkiLoNQSKHcxyzXQlrGV+ipEfJ2vSkK51YgSLByTdLBjnvNRbAkMsBwTJiLSnZLE+B4qLZuXzMS8NSKH6/yZTs9NRG789k+P9970xzTixB3a4OXFP4lAeghbGsZwpvBUHt5pRteesNL+X6hEZaOBum3BN7xFFwPn5DDiBz/aXZ5Sea28uk7e3wVZ5djlRKXO+XV9Z6gqxcFOmqW4VMsDSSmTvIeehUmr60tz/1/O882zkDoqAcQ1cBOSkhTCLX3oqOyDbV4jpVIoe1i56xUwKT6BKTwGIZhVVc+T4A74VibH3b1QFPrGQbqbqd1i16qDnbKqfCIvUL7b0sB3LMn4N8UXAsQVExYI98sfCbi9Y3qyWcXEgvdwXrvCl5s2Ek6KmWGELP3yYt+z96thdUkJuBmwC2z/j5Dn579hiFRCq9wBdrRL/jDURxgELu6ULMknFInsr/j2aHK76hqPxf7/HSBdb2cIOCEvZvOKjjFuQv4KBU9aZpd8FEYAXE6ihETRMwJr+QanV0aB5HwOcY7nxvMuk0k0dUxOya8xdqAQDw8vUEcxC7qdj61hO5itxaxp7HZ9mHza9ZEyNtnVzPeQ6yl2H7QRBuc/K1bGc5IiIe/lrid+CRiMWoMXPD/HzsPxiRzdpXbBz7nWSL53VckeyyUcZRNkcPMBfNX37gzitxJ5Nj2PZxwhdmSi6c8o3xX2fxjwC3QyTc5IZEg651OZmNabsCgMV35VUxr0IrPZFZ93VnxEqCHziv8QZ5S6YdADrtdxHfESjeH93nSvXU3F2uFEgJtWpyrpQIVgpJjiInvdtPJkCAJQNe2OAgISaUwlNcjqXEg9l6UaqgrPtNlVWtAfghoKL6SSrJORMyQoya757mHgOkxV/tG9+t6/9Fky+sIS94ASCKeyG0sz5hdEQvVLi708dErqtLych5n2JF5ZwRXJXWqn66t58QGJVd86Lp6D/88fMjpBiL3uoSZ8lQgndA1eP8uuOyYbPZvqr4EVzP6xai6SLJsmSNtmM3GMFa7hXcTZakEjpZ95BnCXesZ2CDkffi6n009LdnrnO00OBbtwRCWGPRLZJhKLV5Um7nqnMmG/goTxtVBwvfYK0orNFKawlwB0WEU3GlVDC0Ef2FVs7KF55h+aTXQVv4D0smM0NIokM7CDOODbAaAgqVAva/VVvEMjgUB6c7p/KTaui33WLyDJKHuNC7tuv6HALtTLIpdfHJrkKUXqSTnrVRamMfY8/BD9Gfr6YZKYEEUIgtVty4TEJ7YxSAzRTV X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7af8050f-fbe6-4c90-4b90-08db10b3b05d X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Feb 2023 06:53:35.0727 (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: F0bqszIktnXmPOy0fS1P4UT0vWYqaw4DWlJpSBXmXZFhj+W4YXwW9TN4aamMVHiz3o7mr9CQ/toHdvAaoGKLcw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR04MB6840 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230216_225338_267469_65A14518 X-CRM114-Status: GOOD ( 10.50 ) 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. Reviewed-by: Alexander Stein Signed-off-by: Liu Ying --- v3->v4: * Add Alexander's R-b tag. 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 f1f5caef390a..0eb132cad181 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);