From patchwork Wed Jan 14 00:19:02 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Martinez Canillas X-Patchwork-Id: 5625141 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id A2546C058D for ; Wed, 14 Jan 2015 00:22:06 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id BCC832038E for ; Wed, 14 Jan 2015 00:22:05 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D07512038D for ; Wed, 14 Jan 2015 00:22:04 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YBBgQ-0005BF-9e; Wed, 14 Jan 2015 00:19:38 +0000 Received: from bhuna.collabora.co.uk ([93.93.135.160]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YBBgM-00052h-Oa for linux-arm-kernel@lists.infradead.org; Wed, 14 Jan 2015 00:19:35 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: javier) with ESMTPSA id CD642600812 Message-ID: <54B5B5F6.3030607@collabora.co.uk> Date: Wed, 14 Jan 2015 01:19:02 +0100 From: Javier Martinez Canillas User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.2.0 MIME-Version: 1.0 To: Joonyoung Shim , Javier Martinez Canillas , Marek Szyprowski Subject: Re: [PATCH v3 00/19] Exynos SYSMMU (IOMMU) integration with DT and DMA-mapping subsystem References: <1416395748-10731-1-git-send-email-m.szyprowski@samsung.com> <1417514366.21830.22.camel@collabora.co.uk> <54818768.3080303@samsung.com> <54AC93E0.8010705@samsung.com> <54ACFD69.1020500@collabora.co.uk> <54AD0293.70909@samsung.com> <54AEB384.2040005@collabora.co.uk> <54B36C5A.6050109@samsung.com> <54B3F1B7.7090307@collabora.co.uk> <54B4ABFB.5000501@samsung.com> In-Reply-To: <54B4ABFB.5000501@samsung.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150113_161935_130780_5294F3D6 X-CRM114-Status: GOOD ( 18.00 ) X-Spam-Score: -0.0 (/) Cc: Rob Herring , "linux-samsung-soc@vger.kernel.org" , Shaik Ameer Basha , Arnd Bergmann , Inki Dae , David Wodhouse , Joerg Roedel , Will Deacon , Tomasz Figa , Sjoerd Simons , linaro-mm-sig@lists.linaro.org, iommu@lists.linux-foundation.org, Kukjin Kim , Laurent Pinchart , Olof Johansson , Kyungmin Park , Thierry Reding , Gustavo Padovan , Cho KyongHo , "linux-arm-kernel@lists.infradead.org" X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_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 Hello Joonyoung, On 01/13/2015 06:24 AM, Joonyoung Shim wrote: >> >> Yes, I was not able to trigger that by running modetest but by turning off >> my HDMI monitor and then turning it on again. When the monitor is turned >> on then I see a "Power domain power-domain disable failed" and the imprecise >> external abort error. >> >> I had to disable CONFIG_DRM_EXYNOS_DP in order to trigger though and that >> is why I was not able to reproduce it before. >> >> I think though that this is a separate issue of the HDMI not working since >> power domains should be able to have many consumers devices and I see that >> other power domains are used that way. >> > > OK, we need more investigation. > I dug further on this issue and found that the cause is that the exynos_mixer driver needs some clocks (CLK_HDMI and CLK_SCLK_HDMI) grabbed by exynos_hdmi to be kept enabled after hdmi_poweroff (drivers/gpu/drm/exynos/exynos_hdmi.c). Otherwise, any access to mixer device registers leads to an imprecise external abort error. The following change [0] to the Exynos DRM HDMI driver makes the issue to not happen and I can successfully execute: # echo 1 > /sys/devices/platform/exynos-drm/graphics/fb0/blank # echo 0 > /sys/devices/platform/exynos-drm/graphics/fb0/blank Only not disabling the hdmi clock [1]: is enough but doing so makes sometimes the DISP1 power domain disabling fails. It doesn't seem to have side effect though since I also see the signal in the HDMI display to go standby and then on again. # echo 0 > /sys/devices/platform/exynos-drm/graphics/fb0/blank # echo 1 > /sys/devices/platform/exynos-drm/graphics/fb0/blank [ 63.089080] Power domain disp1-power-domain disable failed # echo 0 > /sys/devices/platform/exynos-drm/graphics/fb0/blank # That error message when both clocks are not disabled on hdmi_poweroff() though. I tried different things like set parent of mixer clock to hdmi clock instead of aclk200_disp1 or make the Exynos DRM mixer driver to grab the hdmi clock from DT and prepare_enable from mixer_poweron() but in all cases the same imprecise external abort error was triggered by mixer_poweron() trying to access the mixer registers. Any ideas? Thanks a lot and best regards, Javier [0]: diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index 5765a161abdd..0887911cfdd5 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -2084,8 +2084,8 @@ static void hdmi_poweroff(struct exynos_drm_display *display) cancel_delayed_work(&hdata->hotplug_work); - clk_disable_unprepare(res->sclk_hdmi); - clk_disable_unprepare(res->hdmi); /* reset pmu hdmiphy control bit to disable hdmiphy */ regmap_update_bits(hdata->pmureg, PMU_HDMI_PHY_CONTROL, [1]: diff --git a/drivers/gpu/drm/exynos/exynos_hdmi.c b/drivers/gpu/drm/exynos/exynos_hdmi.c index 5765a161abdd..628bff96d543 100644 --- a/drivers/gpu/drm/exynos/exynos_hdmi.c +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c @@ -2085,7 +2085,7 @@ static void hdmi_poweroff(struct exynos_drm_display *display) cancel_delayed_work(&hdata->hotplug_work); clk_disable_unprepare(res->sclk_hdmi); - clk_disable_unprepare(res->hdmi); /* reset pmu hdmiphy control bit to disable hdmiphy */ regmap_update_bits(hdata->pmureg, PMU_HDMI_PHY_CONTROL,