From patchwork Wed Apr 5 06:59:48 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrzej Hajda X-Patchwork-Id: 9663091 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 38A4A60352 for ; Wed, 5 Apr 2017 07:00:00 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2025A27CEA for ; Wed, 5 Apr 2017 07:00:00 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 14AA32850D; Wed, 5 Apr 2017 07:00:00 +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 EF48328509 for ; Wed, 5 Apr 2017 06:59:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751220AbdDEG76 (ORCPT ); Wed, 5 Apr 2017 02:59:58 -0400 Received: from mailout3.w1.samsung.com ([210.118.77.13]:20900 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751121AbdDEG75 (ORCPT ); Wed, 5 Apr 2017 02:59:57 -0400 Received: from eucas1p1.samsung.com (unknown [182.198.249.206]) by mailout3.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0ONX00D3DCRU1N10@mailout3.w1.samsung.com> for linux-samsung-soc@vger.kernel.org; Wed, 05 Apr 2017 07:59:54 +0100 (BST) Received: from eusmges2.samsung.com (unknown [203.254.199.241]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20170405065953eucas1p165054bba6731a0566f2fdc52a6f066a8~ybjNmQpXm0715107151eucas1p1j; Wed, 5 Apr 2017 06:59:53 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2.samsung.com (EUCPMTA) with SMTP id 6B.CE.04459.9E594E85; Wed, 5 Apr 2017 07:59:53 +0100 (BST) Received: from eusmgms2.samsung.com (unknown [182.198.249.180]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20170405065952eucas1p2592b14571d4e54eeb0aa58195172edb6~ybjMzpDN21126511265eucas1p2p; Wed, 5 Apr 2017 06:59:52 +0000 (GMT) X-AuditID: cbfec7f1-f796e6d00000116b-22-58e495e9a0b5 Received: from eusync2.samsung.com ( [203.254.199.212]) by eusmgms2.samsung.com (EUCPMTA) with SMTP id D0.8B.20206.CF594E85; Wed, 5 Apr 2017 08:00:12 +0100 (BST) Received: from AMDC2768.DIGITAL.local ([106.120.43.17]) by eusync2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0ONX00BQ3CRSVU60@eusync2.samsung.com>; Wed, 05 Apr 2017 07:59:52 +0100 (BST) From: Andrzej Hajda To: Inki Dae Cc: Andrzej Hajda , Bartlomiej Zolnierkiewicz , Marek Szyprowski , dri-devel@lists.freedesktop.org, linux-samsung-soc@vger.kernel.org Subject: [PATCH] drm/exynos/hdmi: fix pipeline disable order Date: Wed, 05 Apr 2017 08:59:48 +0200 Message-id: <1491375588-7092-1-git-send-email-a.hajda@samsung.com> X-Mailer: git-send-email 2.7.4 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrAIsWRmVeSWpSXmKPExsWy7djPc7ovpz6JMOiZI25xa905VouNM9az Wlz5+p7NYtL9CSwWM87vY7JYe+QuuwObx/3u40wefVtWMXp83iQXwBzFZZOSmpNZllqkb5fA lbH27WqWgre8Fde3LmFqYNzF3cXIyS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cCRoZVjCKppcW56bnFRnrFibnFpXnpesn5uZsYgQG47djPLTsYu94F H2IU4GBU4uGtmPY4Qog1say4MvcQowQHs5II77IJTyKEeFMSK6tSi/Lji0pzUosPMZoCLZ/I LCWanA+MjrySeEMTQ3NLQyNjCwtzIyMlcd6pH66ECwmkJ5akZqemFqQWwfQxcXBKNTDuVXCU 6FgW9IY/we/2/FXnReWdH7uVO69dYJM5dZNJgaiUqqCadWaQ6K9uN4NXbssvHL3NtKNg9vYT q9jen+JeOzHB+VXH5kUJ1ocUnbdNPfBy/axz8qZZvxS/qogcmLHlxbWQpON+a4pV77xhio75 ctlI1jRRPzysoPFhkMIB//XBszpb1N8osRRnJBpqMRcVJwIAmg0ypFYCAAA= X-MTR: 20000000000000000@CPGS X-CMS-MailID: 20170405065952eucas1p2592b14571d4e54eeb0aa58195172edb6 X-Msg-Generator: CA X-Sender-IP: 182.198.249.180 X-Local-Sender: =?UTF-8?B?QW5kcnplaiBIYWpkYRtTUlBPTC1LZXJuZWwgKFRQKRvsgrw=?= =?UTF-8?B?7ISx7KCE7J6QG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Global-Sender: =?UTF-8?B?QW5kcnplaiBIYWpkYRtTUlBPTC1LZXJuZWwgKFRQKRtTYW1z?= =?UTF-8?B?dW5nIEVsZWN0cm9uaWNzG1NlbmlvciBTb2Z0d2FyZSBFbmdpbmVlcg==?= X-Sender-Code: =?UTF-8?B?QzEwG0VIURtDMTBDRDAyQ0QwMjczOTI=?= CMS-TYPE: 201P X-HopCount: 7 X-CMS-RootMailID: 20170405065952eucas1p2592b14571d4e54eeb0aa58195172edb6 X-RootMTR: 20170405065952eucas1p2592b14571d4e54eeb0aa58195172edb6 References: 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 Hardware require that MIXER(crtc) should be disabled prior to HDMI(encoder). It was achieved by disabling crtc from encoder disable callback, bypassing drm core. As a result drm core tried to call vblank related routines on disabled crtc. The patch fixes it by simplifying hdmi_disable routine - now it only cancels hotplug worker. Hardware will be disabled in proper moment during pipe clock disable. Signed-off-by: Andrzej Hajda --- drivers/gpu/drm/exynos/exynos_hdmi.c | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index 5243840..b61fe87 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -1481,8 +1481,6 @@ static void hdmi_enable(struct drm_encoder *encoder) static void hdmi_disable(struct drm_encoder *encoder) { struct hdmi_context *hdata = encoder_to_hdmi(encoder); - struct drm_crtc *crtc = encoder->crtc; - const struct drm_crtc_helper_funcs *funcs = NULL; if (!hdata->powered) return; @@ -1493,17 +1491,10 @@ static void hdmi_disable(struct drm_encoder *encoder) * to disable TV Subsystem should be as following, * VP -> Mixer -> HDMI * - * Below codes will try to disable Mixer and VP(if used) - * prior to disabling HDMI. + * To achieve such sequence HDMI is disabled together with HDMI PHY, via + * pipe clock callback. */ - if (crtc) - funcs = crtc->helper_private; - if (funcs && funcs->disable) - (*funcs->disable)(crtc); - cancel_delayed_work(&hdata->hotplug_work); - - hdmiphy_disable(hdata); } static const struct drm_encoder_helper_funcs exynos_hdmi_encoder_helper_funcs = {