From patchwork Fri Nov 7 13:53:58 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 5252961 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 1C09C9F52C for ; Fri, 7 Nov 2014 13:54:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 39C7D2011B for ; Fri, 7 Nov 2014 13:54:19 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 38A7320103 for ; Fri, 7 Nov 2014 13:54:18 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1CE1E6E27D; Fri, 7 Nov 2014 05:54:17 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by gabe.freedesktop.org (Postfix) with ESMTP id 0417A6E27D for ; Fri, 7 Nov 2014 05:54:16 -0800 (PST) Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout1.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NEO00L9Q9F7OE40@mailout1.w1.samsung.com> for dri-devel@lists.freedesktop.org; Fri, 07 Nov 2014 13:57:08 +0000 (GMT) X-AuditID: cbfec7f4-b7f6c6d00000120b-b7-545ccf051afe Received: from eusync1.samsung.com ( [203.254.199.211]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id B7.93.04619.50FCC545; Fri, 07 Nov 2014 13:54:13 +0000 (GMT) Received: from AMDC1943.digital.local ([106.116.151.171]) by eusync1.samsung.com (Oracle Communications Messaging Server 7u4-23.01(7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0NEO00MHA9A8LC90@eusync1.samsung.com>; Fri, 07 Nov 2014 13:54:13 +0000 (GMT) From: Krzysztof Kozlowski To: Inki Dae , Joonyoung Shim , Seung-Woo Kim , Kyungmin Park , David Airlie , Kukjin Kim , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 1/2] drm/exynos: Fix DSI resuming fail because power domain being off Date: Fri, 07 Nov 2014 14:53:58 +0100 Message-id: <1415368439-23642-2-git-send-email-k.kozlowski@samsung.com> X-Mailer: git-send-email 1.9.1 In-reply-to: <1415368439-23642-1-git-send-email-k.kozlowski@samsung.com> References: <1415368439-23642-1-git-send-email-k.kozlowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrFLMWRmVeSWpSXmKPExsVy+t/xy7qs52NCDLZ81LC4te4cq0XvuZNM FhtnrGe1uPL1PZvFyiksFpPuT2CxeHHvIovF6xeGFr0LrrJZPN38mMnibNMbdotNj6+xWlze NYfNYsb5fUwWa4/cZbeYMfklm4OAx6ZVnWwe2789YPW4332cyWPzknqPvi2rGD2O39jO5PF5 k1wAexSXTUpqTmZZapG+XQJXxsrWK4wF76Uq9l6cy9zAeFCsi5GTQ0LAROL3wb9MELaYxIV7 69m6GLk4hASWMkr8e3YKyuljktjz6DVYFZuAscTm5UvAEiIC35kkpjxZzw6SYBaYwiQx9UxF FyMHh7BAlMTFzwogYRYBVYml638zg9i8Au4SXz59YobYJidx8thkVhCbU8BDorfjPZgtBFTz 6vh01gmMvAsYGVYxiqaWJhcUJ6XnGuoVJ+YWl+al6yXn525ihITvlx2Mi49ZHWIU4GBU4uHt FIoJEWJNLCuuzD3EKMHBrCTCe+M4UIg3JbGyKrUoP76oNCe1+BAjEwenVAPjrJJ5W9iOr+Za xtFa53Bt8v/Cxv9GrPNX6Kj8Yw6zae7rvZhVvOzaqR1Ozx5s2+0V5+7qZ5Hazf+hfnXoQpa9 nyQ+Oc84rHOeb06Jy+u50b2PPycs78npOW/o8ERop32T6rKlq4oczf9dNDrJw9tjV2rwoTbq SP+EGzuVfL85ePy/eSmd9Vy8EktxRqKhFnNRcSIAHrpiZz0CAAA= Cc: Krzysztof Kozlowski , Grygorii Strashko , Bartlomiej Zolnierkiewicz , Kevin Hilman , Andrzej Hajda , Marek Szyprowski 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-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 During system resume from suspend to RAM the Exynos DRM driver forced CRTC mode thus turning display on (DPMS_ON). This lead to runtime resuming of DSI which failed because whole LCD power domain was off and it was not allowed to turn on because of system resume in progress. Forcing mode should not be needed and removing it solves this particular problem. This necessary fix for following scenario reproduced on Exynos DRM: 1. Power domain is off before suspending the system. 2. System is suspended to RAM. 3. Resuming starts. The Exynos DRM driver resume callback is called. 4. The Exynos DRM driver calls drm_helper_resume_force_mode() which turns on the screen by calling exynos_dsi_dpms with DRM_MODE_DPMS_ON. 5. The Exynos DSI driver calls pm_runtime_get. The driver runtime resumes and this should turn LCD power domain on. 6. Unfortunately the domain cannot be turned on because system resume is in progress and genpd->prepared_count is positive. Steps to reproduce: 1. Add runtime PM to Exynos DSI driver. 2. Build Exynos DRM/FB without FRAMEBUFFER_CONSOLE. 3. Enable the connector and screen (e.g. with modeset-vsync). 4. echo 3 > /sys/devices/platform/exynos-drm/graphics/fb0/blank 5. echo mem > /sys/power/state 6. Resume. [ 77.712469] PM: early resume of devices complete after 3.854 msecs [ 77.712739] exynos-dsi 11c80000.dsi: pm_genpd_resume() [ 77.712758] exynos4-fimc 11800000.fimc: pm_genpd_resume() [ 77.712774] exynos4-fimc 11810000.fimc: pm_genpd_resume() [ 77.712787] exynos-drm-fimc 11820000.fimc: pm_genpd_resume() [ 77.712802] exynos-drm-fimc 11830000.fimc: pm_genpd_resume() [ 77.712815] s5p-mipi-csis 11880000.csis: pm_genpd_resume() [ 77.712829] s5p-mipi-csis 11890000.csis: pm_genpd_resume() [ 77.712843] exynos-fimc-lite 12390000.fimc-lite: pm_genpd_resume() [ 77.712856] exynos-fimc-lite 123a0000.fimc-lite: pm_genpd_resume() [ 77.713788] exynos4-fb 11c00000.fimd: pm_genpd_resume() [ 77.713912] wake disabled for irq 184 [ 77.713923] wake disabled for irq 185 [ 77.714082] wake disabled for irq 173 [ 77.715676] wake disabled for irq 176 [ 77.718540] exynos4-fb 11c00000.fimd: pm_genpd_runtime_resume() [ 77.718567] exynos4-fb 11c00000.fimd: state restore latency exceeded, new value 1708 ns [ 77.718636] exynos-dsi 11c80000.dsi: pm_genpd_runtime_resume() [ 77.892366] exynos-dsi 11c80000.dsi: PLL failed to stabilize [ 77.892377] exynos-dsi 11c80000.dsi: failed to configure DSI PLL [ 78.192168] exynos-dsi 11c80000.dsi: timeout waiting for reset [ 78.211578] exynos-dsi 11c80000.dsi: waiting for bus lanes timed out [ 78.307173] exynos-dsi 11c80000.dsi: xfer timed out: d1 00 (null) [ 78.307190] panel_s6e8aa0 11c80000.dsi.0: error -110 reading dcs seq(0xd1) [ 78.307199] panel_s6e8aa0 11c80000.dsi.0: read id failed Signed-off-by: Krzysztof Kozlowski --- drivers/gpu/drm/exynos/exynos_drm_drv.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/exynos/exynos_drm_drv.c b/drivers/gpu/drm/exynos/exynos_drm_drv.c index d32165a7f862..8f7110c9d21f 100644 --- a/drivers/gpu/drm/exynos/exynos_drm_drv.c +++ b/drivers/gpu/drm/exynos/exynos_drm_drv.c @@ -200,8 +200,6 @@ static int exynos_drm_resume(struct drm_device *dev) } drm_modeset_unlock_all(dev); - drm_helper_resume_force_mode(dev); - return 0; }