From patchwork Thu Jul 14 10:54:44 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Meng Yi X-Patchwork-Id: 9229831 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1A98760572 for ; Thu, 14 Jul 2016 13:48:58 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0BE3F26861 for ; Thu, 14 Jul 2016 13:48:58 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 007AC2808C; Thu, 14 Jul 2016 13:48:57 +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=-4.2 required=2.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9FC3A26861 for ; Thu, 14 Jul 2016 13:48:57 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EDF4C6E7BD; Thu, 14 Jul 2016 13:48:49 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from NAM03-BY2-obe.outbound.protection.outlook.com (mail-by2nam03on0043.outbound.protection.outlook.com [104.47.42.43]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2FF2B6E392 for ; Thu, 14 Jul 2016 12:38:53 +0000 (UTC) Received: from DM2PR03CA0042.namprd03.prod.outlook.com (10.141.96.41) by CO2PR03MB2405.namprd03.prod.outlook.com (10.166.93.135) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.528.16; Thu, 14 Jul 2016 11:05:48 +0000 Received: from BN1BFFO11FD001.protection.gbl (2a01:111:f400:7c10::1:155) by DM2PR03CA0042.outlook.office365.com (2a01:111:e400:2428::41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.528.16 via Frontend Transport; Thu, 14 Jul 2016 11:05:48 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; nxp.com; dkim=none (message not signed) header.d=none; nxp.com; dmarc=fail action=none header.from=nxp.com; nxp.com; dkim=none (message not signed) header.d=none; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BN1BFFO11FD001.mail.protection.outlook.com (10.58.144.64) with Microsoft SMTP Server (TLS) id 15.1.534.7 via Frontend Transport; Thu, 14 Jul 2016 11:05:47 +0000 Received: from titan.ap.freescale.net ([10.192.208.233]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id u6EB5Z1t026987; Thu, 14 Jul 2016 04:05:40 -0700 From: Meng Yi To: Subject: [PATCH v3 2/2] drm/fsl-dcu: add support for drm bridge Date: Thu, 14 Jul 2016 18:54:44 +0800 Message-ID: <1468493684-19501-2-git-send-email-meng.yi@nxp.com> X-Mailer: git-send-email 2.1.0.27.g96db324 In-Reply-To: <1468493684-19501-1-git-send-email-meng.yi@nxp.com> References: <1468493684-19501-1-git-send-email-meng.yi@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131129679477876131; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(7916002)(2980300002)(1110001)(1109001)(339900001)(199003)(189002)(50986999)(19580395003)(19580405001)(81166006)(104016004)(5003940100001)(586003)(6806005)(77096005)(189998001)(81156014)(87936001)(8676002)(2950100001)(36756003)(110136002)(47776003)(76176999)(92566002)(4326007)(86362001)(8666005)(97736004)(229853001)(7846002)(105606002)(50466002)(68736007)(11100500001)(50226002)(2906002)(8936002)(106466001)(356003)(2351001)(5890100001)(305945005)(33646002)(48376002)(85426001)(7059030); DIR:OUT; SFP:1101; SCL:1; SRVR:CO2PR03MB2405; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD001; 1:qxNA7thiibDsx12jauh73OPQwmlxyjnLxEHFFkInzrTTiDaXvCIUAr3ndieAo5K9NWuyAnFv2dCc6LGIZe7eWdk/ulLkBeVw/J5DDRmb5oHwSkC68zAVlh58Nm+HODEVDW2ydVCCTtLn63vvVGFT8c3D+Z8z5CYSnQlgrzIgfehR3D5Vlj65cotSvQoLJINrAlFvMljj8V2z88TbtsaTxhn6uJIIp1fEw+XAFZzTPiPWmMJWuLupcCQXKqsV1wJPGZt2NvHVcs3CbkKJ3pDFPf8Oaz+w/vZJZXQqoktXyPOvn+3H61RpjlcpfgmB/xD2OEKE085R6nS250wohMaBS7ExR0cbshnGE29FXP7E3bZqypxnsYpZHi2Qea7zTmmWALLQNiULtHdz9vVUDTEaNS8EDUEJONWDvUpJT30OxzMFS7KY2P6kmEloCd+ORM1Vmf6n+fcCBts/8Buhhw1Z8/Zg6OAUby/aEihJkCKhuZGx4EndCZyKycPUYD28V40bZHXxQ0oL55IqR7miKIGydXKq0MX+Q06ESNPgjs1W6FUanZt9+Lu+sskekt8ljuHK/dHNNXpJ79VThLUZMTw+LwR7O2WCDcrC+QUrGAoZN5/oCFRT+cjNyA0+m2I1tfOudema7EnGttZwgbp1FDMxfi4q3eqVFueUskfcHVIxku45A8Cq03Lz7gBHOTzdTc3oTvBVHyVZD6aW7S4d85MGFWhj+gTrEn2lBbGTEONkdVM= MIME-Version: 1.0 X-MS-Office365-Filtering-Correlation-Id: 741754b4-6945-42ce-25a3-08d3abd6cf41 X-Microsoft-Exchange-Diagnostics: 1; CO2PR03MB2405; 2:JXgUjgxMpVt3kdR8ckJaHX2yIUEMLed4oJUyqkLQg5Tgswd1OedSlP5tgdJJtq3vU97PpBP525IF0mbyKIjjKgurtWzuxCBQ1pWLddw8YXDbr/2iHU/K4VKqtsN2fPKkxQGq7HyprLDk4caSRUuBGRLc8uZHzLi3xpZFSwkT2VYMNFwbyUXF8GzSbTsfFkL9; 3:htCYdPIvPGsBbwdT0mallnNNnaZb4xmZ/LR5B2zQaoSsZOU0e0SzvpQ4jNmSF1n9aN8VSoErHwQwGwd4kq8a3vFvdiaeGkNiPlEy9LJO8lASdEpas7tX8dIb0Kxj31TzAfNK12vYOvNeBqOrm4jjrGW3H+FWsSfw/PultX1QnU1EvrgxWaqBoURx7FvZxzAz73fuLIvvvi3qtL9aj384mwEkQY49zWwdAgLE2NgBqpI=; 25:kox/Fqm+XhOobOILit7PBybEJsUBeD3uV2t7Jc5aQmFNjpwNpPPa1NKEzkr5ddZFEH5sMXkQnc2KXfggvBqAfI6fJ6othxTSMkPAvBIY1L3OA4VsxL/lGUA28G2+r8kXfsDmoa4JMZddDUWZ2SJJlIHd/VjG1XqeYu2np2S05MdtRIzVzo48kOB9Ht1HjRTIkKqTqcoJkgX49CFYViFw4JfwKQoMxGDPfMtFXm2LyEKBooR+Q9WImPhsMl0k08BPaxZSQDBtgRE8pbnr0I+LGYfp/X+h72nQmku3XkxstunkXQi2ruZ3ZuzR2rHUcp5TZ9QOFO72/bc4pBpbUyUJjIltp4eED6O9d4MKKNcamhlI7qG0maOXTvG9/qEb8NFsBP+tWjpZ+FfinIOAmMVcIA== X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:CO2PR03MB2405; X-Microsoft-Exchange-Diagnostics: 1; CO2PR03MB2405; 31:87FwrEIf+vH2O9CZCmSjbYCCTUKexvGRGEk8SQCWSo09kYe5ymDoDRJti9qw97KKZTcFQbwfMup9bSeCYyhY1aHZlqHISj9M566t8gXnWVYcKRJip3uYtNT6RH5ZiK+B/bDpWlK/KeMCXqsFlZSdxUqoLlqLJmPyUKlUyumxGkb2XXJeEZUJDCrZv2hqvPwl0OD8VESasozYVQMVeXPBmg==; 4:uz+9hvED3vkM0XVykIc1Ftbp58VBZ7HXKX4rY7exLUQbqNFtV7gJG9vi45hHDp22cdzLv2yckpY8YNoBIntlEoqhv7Arf3s/u0AK3ycgAwPXsHOa/aOjMfw21f4glvBbw1VdA3ENqMy+7z1PJCUB6ji8wnOCP5WABslYww/qvLobD/1OEiY7mvB7kTqAFDO4ngG9A1Fm0vibDqEBaMo1GUwYupfSH+xkA4Rx4vpU5xbDafhadjQIkJ94m+gnmcuTZ26TvJaQRXh+qjtgFM7t3YmbyVyO5z11GGfoj1gg9PYcVtYe74WTN1x1UJu3KWY4bSDOibBlSX3Umu3Dl9sXwpFTI1OpK3JQtfCkhFrRwFYtdb0gRUbVDWDeCHYGyI+/91euckx3pW4XSAibLKTvzkjm6A/gHwvrec/Or2jJXjN62JUPyNFHN09qn3M8jfnGLhXi01K9wVvNs0PGJWo3hPYHDfBze6Q3x5hKz/DhWmnGDTR3x6EZbphudJ6bGv8WZUDGrfGyvlnSOQiaJbcusg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(601004)(2401047)(13023025)(13024025)(13015025)(13018025)(13017025)(5005006)(8121501046)(10201501046)(3002001)(6055026); SRVR:CO2PR03MB2405; BCL:0; PCL:0; RULEID:(400006); SRVR:CO2PR03MB2405; X-Forefront-PRVS: 00032065B2 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CO2PR03MB2405; 23:ZR8gk9IgKS0ruMRy7u6KUklf43Dm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0QGRYt2RAzSuk9MVig6ehBUWhZ3kfzTfMDs28XmXfISLYPSJp+1wEdUEY5kdO8ezk/csqpIWkoFusC2hJ+U+2TUpwDCackz5PHfnQxPllpIgjxC6Thq9g7i3690nfjwWJcpJyDXga1dUMvJGrRGaMmC5PEr1kq29pdWg0x3Gj9eS0UiVjgZ6p0ZOJNz SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Jul 2016 11:05:47.6004 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CO2PR03MB2405 X-Mailman-Approved-At: Thu, 14 Jul 2016 13:48:48 +0000 Cc: Meng Yi , emil.l.velikov@gmail.com, dri-devel@lists.freedesktop.org, alexander.stein@systec-electronic.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP The current output code only supports connection to drm panels. Add code to support drm bridge, to support connections to external connectors. Signed-off-by: Meng Yi --- Changes since V1: -no change --- drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c index 2e71f4b..e875b4e 100644 --- a/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c +++ b/drivers/gpu/drm/fsl-dcu/fsl_dcu_drm_rgb.c @@ -189,6 +189,7 @@ err_cleanup: static int fsl_dcu_attach_endpoint(struct fsl_dcu_drm_device *fsl_dev, const struct of_endpoint *ep) { + struct drm_bridge *bridge; struct device_node *np; int ret; @@ -201,7 +202,17 @@ static int fsl_dcu_attach_endpoint(struct fsl_dcu_drm_device *fsl_dev, return ret; } - return -ENODEV; + bridge = of_drm_find_bridge(np); + of_node_put(np); + if (!bridge) + return -ENODEV; + + fsl_dev->encoder.bridge = bridge; + bridge->encoder = &fsl_dev->encoder; + + ret = drm_bridge_attach(fsl_dev->drm, bridge); + + return ret; } int fsl_dcu_create_outputs(struct fsl_dcu_drm_device *fsl_dev)