From patchwork Fri Aug 10 13:03:56 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Rosin X-Patchwork-Id: 10563425 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 682F714C0 for ; Sat, 11 Aug 2018 12:05:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 478552A522 for ; Sat, 11 Aug 2018 12:05:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3C1332A530; Sat, 11 Aug 2018 12:05:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id EA6C72A522 for ; Sat, 11 Aug 2018 12:05:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3A70A6E1AF; Sat, 11 Aug 2018 12:05:14 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-am5eur02on0705.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe07::705]) by gabe.freedesktop.org (Postfix) with ESMTPS id AAA4E6E038 for ; Fri, 10 Aug 2018 13:04:17 +0000 (UTC) Received: from orc.pedanet (85.226.244.23) by VI1PR0201MB2464.eurprd02.prod.outlook.com (2603:10a6:800:55::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1038.21; Fri, 10 Aug 2018 13:04:13 +0000 From: Peter Rosin To: linux-kernel@vger.kernel.org Subject: [PATCH v8 1/4] dt-bindings: display: bridge: lvds-transmitter: add ti, ds90c185 Date: Fri, 10 Aug 2018 15:03:56 +0200 Message-Id: <20180810130359.9882-2-peda@axentia.se> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180810130359.9882-1-peda@axentia.se> References: <20180810130359.9882-1-peda@axentia.se> MIME-Version: 1.0 X-Originating-IP: [85.226.244.23] X-ClientProxiedBy: VI1PR07CA0241.eurprd07.prod.outlook.com (2603:10a6:802:58::44) To VI1PR0201MB2464.eurprd02.prod.outlook.com (2603:10a6:800:55::7) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: d0a544dd-c6a1-4692-3673-08d5fec1c606 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(7021125)(8989117)(4534165)(7022125)(4603075)(4627221)(201702281549075)(8990107)(7048125)(7024125)(7027125)(7028125)(7023125)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:VI1PR0201MB2464; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0201MB2464; 3:QLeRY3TJHb67qw2M3H4XxE9LMAdKGMOLb7dc60EEV9yNiAHxcEyB0topWsYj+wKFbX13l+RelS2nKQ2Mb+kaVZoN/cJMZYfi8VJfwmdQTT5+fJxnffwZacBFycO5R2cImdbcWwoTGDB6i2NFwcCWcGDvk7AulSgwkWchkSGFrKyvxvPFuH6HqWW5ck1TXbhE1lLbpOcjhqSQ4yoVeoztFtgTR1N6RR/ctzOUIJSPB1m9yAI4jAfAzcxeQ0sm92NG; 25:yRDNDCVmUTEcnh+NS6ZGXpEbNgNTDgEfTwLp0soocSyo2XjpbNcSeIe3ONlkUmqwtivR3e2m5leumgrq5fZ4pjT8b0mazBmSE1G6M6EGHuBb/PHkssKWoqXxS7Z9NqJjpHtqCwzL/WmUp+rI7okNBW9YS86PyWOQlCIk0LGpMlZ88EU07FclNAM6RrhOnvyeZEcpMOvAQNlzBUZ89Kuiz3ZcoU1uv/x2LKscWDng4APxpYh8Qq6eW84fgBh3/pFCrLCsBQ40d3oez+JzVjBrU9g6B805LZF/pfHO5K1nmh2wDU2KV5kWX6QyEVO/zIBvL2nP59Eq6364yee7ugFnoQ==; 31:RVBW0w9vqisHcI+ZpS+VqdArMWq3bgaK9i02DQWP97XbuOZ/yHkXMjV7kmt3dMiZWASX3HVaxXsIfaV9d7DGI1YW9aZzieR/t2xcqfiiiSoW43mOopBw/5xUs4bqzswoV5q8UqA6fSW4GB3hRfGl5pqc9mtyijxDgPaKYKlTgOxThiDQqX4FmjD97gKBM9d/ChCm5pLcvij6zn/ZaefYf1RBkvcGN4mjcWCG8SDCFNk= X-MS-TrafficTypeDiagnostic: VI1PR0201MB2464: X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231311)(944501410)(52105095)(10201501046)(3002001)(149027)(150027)(6041310)(2016111802025)(20161123560045)(20161123558120)(20161123562045)(20161123564045)(6043046)(6072148)(201708071742011)(7699016); SRVR:VI1PR0201MB2464; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0201MB2464; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0201MB2464; 4:tzH29yND2CBViVKKLTCOmo00zGgYR16n+nnHxZo544a89djjTCJDnzRqJeKreFOLTDnKtIVtFcDKw8ZHxd1pJVBxw9VUo4UlKmf69D2kZZKmJnfFKGdhibArYN8KAZo0HoXe/zLIUVShrdUS+yMPn22+XmvPzXbhYSE9K9aAOD1jIXPfC9LVHW2NzLFqMAqHuJ6F8qTVdbvA9QpVHG0GToTdvhvYj72E150th1ntpAfRfb/y9G30jjrR7VV7W0OSaKZjIdHxa9sHJrAbwtxlrA== X-Forefront-PRVS: 07607ED19A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(366004)(39830400003)(136003)(376002)(396003)(346002)(189003)(199004)(66066001)(3846002)(16526019)(50466002)(74482002)(50226002)(36756003)(305945005)(47776003)(8936002)(186003)(4326008)(86362001)(26005)(54906003)(14444005)(48376002)(1076002)(6116002)(68736007)(6486002)(7736002)(76176011)(16586007)(25786009)(7416002)(6666003)(105586002)(81166006)(81156014)(316002)(8676002)(478600001)(6512007)(476003)(53936002)(956004)(2616005)(2361001)(2351001)(6506007)(52116002)(386003)(51416003)(5660300001)(106356001)(6916009)(11346002)(2906002)(486006)(446003)(97736004)(142933001)(42262002); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR0201MB2464; H:orc.pedanet; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: axentia.se does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0201MB2464; 23:UiDrH5UrJX1lWBPB5dzY7drGD7GVfUZ387jI/zg?= /SPnWXGQ0U321TdRzF9OrDtCR4J1DUD0aMmrfw0XfLtw8i9plRYPPGWdP9Y8cQ/KrI//oy9V5jxSRqeE7ajLkcgaGFQjvcI+r/xhIN9lAuwtlC/MVXuxeavf73buLVoRiRZbGjupI4WGQ0WGgswLiXKNsTeNOuGxggy5PG4/+XNqGOt6pkSsSxurY7Xy8rfv3OJvN63wjkvC4XQxgVLs6Pqh7zXcc7jvYX8eZ1V89pQTi3vsiUwfgqGpaNZJqxTvAPWeES8Uvd/VA01xHOslKAB/5f77NOLeYR7rPfGKqRiORGz9ri/OnlJK7L82Mt9OvcPkScbTq5pU8/m9rHyYk8Ptz5Ecor65KmsXJ4w5PZZiovMLQNoiEkAQJg9w7mtnxrTBnvpezq4qTe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AevfXZkbHDnQiKbmGvDWkUOSIqrKqwwsOMZ9HUrQoj/XnQKZiAHmhTDaq7suPlbRbuVOU7kWF74TRgSxdbg2ERJZ18WJv7F//Nc6jL SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: axentia.se X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Aug 2018 13:04:13.9107 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: d0a544dd-c6a1-4692-3673-08d5fec1c606 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4ee68585-03e1-4785-942a-df9c1871a234 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0201MB2464 X-Mailman-Approved-At: Sat, 11 Aug 2018 12:05:13 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Alexandre Belloni , David Airlie , Nicolas Ferre , dri-devel@lists.freedesktop.org, Russell King - ARM Linux , Boris Brezillon , Rob Herring , Jacopo Mondi , Jyri Sarha , Sakari Ailus , Peter Rosin , linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Start list of actual chips compatible with "lvds-encoder". Reviewed-by: Laurent Pinchart Reviewed-by: Rob Herring Signed-off-by: Peter Rosin --- .../devicetree/bindings/display/bridge/lvds-transmitter.txt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/display/bridge/lvds-transmitter.txt b/Documentation/devicetree/bindings/display/bridge/lvds-transmitter.txt index fd39ad34c383..50220190c203 100644 --- a/Documentation/devicetree/bindings/display/bridge/lvds-transmitter.txt +++ b/Documentation/devicetree/bindings/display/bridge/lvds-transmitter.txt @@ -22,7 +22,13 @@ among others. Required properties: -- compatible: Must be "lvds-encoder" +- compatible: Must be one or more of the following + - "ti,ds90c185" for the TI DS90C185 FPD-Link Serializer + - "lvds-encoder" for a generic LVDS encoder device + + When compatible with the generic version, nodes must list the + device-specific version corresponding to the device first + followed by the generic version. Required nodes: From patchwork Fri Aug 10 13:03:57 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Rosin X-Patchwork-Id: 10563423 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id ED36113B4 for ; Sat, 11 Aug 2018 12:05:29 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CB6202A515 for ; Sat, 11 Aug 2018 12:05:29 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BFB6E2A529; Sat, 11 Aug 2018 12:05:29 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id AAA172A515 for ; Sat, 11 Aug 2018 12:05:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 06EF26E1A1; Sat, 11 Aug 2018 12:05:14 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00119.outbound.protection.outlook.com [40.107.0.119]) by gabe.freedesktop.org (Postfix) with ESMTPS id 87C646E042 for ; Fri, 10 Aug 2018 13:04:23 +0000 (UTC) Received: from orc.pedanet (85.226.244.23) by VI1PR0201MB2464.eurprd02.prod.outlook.com (2603:10a6:800:55::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1038.21; Fri, 10 Aug 2018 13:04:19 +0000 From: Peter Rosin To: linux-kernel@vger.kernel.org Subject: [PATCH v8 2/4] dt-bindings: display: atmel: optional video-interface of endpoints Date: Fri, 10 Aug 2018 15:03:57 +0200 Message-Id: <20180810130359.9882-3-peda@axentia.se> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180810130359.9882-1-peda@axentia.se> References: <20180810130359.9882-1-peda@axentia.se> MIME-Version: 1.0 X-Originating-IP: [85.226.244.23] X-ClientProxiedBy: VI1PR07CA0241.eurprd07.prod.outlook.com (2603:10a6:802:58::44) To VI1PR0201MB2464.eurprd02.prod.outlook.com (2603:10a6:800:55::7) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6b7cc891-e4e8-408e-895b-08d5fec1c941 X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(7021125)(8989117)(4534165)(7022125)(4603075)(4627221)(201702281549075)(8990107)(7048125)(7024125)(7027125)(7028125)(7023125)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:VI1PR0201MB2464; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0201MB2464; 3:6m15ST6OpNox+LEb4ILBXc4YE8fb0mL1iCN0vwfPKdrxu64ghJ03YVn/4qJtpAu5HtakDtLDVrF++rWYHZxei+dxLSJaG+W8auVVpm26OZ7zEVLJvsuZrjwgy8HYTWiS1SmZM1PKkGNi6g8uxsYwwVoXVTyNM+KoxaIulR0aahfep49zx6+yiBxP6M8rexdxDbroAEVeaN1ycrEZDJ78pxXfPBF3Z1czad63QmkVQ2mkViiSeBRpvQnxm77i9oAo; 25:6PEnp+jDS+sV3j8dXcq0B53U1EvAaBJRy3QZrYCo+HryK6zKFHS9h6TbOlTSdPNgOWtMPbNwuIP30IwR7vdkV0QcvZPWMFKac8yDAMxt9PbwiYbBGgutldogTtWoD1tSssQLU55hbxigCcoKPISoVJAfbZEt2v5WhUEYY46Tw9NjsnUaDG4jNL17P0fRyAgbw1ArB8MRL6XCiSoTiXTCsvSRE/Pse7qnoW9bZOtqdwTXEJb1IftoHrAT5Rrw6rDbeQmQmU/a1XsERKivLnz2Cci/b7zI0GwzytMxmjcz1VdqedW4UPpnvEnqTIq3Ja8pE5ZdbNnHYx/dNnFCVh+WRg==; 31:2Ank5urEubIVNDaqEig7QtG/CTINRK298PYSTo8mq+uwKPOF6DQSsJMp1mdMaAzg75MDm0O0G32Y0qQm1bhNBahK+vpaVHjVLhYRDdb3qjAo15Wh1vdR/VQMr1CqAdiTM+oZG7PD3LXb8IxFyfv6NqEP45xU/e513D1qBPUZbPV47Mm7zMZ+mUMyhIn4Niuqqe1+QZeSQ/A3X3bdPS+AIxMlJPFbRFhYCPqVW8Vrul0= X-MS-TrafficTypeDiagnostic: VI1PR0201MB2464: X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231311)(944501410)(52105095)(10201501046)(3002001)(149027)(150027)(6041310)(2016111802025)(20161123560045)(20161123558120)(20161123562045)(20161123564045)(6043046)(6072148)(201708071742011)(7699016); SRVR:VI1PR0201MB2464; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0201MB2464; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0201MB2464; 4:WuqNUpfrHMg5UvdV4/p8Gp/+f6TfqzIUBhwNV9UcA53/kFOhOzLolVcudj93F4CtNdUTVg7/HhMpLnDTyPpTqkuZHFtuwOxF7WaA7baGAf4XJLl1CziRleyBlWHZG9ab64HQtfIjuweeXVcF5y1wXSqQqONE8EM4erKyo1VD8E6V52d5T44iNhtKllF4jGpMF3Gy9uajyOXHyFUHw9Qx+r/OMRmnzdJK/ljz+9DTF20CC6CD1lh8tYbtej76gCMYDyR5SJnRgsTMpBNFLL0r0g== X-Forefront-PRVS: 07607ED19A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(366004)(39830400003)(136003)(376002)(396003)(346002)(189003)(199004)(66066001)(3846002)(16526019)(50466002)(74482002)(50226002)(36756003)(305945005)(47776003)(8936002)(186003)(4326008)(86362001)(26005)(54906003)(48376002)(1076002)(6116002)(68736007)(6486002)(7736002)(76176011)(16586007)(25786009)(7416002)(6666003)(105586002)(81166006)(81156014)(316002)(8676002)(478600001)(6512007)(476003)(53936002)(956004)(2616005)(2361001)(2351001)(6506007)(52116002)(386003)(51416003)(5660300001)(106356001)(6916009)(11346002)(2906002)(486006)(446003)(97736004)(42262002); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR0201MB2464; H:orc.pedanet; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: axentia.se does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0201MB2464; 23:dGT7XqxOcuN6YwNIq8n8ivlLfYaMLC6Kw/8KhuT?= d42IC9s+6ZSeL12m9Xw70GQmslAP7GdmdfYWavnazzaS2xIlGdYlt7TWK0ULbCJ9LG0sNJVXJTlg2KmeswCU5E6kwd9UYD+ecCsdjFScZpJMNyee3RXDny1TOVoTmen4XZXXg2v0c/ZExYvp1YhBjjcfFpWUTxPWRJlN/L2tDJY0bB9Pw27CTVs4gYRQ6XXwzXFq698/3C3dVl7Zbf78gkgcDu6ShVgnn4of0s4R/0NOkbtNuobGNl7ZmY9ChDIJq9El1ZOQ7nXAwJJrp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axuzyBHzEq7/yG3y2liy8+zwla6ytIYLeCyMBxBGPJRlxUSiEGPFm4grZHpeY7P11j1Q9wP7iryheTmDqiR/e7H23SR496hw8dIUIcc5JKZUJ8tdoa2qQfJUncfivsfOwa/L6jLijSWoODNeCPeAxeiP0rhmKAOiR74u2hp6Fm5h6oYUtolA SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: axentia.se X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Aug 2018 13:04:19.3326 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 6b7cc891-e4e8-408e-895b-08d5fec1c941 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4ee68585-03e1-4785-942a-df9c1871a234 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0201MB2464 X-Mailman-Approved-At: Sat, 11 Aug 2018 12:05:13 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Alexandre Belloni , David Airlie , Nicolas Ferre , dri-devel@lists.freedesktop.org, Russell King - ARM Linux , Boris Brezillon , Rob Herring , Jacopo Mondi , Jyri Sarha , Sakari Ailus , Peter Rosin , linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP With bus-type/bus-width properties in the endpoint nodes, the video- interface of the connection can be specified for cases where the heuristic fails to select the correct output mode. This can happen e.g. if not all RGB pins are routed on the PCB; the driver has no way of knowing this, and needs to be told explicitly. This is critical for the devices that have the "conflicting output formats" issue (SAM9N12, SAM9X5, SAMA5D3), since the most significant RGB bits move around depending on the selected output mode. For devices that do not have the "conflicting output formats" issue (SAMA5D2, SAMA5D4), this is completely irrelevant. Acked-by: Boris Brezillon Reviewed-by: Rob Herring Reviewed-by: Jacopo Mondi Signed-off-by: Peter Rosin --- .../devicetree/bindings/display/atmel/hlcdc-dc.txt | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/Documentation/devicetree/bindings/display/atmel/hlcdc-dc.txt b/Documentation/devicetree/bindings/display/atmel/hlcdc-dc.txt index 82f2acb3d374..d29e1e425518 100644 --- a/Documentation/devicetree/bindings/display/atmel/hlcdc-dc.txt +++ b/Documentation/devicetree/bindings/display/atmel/hlcdc-dc.txt @@ -15,6 +15,13 @@ Required children nodes: to external devices using the OF graph reprensentation (see ../graph.txt). At least one port node is required. +Optional properties in grandchild nodes: + Any endpoint grandchild node may specify a desired video interface + according to ../../media/video-interfaces.txt, specifically + - bus-width: recognized values are <12>, <16>, <18> and <24>, and + override any output mode selection heuristic, forcing "rgb444", + "rgb565", "rgb666" and "rgb888" respectively. + Example: hlcdc: hlcdc@f0030000 { @@ -50,3 +57,24 @@ Example: #pwm-cells = <3>; }; }; + +Example 2: With a video interface override to force rgb565; as above +but with these changes/additions: + + &hlcdc { + hlcdc-display-controller { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_lcd_base &pinctrl_lcd_rgb565>; + + port@0 { + #address-cells = <1>; + #size-cells = <0>; + reg = <0>; + + hlcdc_panel_output: endpoint@0 { + reg = <0>; + bus-width = <16>; + }; + }; + }; + }; From patchwork Fri Aug 10 13:03:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Rosin X-Patchwork-Id: 10563441 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 00C7B14C0 for ; Sat, 11 Aug 2018 12:06:56 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D1F212A2B8 for ; Sat, 11 Aug 2018 12:06:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C5FE42A529; Sat, 11 Aug 2018 12:06:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 781172A2B8 for ; Sat, 11 Aug 2018 12:06:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CC9226E1FB; Sat, 11 Aug 2018 12:05:17 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-am5eur02on0703.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe07::703]) by gabe.freedesktop.org (Postfix) with ESMTPS id C129C6E027 for ; Fri, 10 Aug 2018 13:04:26 +0000 (UTC) Received: from orc.pedanet (85.226.244.23) by VI1PR0201MB2464.eurprd02.prod.outlook.com (2603:10a6:800:55::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1038.21; Fri, 10 Aug 2018 13:04:22 +0000 From: Peter Rosin To: linux-kernel@vger.kernel.org Subject: [PATCH v8 3/4] drm/atmel-hlcdc: iterate over all output endpoints Date: Fri, 10 Aug 2018 15:03:58 +0200 Message-Id: <20180810130359.9882-4-peda@axentia.se> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180810130359.9882-1-peda@axentia.se> References: <20180810130359.9882-1-peda@axentia.se> MIME-Version: 1.0 X-Originating-IP: [85.226.244.23] X-ClientProxiedBy: VI1PR07CA0241.eurprd07.prod.outlook.com (2603:10a6:802:58::44) To VI1PR0201MB2464.eurprd02.prod.outlook.com (2603:10a6:800:55::7) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: de74f84d-9f9d-4a15-7179-08d5fec1cb6f X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(7021125)(8989117)(4534165)(7022125)(4603075)(4627221)(201702281549075)(8990107)(7048125)(7024125)(7027125)(7028125)(7023125)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:VI1PR0201MB2464; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0201MB2464; 3:zL38bX7JZ7ry+w/lc//Uhk4xFrLkCs1Ky0+fVxJbiUv/ULuQ3JIRMxmRDNmVLIlPCqKafxQc6pCoqPzx+tjGhglSEcTXhmReqMYuPTx6yEEHRjgQyLsfnT8laENq81nj1Ygxql/3yjFUZ3z/G56NXTAfDZ0w0GG4nJ3BeJL4rGFIoUzBtYY3aPpfHDahUec73BhO4VmMlWyCLqLZOtsP0zy4CUAVI1nUmPr3/S7U3BE3seMQb6AhxLW7l0FAgrjS; 25:6wzAaZ/QiawFHNFfHvlNy/1kOE2JVjRuyPw0bvshP7flQ5fJ1pe8n4fKbOWHx9oinUTl6OY9ICbXM4KmMo13apjIva9J9HPQrsSlL9wAMGCFxHChZYabODsOUlTCemyKVGrLSlI5Shbo8DZ9yod/uA0HvIRaQIo2ku35u98y2jqpQTEKDchaagud45hbUZhJZ6uRhQkxF2igv7inoNoSSpH/mGfOMB0hsPYdkpUgEtiIpaqFtg9eYOUUVNW4ae/8O8PeXFhsY+QXII6zJkeNjNHyC8carfuR1oDrbF3Qzy9ESyKvfzzBO3MQAGQZ/E3DJ0qVmrcG1zNGruqQQGrhng==; 31:UEeHySlpq7omBwTXm7KIkZexz3hSlO2ja7RLLI7RgRbWKjkRjUIfYOfRzsQ9QjnQFHwEqLv+1aPYN3cA/4Q4IIs+AWqtwunEXtKv67F9sQiPRhqvsM7JQafDUhsr730QG3QKtYfhz/H6yHtJnp2uQ7dXQN1kpF033zsh/uwLlQu2jHbcib1Uc8gDI833P1h2Ij8ZECsMVALGW75/lzZvSA/Peuz3BI6W9yh5shGezPw= X-MS-TrafficTypeDiagnostic: VI1PR0201MB2464: X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231311)(944501410)(52105095)(10201501046)(3002001)(149027)(150027)(6041310)(2016111802025)(20161123560045)(20161123558120)(20161123562045)(20161123564045)(6043046)(6072148)(201708071742011)(7699016); SRVR:VI1PR0201MB2464; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0201MB2464; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0201MB2464; 4:OC4oGhMiVWszDKHnX9e16UAycCIc+1nIMyLvbcWjwY2cVZO72o59PwuynDo6Wgk87pr4IVDcjlLwnFngokIB2k4k9VHIglY1ilJWg5ePnEPa6B2ZFDvKtZmF+R3JhI2fPdj4e8pr0ssRy5BGpYqHdBxKjORh1ks2GUCcMkXg89Bv4fI8n0JbYZT125hED7zmsyc45U6C/iwbmUY+60hcuIikYuqg78sXWoaUDOBd1BkfaD7Rtnd1Ss5LLv10oboLepr8DDq6gE1TcscvaFm8CQ== X-Forefront-PRVS: 07607ED19A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(366004)(39830400003)(136003)(376002)(396003)(346002)(189003)(199004)(5024004)(66066001)(3846002)(16526019)(50466002)(74482002)(50226002)(36756003)(305945005)(47776003)(8936002)(186003)(4326008)(86362001)(26005)(54906003)(48376002)(1076002)(6116002)(68736007)(6486002)(7736002)(76176011)(16586007)(25786009)(7416002)(6666003)(105586002)(81166006)(81156014)(316002)(8676002)(478600001)(6512007)(476003)(53936002)(956004)(2616005)(2361001)(2351001)(6506007)(52116002)(386003)(51416003)(5660300001)(106356001)(6916009)(11346002)(2906002)(486006)(446003)(97736004)(42262002); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR0201MB2464; H:orc.pedanet; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: axentia.se does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0201MB2464; 23:mPHQRIAVEX++CmlYWXDKqxFG74osAdDDOsRjEdk?= 9HkcS9IyewvXACGGg81obQfY0DhYsuY+Ox3EfSIIo1fSLN0bHVxiw82Zf0dqu1YqGNwjwESPcs+8d5uqWREsemQFCiiCLojuG4Byvb/z9F4MGvoRGXK0oI9+HtWersxogeq7aIxPnbSQOvDai3QejIHXew/ius++3c5gxckTqMRJHiLew3yv7yiK0S0gIUI6b3eYls28O+OXDhmqwRPhaOuyxIyrhDj381egLtZEIPSQ2dfNHg/IEw/esCDjQz7btt5HV+CgH7iXCWf9FmAU5ZWqzCn32D5C6nWIn4ts2MPXNYmwZjFTN5hCm2cf65RaLZ+KV9ftGL/MeOEJceDxiku3OXdRNkpALijdTwXxBEq+3mhAt1vcLgN9uCDsPy/4wkNZuQCLwDPHrEaBvxZQlLaKsCuc9faY06OtGYm1+8yCnYIhD69XDfhFYgGKCtFqButET+7Pupm0COxmklXDd4kDtn5kEPXe+ecbs4LiCmlLyoDKYJj33t7L1zOyKg83nUB0uCprPBBNAAR6jOnG57NEEI+qRogwGvUXirAWyw6Gz/pKoO5TdR8V18pPL7Muvp882vshviPMOG9hCzp3+CKVuwQ0u3jRMQcxYri/bOZ/AHn5M5ERN4W1gQ/S0vhw4HDCcsMjGTwm95ZQhv+MZ3/+cZIuXr9xuNvEXg5T+9E2akhXGxPElozOOvpfyg6TD/0HTm2v8HsvJQQ+7rjnStBaAtmpo1Yu6/IKiJFZaKy3ttof/7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w4aCcvymhMDHupNT3MJnh9DC41jcldQ5GoIX4uVykDOWYyWBvKrwwItgWL/JIIVbfjhU17grUaN6LCiLik5rcCWgBdMRPyFgyGeTMsiGiEWYHByu8HttsfVhGaaAp61mFq9hKs3YDX/rHHieqDsWRTcVf1HSEG/brl6OHWeFY2gMgLu/GMnm9CS8BfYAoUmbd+DhaxMR49Hzn1o9Brq6OeTfxbP1926/WUhA5ep136AzhrglH1ERisKziILAsztbKrhveKLcQqry7HcK5hv2/v9LNHNS7/pP4bn59nreCL8AJlaDu1ifqv4asbXamcdQTL4gk9soVQLBzfh8INDO7SQb+4Hr3ObZg==; 5:v8jHIecMklhbIcSHNP5YpA+oe0QyMunEtClrIa+qDqk+FnIEkdtB8YUcHwc8ipL8RwYQEkvLoF7O1lUrgvg5l6JnNxEZIq7tjWahao7LUYOyqsC4N5YHQhUrL2U+XA6E5m5QxMQSpvslE3zNNMJMuJR/al0uR8K1xMsMIwcJnvc=; 7:rrnF0swFmg8192CEOALScXq89e2qBSLx/CMp0Ub/8v2pUMK/q1CurWffbBVeID9dAYE/6/sUfWpWOknpiIELWAv0wtwiBANzWHq0PTQTd0mP1ojWy+A8qgrDS2KN41aElYheG2FIKi/JvBhROoI0+2liWNjWweJR01akrfK6hnZdHv2amHd8x8si0wCvdrnFwvnoDoTHjJeLXkjdgbDPUESow9bjjaoFvQrIMPNpF1uH+JLtro4yOY64PsxX75OE SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: axentia.se X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Aug 2018 13:04:22.9889 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: de74f84d-9f9d-4a15-7179-08d5fec1cb6f X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4ee68585-03e1-4785-942a-df9c1871a234 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0201MB2464 X-Mailman-Approved-At: Sat, 11 Aug 2018 12:05:13 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Alexandre Belloni , David Airlie , Nicolas Ferre , dri-devel@lists.freedesktop.org, Russell King - ARM Linux , Boris Brezillon , Rob Herring , Jacopo Mondi , Jyri Sarha , Sakari Ailus , Peter Rosin , linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP This enables more flexible devicetrees. You can e.g. have two output nodes where one is not enabled, without the ordering affecting things. Prior to this patch the active node had to have endpoint id zero. Signed-off-by: Peter Rosin Reviewed-by: Jacopo Mondi --- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c | 32 ++++++++++++++++++------ 1 file changed, 25 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c index 8db51fb131db..16c1b2f54b42 100644 --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c @@ -31,14 +31,16 @@ static const struct drm_encoder_funcs atmel_hlcdc_panel_encoder_funcs = { .destroy = drm_encoder_cleanup, }; -static int atmel_hlcdc_attach_endpoint(struct drm_device *dev, int endpoint) +static int atmel_hlcdc_attach_endpoint(struct drm_device *dev, + struct of_endpoint *endpoint) { struct drm_encoder *encoder; struct drm_panel *panel; struct drm_bridge *bridge; int ret; - ret = drm_of_find_panel_or_bridge(dev->dev->of_node, 0, endpoint, + ret = drm_of_find_panel_or_bridge(dev->dev->of_node, + endpoint->port, endpoint->id, &panel, &bridge); if (ret) return ret; @@ -77,13 +79,29 @@ static int atmel_hlcdc_attach_endpoint(struct drm_device *dev, int endpoint) int atmel_hlcdc_create_outputs(struct drm_device *dev) { - int endpoint, ret = 0; - - for (endpoint = 0; !ret; endpoint++) - ret = atmel_hlcdc_attach_endpoint(dev, endpoint); + struct of_endpoint endpoint; + struct device_node *node = NULL; + int count = 0; + int ret = 0; + + for_each_endpoint_of_node(dev->dev->of_node, node) { + of_graph_parse_endpoint(node, &endpoint); + + if (endpoint.port) + continue; + + ret = atmel_hlcdc_attach_endpoint(dev, &endpoint); + if (ret == -ENODEV) + continue; + if (ret) { + of_node_put(node); + break; + } + count++; + } /* At least one device was successfully attached.*/ - if (ret == -ENODEV && endpoint) + if (ret == -ENODEV && count) return 0; return ret; From patchwork Fri Aug 10 13:03:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Rosin X-Patchwork-Id: 10563461 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id E16C513B4 for ; Sat, 11 Aug 2018 12:08:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BBB852A157 for ; Sat, 11 Aug 2018 12:08:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AFD922A6F5; Sat, 11 Aug 2018 12:08:36 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2A0CB2A157 for ; Sat, 11 Aug 2018 12:08:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 3F5B56E1CF; Sat, 11 Aug 2018 12:06:13 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from EUR02-AM5-obe.outbound.protection.outlook.com (mail-eopbgr00100.outbound.protection.outlook.com [40.107.0.100]) by gabe.freedesktop.org (Postfix) with ESMTPS id C845F6E038 for ; Fri, 10 Aug 2018 13:04:31 +0000 (UTC) Received: from orc.pedanet (85.226.244.23) by VI1PR0201MB2464.eurprd02.prod.outlook.com (2603:10a6:800:55::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1038.21; Fri, 10 Aug 2018 13:04:27 +0000 From: Peter Rosin To: linux-kernel@vger.kernel.org Subject: [PATCH v8 4/4] drm/atmel-hlcdc: support bus-width (12/16/18/24) in endpoint nodes Date: Fri, 10 Aug 2018 15:03:59 +0200 Message-Id: <20180810130359.9882-5-peda@axentia.se> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20180810130359.9882-1-peda@axentia.se> References: <20180810130359.9882-1-peda@axentia.se> MIME-Version: 1.0 X-Originating-IP: [85.226.244.23] X-ClientProxiedBy: VI1PR07CA0241.eurprd07.prod.outlook.com (2603:10a6:802:58::44) To VI1PR0201MB2464.eurprd02.prod.outlook.com (2603:10a6:800:55::7) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 082acfa9-0f5e-4d3a-b812-08d5fec1cdfc X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(7021125)(8989117)(4534165)(7022125)(4603075)(4627221)(201702281549075)(8990107)(7048125)(7024125)(7027125)(7028125)(7023125)(5600074)(711020)(2017052603328)(7153060)(7193020); SRVR:VI1PR0201MB2464; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0201MB2464; 3:YFZEkYCkG+FCLUzDzi7RtpQeqryiXtX4FPaOSyVDVhvQaSzAVpsDM8L1XfkFj/paKoeN7XYs0QtT/9DmsbLVjYuepZLKNLLdoO0HoqPY75AJWwh1hhxWAQmvjMmb1YhFHbxXVIeTrli2hgc+kUaUOqmRQMzPp0X1jz0eYWQDzoU8y2/QRUm97h5y38MBqZi8u44aBFDc+wDfnTFXDE8VJnkMBTqD0KkaUvlf+fzyXFGVoQkRRNzRNZXGg1F3fwQJ; 25:BqYHGuTo18WZ63pB58hqIS3V0mixqufMumRXA2oZO3PFSB7iTnw/49hr/0MoEdTO8pIDzCs22/ZE8Jt88vw3SiPxr0zcuDTzdyX7XtzHQPwT39KAeWwduL9C66B8S+q3qZCDq49Jq9zIYPVGuynx3orJxFeh5OXElMVVERe+Y/glNUU+UF4dhgQfe0g7WlTpgXbCVN5bY0IHuIcb5j73iRhsT74hPmjie3+rUb7fC/lvaQil/BOPU6u37v4UlouydaEMi2iCSbh2mH6dQplZ7prZCNy/vS1phF7DKJo/D1RxI1xRN6yrAJxqyGEfd6/jdUVtZKGrR/LpC/zoC29Zhg==; 31:AzTRyfQVLAUPf+h9JWKTzTz2Zq+p89G1EUIqX/+t69ePMN9JZsm2dLNA69i4bl4W7Z2+0MebVAZfNCtGcTlMG0F5FbeL43ozaTeX5T8JhqUeVm1ca6VBroFSMrHvtEQ/SHvtpq5sa5HRoBfHond8VA3x1Vsqx9IT9w6NKLq5lFpIDjSfzEaS8Ro3reX6N5JlchoswGMQv0K+SAhNX2IgWQbSHIyAphnR3nDOpvWLgsk= X-MS-TrafficTypeDiagnostic: VI1PR0201MB2464: X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231311)(944501410)(52105095)(10201501046)(3002001)(149027)(150027)(6041310)(2016111802025)(20161123560045)(20161123558120)(20161123562045)(20161123564045)(6043046)(6072148)(201708071742011)(7699016); SRVR:VI1PR0201MB2464; BCL:0; PCL:0; RULEID:; SRVR:VI1PR0201MB2464; X-Microsoft-Exchange-Diagnostics: 1; VI1PR0201MB2464; 4:mcLBPw/e/QWDnEt6vx8hvG9XziAvg0p/nclGM0sig+iqu3HQYni/h3J5YAu9ee6TA+/yiJoMZp93jB2y9YTVe2ZIKgu8Tjy4IiUYB2ovM5Mlht+DW4zLWemcVYqqgk85d2e//o/iuJcngMYlCZmBxWcmrllgR6Caz6FyBY6XUwJoAf0u0XJjrVwwqbTQ6u8h+k4PnidgmaYBxVS693WowUORtH6f0oKnskF1iA3hONbqY2woPampcoOLQ4aG9BLvXuCqh63neL8MpNtWJBUxZw== X-Forefront-PRVS: 07607ED19A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10019020)(366004)(39830400003)(136003)(376002)(396003)(346002)(189003)(199004)(5024004)(66066001)(3846002)(16526019)(50466002)(74482002)(50226002)(36756003)(305945005)(47776003)(8936002)(186003)(575784001)(4326008)(86362001)(26005)(54906003)(48376002)(1076002)(6116002)(68736007)(6486002)(7736002)(76176011)(16586007)(25786009)(7416002)(6666003)(105586002)(81166006)(81156014)(316002)(8676002)(478600001)(6512007)(476003)(53936002)(956004)(2616005)(2361001)(2351001)(6506007)(52116002)(386003)(51416003)(5660300001)(106356001)(6916009)(11346002)(2906002)(486006)(446003)(97736004)(42262002); DIR:OUT; SFP:1102; SCL:1; SRVR:VI1PR0201MB2464; H:orc.pedanet; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: axentia.se does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; VI1PR0201MB2464; 23:lEzPdYTYI40qT+d4zpb/uxDVDbf8W6Ai6AbxAKY?= 9BOYbiZXQGccAgIXlkoa9mgbFbq8+haiXbr8DVQYB0PmmGY8LfKrUa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A5/U3pEgibYHm2qKpuvlle2pEdYwEdgf81plICFV9BOt7xokcHH3Wk9Gm/wtzPtBDhYWe8672pFxVBvyVjXf+xpitl1zCKQdH1LtKyFrVxcDQ1p4pHjQeoELT1PV9teaSknORk7nyC0i7okqte8nLCgbuPUYaEJYudjvgb1iTMdAHAw== X-Microsoft-Antispam-Message-Info: 5f0kOvlV0eK8HYsAIMnaX1eE96QC7gieCXeDoP4dY5ssemrtQrH7hksfKZjMFAPgnwYdvuMuC49mLREM0PbSUUrLmVBBtC82t7/WcC00jaMEIo/z8zbAHNA+1Zh709k1EiXAT+f+jZZ1874rqmawqpSA1oWxInYmSLdnzuU1cYACWf7uzqC/itgZ3EDrXyKNSASa74IN3DJfIJRcCICc+bblMsE1wYneIssHO04bEt30HPhAZZwT5PFK3rJYv3GmJ7SqtXC7L4sWkIRouLay5bffZ+z59AYgbEg0dKI9xupY/ySM66fVtiJ6uxypD4pSVdz2a6XfzlA9yB0KPh/WA2pmU2dCMMWpib8X4EKC5vw= X-Microsoft-Exchange-Diagnostics: 1; VI1PR0201MB2464; 6:XoIqEEQ7ZOdjj4ifYKKCoF0X7EGjAyZ88MM1Bxd6xhjWd6wNYUIQlfHWcLg9R6+Y59VWUpTtOclT4XDBpZ7/OZilWYd5fNKdYIJHGnj4PfClD6iREOijyaGI5higMRyaw+LYMJlr/P+1rh/Fg020LnDTPf4DbKurvQjQJiBrKfRc+CFdLBh2Lii5J72N4gNTXfEhOB5aImouBJfMAfEA4iqpDm0RFug562Ii1+ObURGb6HAu5NE2Q43CHVSWGSlPgimmXLZkufNMxX7fC/3ffzgC1dw82fIchsVhrrv64w2i9x0A8bj5pgeJCi591fz8Xx4LnYOwO0M4ukeVV12JonW0NfLSQ8lvM1hRbJas3z31NERLhq2Po0iAkOrRhQpCje144GNpDm9Cie+2ITJdnEh+Sd4VP720DzLt4mGaITYhLhdOwMBYd/8S1alNe3TG4rPPkpFvN7OvhgU6Au/Cbw==; 5:8OFoQD5bb35SKpBhool0vXVazPT7DNanwmumiRWxFuaUzaehKleUS/22Hkp54ox2kjeDjBebBVvuseYKLwXKKNwRbjvlv9Cg7LUwMGlMQvaHxsa7aFQvEAO8j1Klk1Goan4gSEvb8ge4n0T3amKemEdzrrTpjTIb2ee2GZoi3hc=; 7:WCFQcCaDwRrG7Ev0BpuZaCndE42Tg8c90zC6yISf7vG8mKLIhR8lOWCzGpOPLyj8OeH2YynCIl4d6AxQF4RME8sSzLXtRWYBzMDDckE8S1F9UmIoIA17EgOB/AGU1uAMxj32tCKgE1wn0307PpgXId9mgF81TfbHU7Rr2QV/k8KZyD0wFmQNsYECVvpnKEVVD1Q9z0yKJJwZovDTmIYDqNfVd8+yaoIZvVrBMZpb43BO+W2UgCzjISt/KB/NPPob SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: axentia.se X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Aug 2018 13:04:27.2234 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 082acfa9-0f5e-4d3a-b812-08d5fec1cdfc X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4ee68585-03e1-4785-942a-df9c1871a234 X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0201MB2464 X-Mailman-Approved-At: Sat, 11 Aug 2018 12:05:13 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Alexandre Belloni , David Airlie , Nicolas Ferre , dri-devel@lists.freedesktop.org, Russell King - ARM Linux , Boris Brezillon , Rob Herring , Jacopo Mondi , Jyri Sarha , Sakari Ailus , Peter Rosin , linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP This beats the heuristic that the connector is involved in what format should be output for cases where this fails. E.g. if there is a bridge that changes format between the encoder and the connector, or if some of the RGB pins between the lcd controller and the encoder are not routed on the PCB. This is critical for the devices that have the "conflicting output formats" issue (SAM9N12, SAM9X5, SAMA5D3), since the most significant RGB bits move around depending on the selected output mode. For devices that do not have the "conflicting output formats" issue (SAMA5D2, SAMA5D4), this is completely irrelevant. Acked-by: Boris Brezillon Reviewed-by: Jacopo Mondi Signed-off-by: Peter Rosin --- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c | 70 +++++++++++++++++------- drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h | 1 + drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c | 66 +++++++++++++++++++--- 3 files changed, 110 insertions(+), 27 deletions(-) diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c index d73281095fac..c38a479ada98 100644 --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_crtc.c @@ -226,6 +226,55 @@ static void atmel_hlcdc_crtc_atomic_enable(struct drm_crtc *c, #define ATMEL_HLCDC_RGB888_OUTPUT BIT(3) #define ATMEL_HLCDC_OUTPUT_MODE_MASK GENMASK(3, 0) +static int atmel_hlcdc_connector_output_mode(struct drm_connector_state *state) +{ + struct drm_connector *connector = state->connector; + struct drm_display_info *info = &connector->display_info; + struct drm_encoder *encoder; + unsigned int supported_fmts = 0; + int j; + + encoder = state->best_encoder; + if (!encoder) + encoder = connector->encoder; + + switch (atmel_hlcdc_encoder_get_bus_fmt(encoder)) { + case 0: + break; + case MEDIA_BUS_FMT_RGB444_1X12: + return ATMEL_HLCDC_RGB444_OUTPUT; + case MEDIA_BUS_FMT_RGB565_1X16: + return ATMEL_HLCDC_RGB565_OUTPUT; + case MEDIA_BUS_FMT_RGB666_1X18: + return ATMEL_HLCDC_RGB666_OUTPUT; + case MEDIA_BUS_FMT_RGB888_1X24: + return ATMEL_HLCDC_RGB888_OUTPUT; + default: + return -EINVAL; + } + + for (j = 0; j < info->num_bus_formats; j++) { + switch (info->bus_formats[j]) { + case MEDIA_BUS_FMT_RGB444_1X12: + supported_fmts |= ATMEL_HLCDC_RGB444_OUTPUT; + break; + case MEDIA_BUS_FMT_RGB565_1X16: + supported_fmts |= ATMEL_HLCDC_RGB565_OUTPUT; + break; + case MEDIA_BUS_FMT_RGB666_1X18: + supported_fmts |= ATMEL_HLCDC_RGB666_OUTPUT; + break; + case MEDIA_BUS_FMT_RGB888_1X24: + supported_fmts |= ATMEL_HLCDC_RGB888_OUTPUT; + break; + default: + break; + } + } + + return supported_fmts; +} + static int atmel_hlcdc_crtc_select_output_mode(struct drm_crtc_state *state) { unsigned int output_fmts = ATMEL_HLCDC_OUTPUT_MODE_MASK; @@ -238,31 +287,12 @@ static int atmel_hlcdc_crtc_select_output_mode(struct drm_crtc_state *state) crtc = drm_crtc_to_atmel_hlcdc_crtc(state->crtc); for_each_new_connector_in_state(state->state, connector, cstate, i) { - struct drm_display_info *info = &connector->display_info; unsigned int supported_fmts = 0; - int j; if (!cstate->crtc) continue; - for (j = 0; j < info->num_bus_formats; j++) { - switch (info->bus_formats[j]) { - case MEDIA_BUS_FMT_RGB444_1X12: - supported_fmts |= ATMEL_HLCDC_RGB444_OUTPUT; - break; - case MEDIA_BUS_FMT_RGB565_1X16: - supported_fmts |= ATMEL_HLCDC_RGB565_OUTPUT; - break; - case MEDIA_BUS_FMT_RGB666_1X18: - supported_fmts |= ATMEL_HLCDC_RGB666_OUTPUT; - break; - case MEDIA_BUS_FMT_RGB888_1X24: - supported_fmts |= ATMEL_HLCDC_RGB888_OUTPUT; - break; - default: - break; - } - } + supported_fmts = atmel_hlcdc_connector_output_mode(cstate); if (crtc->dc->desc->conflicting_output_formats) output_fmts &= supported_fmts; diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h index 60c937f42114..4cc1e03f0aee 100644 --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_dc.h @@ -441,5 +441,6 @@ void atmel_hlcdc_crtc_irq(struct drm_crtc *c); int atmel_hlcdc_crtc_create(struct drm_device *dev); int atmel_hlcdc_create_outputs(struct drm_device *dev); +int atmel_hlcdc_encoder_get_bus_fmt(struct drm_encoder *encoder); #endif /* DRM_ATMEL_HLCDC_H */ diff --git a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c index 16c1b2f54b42..10ed7c221a3c 100644 --- a/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c +++ b/drivers/gpu/drm/atmel-hlcdc/atmel_hlcdc_output.c @@ -27,14 +27,59 @@ #include "atmel_hlcdc_dc.h" +struct atmel_hlcdc_rgb_output { + struct drm_encoder encoder; + int bus_fmt; +}; + static const struct drm_encoder_funcs atmel_hlcdc_panel_encoder_funcs = { .destroy = drm_encoder_cleanup, }; +static struct atmel_hlcdc_rgb_output * +atmel_hlcdc_encoder_to_rgb_output(struct drm_encoder *encoder) +{ + return container_of(encoder, struct atmel_hlcdc_rgb_output, encoder); +} + +int atmel_hlcdc_encoder_get_bus_fmt(struct drm_encoder *encoder) +{ + struct atmel_hlcdc_rgb_output *output; + + output = atmel_hlcdc_encoder_to_rgb_output(encoder); + + return output->bus_fmt; +} + +static int atmel_hlcdc_of_bus_fmt(const struct device_node *ep) +{ + u32 bus_width; + int ret; + + ret = of_property_read_u32(ep, "bus-width", &bus_width); + if (ret == -EINVAL) + return 0; + if (ret) + return ret; + + switch (bus_width) { + case 12: + return MEDIA_BUS_FMT_RGB444_1X12; + case 16: + return MEDIA_BUS_FMT_RGB565_1X16; + case 18: + return MEDIA_BUS_FMT_RGB666_1X18; + case 24: + return MEDIA_BUS_FMT_RGB888_1X24; + default: + return -EINVAL; + } +} + static int atmel_hlcdc_attach_endpoint(struct drm_device *dev, struct of_endpoint *endpoint) { - struct drm_encoder *encoder; + struct atmel_hlcdc_rgb_output *output; struct drm_panel *panel; struct drm_bridge *bridge; int ret; @@ -45,17 +90,24 @@ static int atmel_hlcdc_attach_endpoint(struct drm_device *dev, if (ret) return ret; - encoder = devm_kzalloc(dev->dev, sizeof(*encoder), GFP_KERNEL); - if (!encoder) + output = devm_kzalloc(dev->dev, sizeof(*output), GFP_KERNEL); + if (!output) + return -ENOMEM; + + output->bus_fmt = atmel_hlcdc_of_bus_fmt(endpoint->local_node); + if (output->bus_fmt < 0) { + dev_err(dev->dev, "endpoint %d: invalid bus width\n", + endpoint->id); return -EINVAL; + } - ret = drm_encoder_init(dev, encoder, + ret = drm_encoder_init(dev, &output->encoder, &atmel_hlcdc_panel_encoder_funcs, DRM_MODE_ENCODER_NONE, NULL); if (ret) return ret; - encoder->possible_crtcs = 0x1; + output->encoder.possible_crtcs = 0x1; if (panel) { bridge = drm_panel_bridge_add(panel, DRM_MODE_CONNECTOR_Unknown); @@ -64,7 +116,7 @@ static int atmel_hlcdc_attach_endpoint(struct drm_device *dev, } if (bridge) { - ret = drm_bridge_attach(encoder, bridge, NULL); + ret = drm_bridge_attach(&output->encoder, bridge, NULL); if (!ret) return 0; @@ -72,7 +124,7 @@ static int atmel_hlcdc_attach_endpoint(struct drm_device *dev, drm_panel_bridge_remove(bridge); } - drm_encoder_cleanup(encoder); + drm_encoder_cleanup(&output->encoder); return ret; }