All of lore.kernel.org
 help / color / mirror / Atom feed
From: Javier Martinez Canillas <javier.martinez@collabora.co.uk>
To: Joonyoung Shim <jy0922.shim@samsung.com>,
	Javier Martinez Canillas <javier@dowhile0.org>,
	Marek Szyprowski <m.szyprowski@samsung.com>
Cc: linaro-mm-sig@lists.linaro.org,
	"linux-samsung-soc@vger.kernel.org"
	<linux-samsung-soc@vger.kernel.org>,
	Shaik Ameer Basha <shaik.ameer@samsung.com>,
	Arnd Bergmann <arnd@arndb.de>, Rob Herring <robh@kernel.org>,
	Gustavo Padovan <gustavo.padovan@collabora.co.uk>,
	Joerg Roedel <joro@8bytes.org>, Will Deacon <will.deacon@arm.com>,
	iommu@lists.linux-foundation.org,
	Tomasz Figa <tomasz.figa@gmail.com>,
	Inki Dae <inki.dae@samsung.com>,
	Sjoerd Simons <sjoerd.simons@collabora.co.uk>,
	Kukjin Kim <kgene.kim@samsung.com>,
	Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
	Olof Johansson <olof@lixom.net>,
	Kyungmin Park <kyungmin.park@samsung.com>,
	Thierry Reding <treding@nvidia.com>,
	Cho KyongHo <pullip.cho@samsung.com>,
	David Wodhouse <dwmw2@infradead.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v3 00/19] Exynos SYSMMU (IOMMU) integration with DT and DMA-mapping subsystem
Date: Wed, 14 Jan 2015 01:19:02 +0100	[thread overview]
Message-ID: <54B5B5F6.3030607@collabora.co.uk> (raw)
In-Reply-To: <54B4ABFB.5000501@samsung.com>

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,

WARNING: multiple messages have this Message-ID (diff)
From: javier.martinez@collabora.co.uk (Javier Martinez Canillas)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 00/19] Exynos SYSMMU (IOMMU) integration with DT and DMA-mapping subsystem
Date: Wed, 14 Jan 2015 01:19:02 +0100	[thread overview]
Message-ID: <54B5B5F6.3030607@collabora.co.uk> (raw)
In-Reply-To: <54B4ABFB.5000501@samsung.com>

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,

  parent reply	other threads:[~2015-01-14  0:19 UTC|newest]

Thread overview: 126+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-19 11:15 [PATCH v3 00/19] Exynos SYSMMU (IOMMU) integration with DT and DMA-mapping subsystem Marek Szyprowski
2014-11-19 11:15 ` Marek Szyprowski
     [not found] ` <1416395748-10731-1-git-send-email-m.szyprowski-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2014-11-19 11:15   ` [PATCH v3 01/19] iommu: fix const qualifier in of_iommu_set_ops Marek Szyprowski
2014-11-19 11:15     ` Marek Szyprowski
2014-11-19 11:15 ` [PATCH v3 02/19] iommu: fix initialization without 'add_device' callback Marek Szyprowski
2014-11-19 11:15   ` Marek Szyprowski
2014-11-19 11:15 ` [PATCH v3 03/19] arm: dma-mapping: add missing check for iommu Marek Szyprowski
2014-11-19 11:15   ` Marek Szyprowski
2014-11-19 11:15 ` [PATCH v3 04/19] drm: exynos: detach from default dma-mapping domain on init Marek Szyprowski
2014-11-19 11:15   ` Marek Szyprowski
2014-11-19 11:15 ` [PATCH v3 05/19] arm: exynos: pm_domains: add support for devices registered before arch_initcall Marek Szyprowski
2014-11-19 11:15   ` Marek Szyprowski
2014-11-19 11:15 ` [PATCH v3 06/19] ARM: dts: exynos4: add sysmmu nodes Marek Szyprowski
2014-11-19 11:15   ` Marek Szyprowski
2014-11-19 11:15 ` [PATCH v3 07/19] iommu: exynos: don't read version register on every tlb operation Marek Szyprowski
2014-11-19 11:15   ` Marek Szyprowski
2014-11-19 11:15 ` [PATCH v3 08/19] iommu: exynos: remove unused functions Marek Szyprowski
2014-11-19 11:15   ` Marek Szyprowski
2014-11-19 11:15 ` [PATCH v3 09/19] iommu: exynos: remove useless spinlock Marek Szyprowski
2014-11-19 11:15   ` Marek Szyprowski
2014-11-19 11:15 ` [PATCH v3 10/19] iommu: exynos: refactor function parameters to simplify code Marek Szyprowski
2014-11-19 11:15   ` Marek Szyprowski
2014-11-19 11:15 ` [PATCH v3 11/19] iommu: exynos: remove unused functions, part 2 Marek Szyprowski
2014-11-19 11:15   ` Marek Szyprowski
2014-11-19 11:15 ` [PATCH v3 12/19] iommu: exynos: remove useless device_add/remove callbacks Marek Szyprowski
2014-11-19 11:15   ` Marek Szyprowski
2014-11-19 11:15 ` [PATCH v3 13/19] iommu: exynos: add support for binding more than one sysmmu to master device Marek Szyprowski
2014-11-19 11:15   ` Marek Szyprowski
2014-11-19 11:15 ` [PATCH v3 14/19] iommu: exynos: add support for runtime_pm Marek Szyprowski
2014-11-19 11:15   ` Marek Szyprowski
2014-11-19 11:15 ` [PATCH v3 15/19] iommu: exynos: rename variables to reflect their purpose Marek Szyprowski
2014-11-19 11:15   ` Marek Szyprowski
2014-11-19 11:15 ` [PATCH v3 16/19] iommu: exynos: document internal structures Marek Szyprowski
2014-11-19 11:15   ` Marek Szyprowski
2014-11-19 11:15 ` [PATCH v3 17/19] iommu: exynos: remove excessive includes and sort others alphabetically Marek Szyprowski
2014-11-19 11:15   ` Marek Szyprowski
2014-11-19 11:15 ` [PATCH v3 18/19] iommu: exynos: init from dt-specific callback instead of initcall Marek Szyprowski
2014-11-19 11:15   ` Marek Szyprowski
2014-12-14 12:45   ` Laurent Pinchart
2014-12-14 12:45     ` Laurent Pinchart
2014-12-15  9:47     ` Thierry Reding
2014-12-15  9:47       ` Thierry Reding
2014-12-15 17:17     ` Will Deacon
2014-12-15 17:17       ` Will Deacon
     [not found]       ` <20141215171700.GP20738-5wv7dgnIgG8@public.gmane.org>
2014-12-15 17:27         ` Laurent Pinchart
2014-12-15 17:27           ` Laurent Pinchart
2014-12-15 17:43           ` Will Deacon
2014-12-15 17:43             ` Will Deacon
2014-12-15 17:53             ` Laurent Pinchart
2014-12-15 17:53               ` Laurent Pinchart
2014-12-15 18:13               ` Will Deacon
2014-12-15 18:13                 ` Will Deacon
2014-12-15 18:19                 ` Laurent Pinchart
2014-12-15 18:19                   ` Laurent Pinchart
2014-12-16 10:58                   ` Marek Szyprowski
2014-12-16 10:58                     ` Marek Szyprowski
2014-12-16 11:40                 ` Arnd Bergmann
2014-12-16 11:40                   ` Arnd Bergmann
2014-12-16 12:07                   ` Laurent Pinchart
2014-12-16 12:07                     ` Laurent Pinchart
2014-12-16 12:10                     ` [Linaro-mm-sig] " Arnd Bergmann
2014-12-16 12:10                       ` Arnd Bergmann
2014-12-16 23:24                       ` Laurent Pinchart
2014-12-16 23:24                         ` Laurent Pinchart
2014-12-17 14:27                         ` Arnd Bergmann
2014-12-17 14:27                           ` Arnd Bergmann
2014-12-17 14:39                           ` Laurent Pinchart
2014-12-17 14:39                             ` Laurent Pinchart
2014-12-17 15:41                             ` Arnd Bergmann
2014-12-17 15:41                               ` Arnd Bergmann
2014-12-17 16:02                               ` Laurent Pinchart
2014-12-17 16:02                                 ` Laurent Pinchart
2014-12-17 21:58                                 ` Arnd Bergmann
2014-12-17 21:58                                   ` Arnd Bergmann
2014-12-17 22:38                                   ` Laurent Pinchart
2014-12-17 22:38                                     ` Laurent Pinchart
2014-12-17 14:53                           ` Lucas Stach
2014-12-17 14:53                             ` Lucas Stach
     [not found]                             ` <1418828005.3347.7.camel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2014-12-17 15:56                               ` Arnd Bergmann
2014-12-17 15:56                                 ` Arnd Bergmann
2014-12-18 20:36                                 ` Laurent Pinchart
2014-12-18 20:36                                   ` Laurent Pinchart
2014-12-18 23:21                                   ` Arnd Bergmann
2014-12-18 23:21                                     ` Arnd Bergmann
2014-11-19 11:15 ` [PATCH v3 19/19] iommu: exynos: add callback for initializing devices from device tree Marek Szyprowski
2014-11-19 11:15   ` Marek Szyprowski
2014-12-02  9:59 ` [PATCH v3 00/19] Exynos SYSMMU (IOMMU) integration with DT and DMA-mapping subsystem Sjoerd Simons
2014-12-02  9:59   ` Sjoerd Simons
2014-12-05 10:22   ` Marek Szyprowski
2014-12-05 10:22     ` Marek Szyprowski
2015-01-06  9:49     ` Javier Martinez Canillas
2015-01-06  9:49       ` Javier Martinez Canillas
2015-01-07  2:03       ` Joonyoung Shim
2015-01-07  2:03         ` Joonyoung Shim
2015-01-07  9:33         ` Javier Martinez Canillas
2015-01-07  9:33           ` Javier Martinez Canillas
2015-01-07  9:55           ` Joonyoung Shim
2015-01-07  9:55             ` Joonyoung Shim
     [not found]             ` <54AD0293.70909-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2015-01-08 16:42               ` Javier Martinez Canillas
2015-01-08 16:42                 ` Javier Martinez Canillas
     [not found]                 ` <54AEB384.2040005-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>
2015-01-12  6:40                   ` Joonyoung Shim
2015-01-12  6:40                     ` Joonyoung Shim
2015-01-12  9:43                     ` Joonyoung Shim
2015-01-12  9:43                       ` Joonyoung Shim
     [not found]                     ` <54B36C5A.6050109-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2015-01-12 16:09                       ` Javier Martinez Canillas
2015-01-12 16:09                         ` Javier Martinez Canillas
2015-01-13  5:24                         ` Joonyoung Shim
2015-01-13  5:24                           ` Joonyoung Shim
2015-01-13  8:40                           ` Joonyoung Shim
2015-01-13  8:40                             ` Joonyoung Shim
     [not found]                             ` <54B4D9E1.10400-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2015-01-13  9:43                               ` Javier Martinez Canillas
2015-01-13  9:43                                 ` Javier Martinez Canillas
2015-01-13  9:21                           ` Javier Martinez Canillas
2015-01-13  9:21                             ` Javier Martinez Canillas
2015-01-14  0:19                           ` Javier Martinez Canillas [this message]
2015-01-14  0:19                             ` Javier Martinez Canillas
     [not found]                             ` <54B5B5F6.3030607-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>
2015-01-14  0:24                               ` Javier Martinez Canillas
2015-01-14  0:24                                 ` Javier Martinez Canillas
2015-01-20 11:12                                 ` Joonyoung Shim
2015-01-20 11:12                                   ` Joonyoung Shim
     [not found]                                   ` <54BE383B.5030505-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2015-01-20 14:05                                     ` Javier Martinez Canillas
2015-01-20 14:05                                       ` Javier Martinez Canillas
     [not found]   ` <1417514366.21830.22.camel-ZGY8ohtN/8pPYcu2f3hruQ@public.gmane.org>
2015-01-16 10:33     ` Marek Szyprowski
2015-01-16 10:33       ` Marek Szyprowski
     [not found]       ` <54B8E904.6090107-Sze3O3UU22JBDgjK7y7TUQ@public.gmane.org>
2015-01-16 15:44         ` Sjoerd Simons
2015-01-16 15:44           ` Sjoerd Simons

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54B5B5F6.3030607@collabora.co.uk \
    --to=javier.martinez@collabora.co.uk \
    --cc=arnd@arndb.de \
    --cc=dwmw2@infradead.org \
    --cc=gustavo.padovan@collabora.co.uk \
    --cc=inki.dae@samsung.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=javier@dowhile0.org \
    --cc=joro@8bytes.org \
    --cc=jy0922.shim@samsung.com \
    --cc=kgene.kim@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linaro-mm-sig@lists.linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=m.szyprowski@samsung.com \
    --cc=olof@lixom.net \
    --cc=pullip.cho@samsung.com \
    --cc=robh@kernel.org \
    --cc=shaik.ameer@samsung.com \
    --cc=sjoerd.simons@collabora.co.uk \
    --cc=tomasz.figa@gmail.com \
    --cc=treding@nvidia.com \
    --cc=will.deacon@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.