From patchwork Mon Jul 3 07:27:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inki Dae X-Patchwork-Id: 9822063 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 D6335603FB for ; Mon, 3 Jul 2017 07:28:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C339C26E74 for ; Mon, 3 Jul 2017 07:28:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B7B622852D; Mon, 3 Jul 2017 07:28:06 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 506DE26E74 for ; Mon, 3 Jul 2017 07:28:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752291AbdGCH2F (ORCPT ); Mon, 3 Jul 2017 03:28:05 -0400 Received: from mailout4.samsung.com ([203.254.224.34]:37105 "EHLO mailout4.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750948AbdGCH2E (ORCPT ); Mon, 3 Jul 2017 03:28:04 -0400 Received: from epcas1p1.samsung.com (unknown [182.195.41.45]) by mailout4.samsung.com (KnoxPortal) with ESMTP id 20170703072802epoutp0441f61a5154bd170e93ed89c768566098~NwWM7CrJy1096910969epoutp04t; Mon, 3 Jul 2017 07:28:02 +0000 (GMT) Received: from epsmges5p2.samsung.com (unknown [182.195.40.66]) by epcas1p3.samsung.com (KnoxPortal) with ESMTP id 20170703072802epcas1p3d2e844ae3a78d87f7f0ff12616785d6f~NwWMkJNg62497424974epcas1p3j; Mon, 3 Jul 2017 07:28:02 +0000 (GMT) Received: from epcas5p1.samsung.com ( [182.195.41.39]) by epsmges5p2.samsung.com (EPCPMTA) with SMTP id 50.4D.04821.202F9595; Mon, 3 Jul 2017 16:28:02 +0900 (KST) Received: from epsmgms2p2.samsung.com (unknown [182.195.42.80]) by epcas5p2.samsung.com (KnoxPortal) with ESMTP id 20170703072802epcas5p2137cf0009888a6b7b6bc31c416e5c4a2~NwWMEkD-X2801928019epcas5p2U; Mon, 3 Jul 2017 07:28:02 +0000 (GMT) X-AuditID: b6c32a2d-f79866d0000012d5-9b-5959f2024ff7 Received: from epmmp1.local.host ( [203.254.227.16]) by epsmgms2p2.samsung.com (Symantec Messaging Gateway) with SMTP id 62.95.05071.102F9595; Mon, 3 Jul 2017 16:28:01 +0900 (KST) Received: from localhost.localdomain ([10.113.62.206]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OSI00CK67EOIBA0@mmp1.samsung.com>; Mon, 03 Jul 2017 16:28:01 +0900 (KST) From: Inki Dae To: dri-devel@lists.freedesktop.org Cc: linux-samsung-soc@vger.kernel.org, Inki Dae Subject: [PATCH 2/2] drm/exynos: mic: add a bridge at probe Date: Mon, 03 Jul 2017 16:27:59 +0900 Message-id: <1499066879-13241-3-git-send-email-inki.dae@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1499066879-13241-1-git-send-email-inki.dae@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrMKsWRmVeSWpSXmKPExsWy7bCmui7Tp8hIg23n5CyufH3PZjHp/gQW ixnn9zE5MHvc7z7O5NG3ZRWjx+dNcgHMUak2GamJKalFCql5yfkpmXnptkrewfHO8aZmBoa6 hpYW5koKeYm5qbZKLj4Bum6ZOUCLlBTKEnNKgUIBicXFSvp2NkX5pSWpChn5xSW2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UdZIJwfjBIb929iBKliE1CVmLjiPhuILSKgLPF3 4iqwOLOAm8Ti08tZQGxhAWuJ7u2rmEFsFqD6mV8Pgdm8Ai4SX3Y2M0Fsk5M4eWwy2GZOAVeJ F4s/g/UKAdW8f/6JdQIj7wJGhlWMXKkFxbnpucVGBUabGIHBt+2wVsAOxqZz0YcYBTgYlXh4 XxRHRgqxJpYVV+YeYpTgYFYS4Z3xAijEm5JYWZValB9fVJqTWnyI0RTolInMUqLJ+cDIyCuJ NzSxNDIxMDMzNDIwNlMS550Q+CVCSCA9sSQ1OzW1ILUIpo+Jg1OqgXHGjhKl8oznOa+ixVQM HFK0Xr3U+BH5YLOmxYYce/2i2XOyC7ban66Ikt/nejfac8kH7SmR849lFPsGVZ9cW7U+5y83 098Ht7qmPkvcUN78Iy4xZEN4+JkDN0qfuC1TTz9/P6/S1jlY9r923PO0xlC2BfZbF/X+FlpZ N5mraGYLv+zK/TobXJRYijMSDbWYi4oTAT8AcYNUAgAA X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170703072802epcas5p2137cf0009888a6b7b6bc31c416e5c4a2 X-Msg-Generator: CA X-Sender-IP: 182.195.42.80 X-Local-Sender: =?UTF-8?B?64yA7J246riwG1RpemVuIFBsYXRmb3JtIExhYihTL1fshLw=?= =?UTF-8?B?7YSwKRvsgrzshLHsoITsnpAbU2VuaW9yIEVuZ2luZWVy?= X-Global-Sender: =?UTF-8?B?SW5raSBEYWUbVGl6ZW4gUGxhdGZvcm0gTGFiLhtTYW1zdW5n?= =?UTF-8?B?IEVsZWN0cm9uaWNzG1NlbmlvciBFbmdpbmVlcg==?= X-Sender-Code: =?UTF-8?B?QzEwG1RFTEUbQzEwVjgxMTE=?= CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-CMS-RootMailID: 20170703072802epcas5p2137cf0009888a6b7b6bc31c416e5c4a2 X-RootMTR: 20170703072802epcas5p2137cf0009888a6b7b6bc31c416e5c4a2 References: <1499066879-13241-1-git-send-email-inki.dae@samsung.com> Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch moves drm_bridge_add call into probe. This change is required by DSI driver so that the brige can be bound at DSI driver's probe. Suggested-by: Andrzej Hajda Signed-off-by: Inki Dae Reviewed-by: Andrzej Hajda Reviewed-by: Hoegeun Kwon --- drivers/gpu/drm/exynos/exynos_drm_mic.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_mic.c b/drivers/gpu/drm/exynos/exynos_drm_mic.c index e457205..5ea6e3d 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_mic.c +++ b/drivers/gpu/drm/exynos/exynos_drm_mic.c @@ -340,16 +340,10 @@ static int exynos_mic_bind(struct device *dev, struct device *master, void *data) { struct exynos_mic *mic = dev_get_drvdata(dev); - int ret; - mic->bridge.funcs = &mic_bridge_funcs; - mic->bridge.of_node = dev->of_node; mic->bridge.driver_private = mic; - ret = drm_bridge_add(&mic->bridge); - if (ret) - DRM_ERROR("mic: Failed to add MIC to the global bridge list\n"); - return ret; + return 0; } static void exynos_mic_unbind(struct device *dev, struct device *master, @@ -461,6 +455,15 @@ static int exynos_mic_probe(struct platform_device *pdev) platform_set_drvdata(pdev, mic); + mic->bridge.funcs = &mic_bridge_funcs; + mic->bridge.of_node = dev->of_node; + + ret = drm_bridge_add(&mic->bridge); + if (ret) { + DRM_ERROR("mic: Failed to add MIC to the global bridge list\n"); + return ret; + } + pm_runtime_enable(dev); ret = component_add(dev, &exynos_mic_component_ops);