From patchwork Thu Jan 5 10:20:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hoegeun Kwon X-Patchwork-Id: 9498813 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 432AD60413 for ; Thu, 5 Jan 2017 10:21:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3160027813 for ; Thu, 5 Jan 2017 10:21:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2440528339; Thu, 5 Jan 2017 10:21:09 +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=BAYES_00, 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 A902527813 for ; Thu, 5 Jan 2017 10:21:08 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 636DE6E866; Thu, 5 Jan 2017 10:20:33 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout2.samsung.com (mailout2.samsung.com [203.254.224.25]) by gabe.freedesktop.org (Postfix) with ESMTPS id 72C396E853 for ; Thu, 5 Jan 2017 10:20:15 +0000 (UTC) Received: from epcas1p2.samsung.com (unknown [182.195.41.46]) by mailout2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0OJA00Y9QY1PF210@mailout2.samsung.com> for dri-devel@lists.freedesktop.org; Thu, 05 Jan 2017 19:20:13 +0900 (KST) Received: from epsmges5p4.samsung.com (unknown [182.195.40.68]) by epcas1p4.samsung.com (KnoxPortal) with ESMTP id 20170105102012epcas1p47bb116b73796c317c6a3c8f93f64fe3c~W2Oa-s_XR1482814828epcas1p4D; Thu, 5 Jan 2017 10:20:12 +0000 (GMT) Received: from epcas5p3.samsung.com ( [182.195.41.41]) by epsmges5p4.samsung.com (EPCPMTA) with SMTP id F2.FA.06849.CDD1E685; Thu, 5 Jan 2017 19:20:12 +0900 (KST) Received: from epcpsbgm2new.samsung.com (u27.gpu120.samsung.co.kr [203.254.230.27]) by epcas5p3.samsung.com (KnoxPortal) with ESMTP id 20170105102012epcas5p3666c67cfc82d2439c993f917f8e2d0ce~W2OatXKJD0343903439epcas5p3V; Thu, 5 Jan 2017 10:20:12 +0000 (GMT) X-AuditID: b6c32a58-f79726d000001ac1-4e-586e1ddcf433 Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2new.samsung.com (EPCPMTA) with SMTP id 65.E0.28332.CDD1E685; Thu, 5 Jan 2017 19:20:12 +0900 (KST) Received: from khg_DeskTop.10.32.193.11 ([10.113.63.38]) by mmp1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OJA0061NY1MWW00@mmp1.samsung.com>; Thu, 05 Jan 2017 19:20:12 +0900 (KST) From: Hoegeun Kwon To: robh@kernel.org, thierry.reding@gmail.com, airlied@linux.ie, kgene@kernel.org, krzk@kernel.org, inki.dae@samsung.com Subject: [PATCH v7 1/4] drm/exynos: mic: Add mode_set callback function Date: Thu, 05 Jan 2017 19:20:06 +0900 Message-id: <1483611609-23522-2-git-send-email-hoegeun.kwon@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1483611609-23522-1-git-send-email-hoegeun.kwon@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrJKsWRm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0HwDAAA= X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprIIsWRmVeSWpSXmKPExsVy+t9jAd07snkRBpdXy1rcWneO1aL33Ekm i+tfnrNazD8C5F75+p7N4v3yLjaLSfcnsFjc+NXGatH/+DWzxfnzG9gtLu+aw2Yx4/w+Jov/ e3awW/zcNY/Fgc9j56y77B6bVnWyeWz/9oDV4373cSaPvi2rGD0+b5ILYItys8lITUxJLVJI zUvOT8nMS7dVCg1x07VQUshLzE21VYrQ9Q0JUlIoS8wpBfKMDNCAg3OAe7CSvl2CW8aHE4UF X/gqJp2YydTAuIKni5GTQ0LARGJmz3VmCFtM4sK99WwgtpDAUkaJb4tduhi5gOxfjBIPVn9m BEmwCehKfO25zgRiiwhUSTw4tJQFxGYW+MwocXm5GYgtLOAusWXLDLBBLAKqEtNPPgPr5RXw kOhYPZ8JYpmcxMljk1m7GDk4OAU8JX4eKQMxhYBKrsy3m8DIu4CRYRWjRGpBckFxUnquUV5q uV5xYm5xaV66XnJ+7iZGcHQ8k97BeHiX+yFGAQ5GJR7ejr85EUKsiWXFlbmHGCU4mJVEeKWk 8yKEeFMSK6tSi/Lji0pzUosPMZoCnTWRWUo0OR8YuXkl8YYm5ibmxgYW5paWJkZK4ryNs5+F CwmkJ5akZqemFqQWwfQxcXBKNTBOOPXu6Ezmvo7NjA2ON7R2TyrcYfdg6cyUS/1il1wXrFvj zVTinb1c53zovoCkLuMFl9scLbdxXwySMWTfNjv1yZTjGy69XRI723mDUticsxc2Gxn3vDgp uT3A7coUe//pdw1WNjF/eTy9j6F+WaDPSbOfst0dHdliF8TbLNTzjk1bpnhXXniNEktxRqKh FnNRcSIAE7syG6QCAAA= X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170105102012epcas5p3666c67cfc82d2439c993f917f8e2d0ce X-Msg-Generator: CA X-Sender-IP: 203.254.230.27 X-Local-Sender: =?UTF-8?B?6raM7ZqM6re8G1RpemVuIFBsYXRmb3JtIExhYihTL1fshLw=?= =?UTF-8?B?7YSwKRvsgrzshLHsoITsnpAbUzMo7IKs7JuQKS/sgqzsm5A=?= X-Global-Sender: =?UTF-8?B?SG9lZ2V1biBLd29uG1RpemVuIFBsYXRmb3JtIExhYi4bU2Ft?= =?UTF-8?B?c3VuZyBFbGVjdHJvbmljcxtTMy9Bc3Npc3RhbnQgRW5naW5lZXI=?= X-Sender-Code: =?UTF-8?B?QzEwG1NUQUYbQzEwVjgxMTE=?= CMS-TYPE: 105P DLP-Filter: Pass X-CFilter-Loop: Reflected X-HopCount: 7 X-CMS-RootMailID: 20170105102012epcas5p3666c67cfc82d2439c993f917f8e2d0ce X-RootMTR: 20170105102012epcas5p3666c67cfc82d2439c993f917f8e2d0ce References: <1483611609-23522-1-git-send-email-hoegeun.kwon@samsung.com> Cc: devicetree@vger.kernel.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, jh80.chung@samsung.com, cw00.choi@samsung.com, Hoegeun Kwon 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: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Before applying the patch, used the of_get_videomode function to parse the display-timings in the panel which is the child driver of dsi in the devicetree. this is wrong. So removed the of_get_videomode and fixed to get videomode struct through mode_set callback function. Signed-off-by: Hoegeun Kwon Reviewed-by: Andrzej Hajda --- drivers/gpu/drm/exynos/exynos_drm_mic.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_mic.c b/drivers/gpu/drm/exynos/exynos_drm_mic.c index a0def0b..fed1a94 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_mic.c +++ b/drivers/gpu/drm/exynos/exynos_drm_mic.c @@ -286,13 +286,6 @@ static int parse_dt(struct exynos_mic *mic) } nodes[j++] = remote_node; - ret = of_get_videomode(remote_node, - &mic->vm, 0); - if (ret) { - DRM_ERROR("mic: failed to get videomode"); - goto exit; - } - break; default: DRM_ERROR("mic: Unknown endpoint from MIC"); @@ -329,6 +322,17 @@ static void mic_post_disable(struct drm_bridge *bridge) mutex_unlock(&mic_mutex); } +static void mic_mode_set(struct drm_bridge *bridge, + struct drm_display_mode *mode, + struct drm_display_mode *adjusted_mode) +{ + struct exynos_mic *mic = bridge->driver_private; + + mutex_lock(&mic_mutex); + drm_display_mode_to_videomode(mode, &mic->vm); + mutex_unlock(&mic_mutex); +} + static void mic_pre_enable(struct drm_bridge *bridge) { struct exynos_mic *mic = bridge->driver_private; @@ -377,6 +381,7 @@ static void mic_enable(struct drm_bridge *bridge) { } static const struct drm_bridge_funcs mic_bridge_funcs = { .disable = mic_disable, .post_disable = mic_post_disable, + .mode_set = mic_mode_set, .pre_enable = mic_pre_enable, .enable = mic_enable, };