From patchwork Fri Jun 13 09:01:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Inki Dae X-Patchwork-Id: 4347721 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A633CBEEAA for ; Fri, 13 Jun 2014 09:01:22 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9084B2024C for ; Fri, 13 Jun 2014 09:01:21 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 84F31201F7 for ; Fri, 13 Jun 2014 09:01:13 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AFE266E9EB; Fri, 13 Jun 2014 02:01:12 -0700 (PDT) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout1.samsung.com (mailout1.samsung.com [203.254.224.24]) by gabe.freedesktop.org (Postfix) with ESMTP id 0422B6E9EB for ; Fri, 13 Jun 2014 02:01:11 -0700 (PDT) Received: from epcpsbgr5.samsung.com (u145.gpu120.samsung.co.kr [203.254.230.145]) by mailout1.samsung.com (Oracle Communications Messaging Server 7u4-24.01 (7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0N730064WNPTN380@mailout1.samsung.com> for dri-devel@lists.freedesktop.org; Fri, 13 Jun 2014 18:01:05 +0900 (KST) Received: from epcpsbgm2.samsung.com ( [172.20.52.114]) by epcpsbgr5.samsung.com (EPCPMTA) with SMTP id BC.CE.16580.ECDBA935; Fri, 13 Jun 2014 18:01:02 +0900 (KST) X-AuditID: cbfee691-b7f2f6d0000040c4-f7-539abdce5d6b Received: from epmmp1.local.host ( [203.254.227.16]) by epcpsbgm2.samsung.com (EPCPMTA) with SMTP id 8B.1C.07139.ECDBA935; Fri, 13 Jun 2014 18:01:02 +0900 (KST) Received: from daeinki-desktop.10.32.193.11 ([10.252.83.67]) by mmp1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPA id <0N7300NPLNPQ3Q10@mmp1.samsung.com>; Fri, 13 Jun 2014 18:01:02 +0900 (KST) From: Inki Dae To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm/exynos: hdmi: fix power order issue Date: Fri, 13 Jun 2014 18:01:01 +0900 Message-id: <1402650061-14140-1-git-send-email-inki.dae@samsung.com> X-Mailer: git-send-email 1.7.9.5 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrBLMWRmVeSWpSXmKPExsWyRsSkSPfc3lnBBm0XLC16z51ksrjy9T2b xaT7E1gslm7ld2Dx2P7tAavH/e7jTB59W1YxenzeJBfAEsVlk5Kak1mWWqRvl8CV8f3bG+aC M7wVB6Y2szQwfuDqYuTkkBAwkfi2rpsdwhaTuHBvPVsXIxeHkMBSRommF6/YYIqm/LjFCJFY xCgxf9s1Zginm0miv/8iWBWbgKrExBX3wWwRAWWJvxNXAXVwcDALhEh0POAACQsLWEjs2X2U FcRmASpv3HQSbDOvgIvEk0u32EHKJQQUJOZMsgEZLyHwnE3i0IZ9UPUCEt8mH2KBqJGV2HSA GeI2SYmDK26wTGAUXMDIsIpRNLUguaA4Kb3IVK84Mbe4NC9dLzk/dxMjMBRP/3s2cQfj/QPW hxiTgcZNZJYSTc4HhnJeSbyhsZmRhamJqbGRuaUZacJK4rzpj5KChATSE0tSs1NTC1KL4otK c1KLDzEycXBKNTD2iuwQ43JSvLeg3yjp+Mmv+Yt+sFeuti2RfPVBWav4kPmWV/EfZws7T395 6fsWnkfzA+zv8du/ZeQIeqHwUJs75r/rUvXujzlNTgFsbx/8qPzfbD/jafbhL3kOinotHC0m F7s+7vuUyP/3Wp55aFT/rQbh7LIjE9gkS/117tbH+F/eL7HUPUGJpTgj0VCLuag4EQA/zT6O WwIAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrKIsWRmVeSWpSXmKPExsVy+t9jAd1ze2cFGzx9bWjRe+4kk8WVr+/Z LCbdn8BisXQrvwOLx/ZvD1g97ncfZ/Lo27KK0ePzJrkAlqgGRpuM1MSU1CKF1Lzk/JTMvHRb Je/geOd4UzMDQ11DSwtzJYW8xNxUWyUXnwBdt8wcoJVKCmWJOaVAoYDE4mIlfTtME0JD3HQt YBojdH1DguB6jAzQQMIaxozv394wF5zhrTgwtZmlgfEDVxcjJ4eEgInElB+3GCFsMYkL99az dTFycQgJLGKUmL/tGjOE080k0d9/kQ2kik1AVWLiivtgtoiAssTfiauAujk4mAVCJDoecICE hQUsJPbsPsoKYrMAlTduOskOYvMKuEg8uXSLHaRcQkBBYs4kmwmM3AsYGVYxiqYWJBcUJ6Xn GukVJ+YWl+al6yXn525iBAf6M+kdjKsaLA4xCnAwKvHwBryfGSzEmlhWXJl7iFGCg1lJhPde w6xgId6UxMqq1KL8+KLSnNTiQ4zJQMsnMkuJJucDozCvJN7Q2MTMyNLI3NDCyNicNGElcd6D rdaBQgLpiSWp2ampBalFMFuYODilGhhjmU7Wp8UFx27as/3xwgw5b6EbgUscJddlCXDsMMgt 2hHif3/rJW2H9/cUNsY4CKyx07z55GbJnabPx09s+lgR9+L2/5xLa5YkmJ3ZF+V9Om3TFjuR sPtxree/CG7qEplwxtjsxf1TH+6V7Z5uLrO562/Lzucur/6JqB14Kr6k7NalB9UfbndWKLEU ZyQaajEXFScCALQPRtO4AgAA DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Cc: samsung-soc@vger.kernel.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.15 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-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch resolves page fault issue of Mixer when disabled. The SFRs of VP and Mixer are updated by Vertical Sync of Timing generator which is a part of HDMI so the sequence to disable TV Subsystem should be as following: VP -> Mixer -> HDMI For this, this patch disables Mixer and VP (if used) prior to disabling HDMI. Signed-off-by: Inki Dae --- drivers/gpu/drm/exynos/exynos_hdmi.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index c104d0c..aa259b0 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -2090,6 +2090,11 @@ out: static void hdmi_dpms(struct exynos_drm_display *display, int mode) { + struct hdmi_context *hdata = display->ctx; + struct drm_encoder *encoder = hdata->encoder; + struct drm_crtc *crtc = encoder->crtc; + struct drm_crtc_helper_funcs *funcs = NULL; + DRM_DEBUG_KMS("mode %d\n", mode); switch (mode) { @@ -2099,6 +2104,20 @@ static void hdmi_dpms(struct exynos_drm_display *display, int mode) case DRM_MODE_DPMS_STANDBY: case DRM_MODE_DPMS_SUSPEND: case DRM_MODE_DPMS_OFF: + /* + * The SFRs of VP and Mixer are updated by Vertical Sync of + * Timing generator which is a part of HDMI so the sequence + * 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. + */ + if (crtc) + funcs = crtc->helper_private; + if (funcs && funcs->dpms) + (*funcs->dpms)(crtc, mode); + hdmi_poweroff(display); break; default: