public inbox for linux-arm-kernel@lists.infradead.org 
 help / color / mirror / Atom feed
From: inki.dae@samsung•com (Inki Dae)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH v5 9/9] drm/exynos: add support for 'hdmi' clock
Date: Wed, 04 Feb 2015 14:13:00 +0900	[thread overview]
Message-ID: <54D1AA5C.7040501@samsung.com> (raw)
In-Reply-To: <1422883228-10690-10-git-send-email-m.szyprowski@samsung.com>

Hi Marek,

On 2015? 02? 02? 22:20, Marek Szyprowski wrote:
> Mixed need to have hdmi clock enabled to properly perform power on/off
> sequences, so add handling of this clock directly to the mixer driver.
> Dependency between hdmi clock and mixer module has been observed on
> Exynos4 based boards.

Picked it up.

Thanks,
Inki Dae.

> 
> Suggested-by: Andrzej Hajda <a.hajda@samsung•com>
> Reviewed-by: Javier Martinez Canillas <javier.martinez@collabora•co.uk>
> Tested-by: Javier Martinez Canillas <javier.martinez@collabora•co.uk>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung•com>
> ---
>  Documentation/devicetree/bindings/video/exynos_mixer.txt | 1 +
>  drivers/gpu/drm/exynos/exynos_mixer.c                    | 9 +++++++++
>  2 files changed, 10 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/video/exynos_mixer.txt b/Documentation/devicetree/bindings/video/exynos_mixer.txt
> index 08b394b1edbf..3e38128f866b 100644
> --- a/Documentation/devicetree/bindings/video/exynos_mixer.txt
> +++ b/Documentation/devicetree/bindings/video/exynos_mixer.txt
> @@ -15,6 +15,7 @@ Required properties:
>  	a) mixer: Gate of Mixer IP bus clock.
>  	b) sclk_hdmi: HDMI Special clock, one of the two possible inputs of
>                 mixer mux.
> +	c) hdmi: Gate of HDMI IP bus clock, needed together with sclk_hdmi.
>  
>  Example:
>  
> diff --git a/drivers/gpu/drm/exynos/exynos_mixer.c b/drivers/gpu/drm/exynos/exynos_mixer.c
> index 820b76234ef4..8212c8299625 100644
> --- a/drivers/gpu/drm/exynos/exynos_mixer.c
> +++ b/drivers/gpu/drm/exynos/exynos_mixer.c
> @@ -72,6 +72,7 @@ struct mixer_resources {
>  	spinlock_t		reg_slock;
>  	struct clk		*mixer;
>  	struct clk		*vp;
> +	struct clk		*hdmi;
>  	struct clk		*sclk_mixer;
>  	struct clk		*sclk_hdmi;
>  	struct clk		*mout_mixer;
> @@ -774,6 +775,12 @@ static int mixer_resources_init(struct mixer_context *mixer_ctx)
>  		return -ENODEV;
>  	}
>  
> +	mixer_res->hdmi = devm_clk_get(dev, "hdmi");
> +	if (IS_ERR(mixer_res->hdmi)) {
> +		dev_err(dev, "failed to get clock 'hdmi'\n");
> +		return PTR_ERR(mixer_res->hdmi);
> +	}
> +
>  	mixer_res->sclk_hdmi = devm_clk_get(dev, "sclk_hdmi");
>  	if (IS_ERR(mixer_res->sclk_hdmi)) {
>  		dev_err(dev, "failed to get clock 'sclk_hdmi'\n");
> @@ -1095,6 +1102,7 @@ static void mixer_poweron(struct exynos_drm_manager *mgr)
>  	pm_runtime_get_sync(ctx->dev);
>  
>  	clk_prepare_enable(res->mixer);
> +	clk_prepare_enable(res->hdmi);
>  	if (ctx->vp_enabled) {
>  		clk_prepare_enable(res->vp);
>  		if (ctx->has_sclk)
> @@ -1134,6 +1142,7 @@ static void mixer_poweroff(struct exynos_drm_manager *mgr)
>  	ctx->powered = false;
>  	mutex_unlock(&ctx->mixer_mutex);
>  
> +	clk_disable_unprepare(res->hdmi);
>  	clk_disable_unprepare(res->mixer);
>  	if (ctx->vp_enabled) {
>  		clk_disable_unprepare(res->vp);
> 

  reply	other threads:[~2015-02-04  5:13 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-02 13:20 [PATCH v5 0/9] Enable HDMI support on Exynos platforms Marek Szyprowski
2015-02-02 13:20 ` [PATCH v5 1/9] PM / Domains: Add a note about power domain subdomains Marek Szyprowski
2015-02-02 13:20 ` [PATCH v5 2/9] ARM: Exynos: add support for sub-power domains Marek Szyprowski
2015-02-02 13:20 ` [PATCH v5 3/9] ARM: dts: exynos4: add hdmi related nodes Marek Szyprowski
2015-02-04 14:02   ` [PATCH v5 RESEND " Marek Szyprowski
2015-02-02 13:20 ` [PATCH v5 4/9] ARM: dts: exynos4: add dependency between TV and LCD0 power domains Marek Szyprowski
2015-02-02 13:20 ` [PATCH v5 5/9] ARM: dts: exynos4412-odroid: enable hdmi support Marek Szyprowski
2015-02-02 13:20 ` [PATCH v5 6/9] ARM: dts: exynos4210-universal_c210: " Marek Szyprowski
2015-02-02 13:20 ` [PATCH v5 7/9] ARM: dts: Exynos: add 'hdmi' clock to mixer nodes Marek Szyprowski
2015-02-19  2:42   ` Andreas Färber
2015-02-02 13:20 ` [PATCH v5 8/9] ARM: dts: exynos5250: add display power domain Marek Szyprowski
2015-02-19  2:44   ` Andreas Färber
2015-02-25 12:17     ` Javier Martinez Canillas
2015-02-02 13:20 ` [PATCH v5 9/9] drm/exynos: add support for 'hdmi' clock Marek Szyprowski
2015-02-04  5:13   ` Inki Dae [this message]
2015-02-03  3:58 ` [PATCH v5 0/9] Enable HDMI support on Exynos platforms Kukjin Kim
2015-02-04  0:09   ` Joonyoung Shim
2015-02-04 14:50     ` Kukjin Kim

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=54D1AA5C.7040501@samsung.com \
    --to=inki.dae@samsung$(echo .)com \
    --cc=linux-arm-kernel@lists$(echo .)infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox