All of lore.kernel.org
 help / color / mirror / Atom feed
From: Joonyoung Shim <jy0922.shim@samsung.com>
To: Gustavo Padovan <gustavo@padovan.org>, linux-samsung-soc@vger.kernel.org
Cc: m.szyprowski@samsung.com, liquid.acid@gmx.net, kgene@kernel.org,
	inki.dae@samsung.com, Prathyush K <prathyush.k@samsung.com>,
	"dri-devel@lists.freedesktop.org"
	<dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH] drm/exynos: don' disable hdmi clocks for exynos5420
Date: Mon, 02 Feb 2015 14:34:46 +0900	[thread overview]
Message-ID: <54CF0C76.1080107@samsung.com> (raw)
In-Reply-To: <1422654311-24984-1-git-send-email-gustavo@padovan.org>

+Cc dri-devel ML,

Hi,

On 01/31/2015 06:45 AM, Gustavo Padovan wrote:
> From: Prathyush K <prathyush.k@samsung.com>
> 
> When VPLL clock of less than 140 MHz was used and all the three
> clocks - hdmiphy, hdmi, sclk_hdmi are disabled, the system hangs
> during S2R when HDMI is connected. Since we want to use a vpll
> clock of 70.5 MHz, we cannot disable these 3 clocks before suspending.
> This patch moves the clk enable/disable of hdmi and sclk_hdmi
> outside of the pm ops. Now system suspends and resumes with HDMI
> connected with VPLL set at 70.5 MHz.
> 

I think commit messages should be updated because it is different with
prior posting codes.

Thanks.

> Signed-off-by: Prathyush K <prathyush.k@samsung.com>
> Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
> Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
> ---
>  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 6aa0d65..0be6921 100644
> --- a/drivers/gpu/drm/exynos/exynos_hdmi.c
> +++ b/drivers/gpu/drm/exynos/exynos_hdmi.c
> @@ -2254,6 +2254,20 @@ static int hdmi_resources_init(struct hdmi_context *hdata)
>  	} else
>  		res->reg_hdmi_en = NULL;
>  
> +	/*
> +	 * For these two clocks exynos5420 fails to suspend if VPLL clock of
> +	 * 70.5 MHz is used and these clocks are disabled before suspend. So
> +	 * enable them here.
> +	 * Note that this will keep the clocks enabled for the entire
> +	 * lifetime of the driver and waste energy when it is suspended.
> +	 * However it prevents the system crash until a better solution is
> +	 * found
> +	 */
> +	if (of_machine_is_compatible("samsung,exynos5420")) {

I'm not sure it's ok to use SoC compatible in driver and doesn't
exynos5800 also have same issue?

How about just use driver_data?

Thanks.

> +		clk_prepare_enable(res->sclk_hdmi);
> +		clk_prepare_enable(res->hdmi);
> +	}
> +
>  	return ret;
>  fail:
>  	DRM_ERROR("HDMI resource init - failed\n");
> @@ -2516,6 +2530,11 @@ static int hdmi_remove(struct platform_device *pdev)
>  	if (hdata->res.reg_hdmi_en)
>  		regulator_disable(hdata->res.reg_hdmi_en);
>  
> +	if (of_machine_is_compatible("samsung,exynos5420")) {
> +		clk_disable_unprepare(hdata->res.sclk_hdmi);
> +		clk_disable_unprepare(hdata->res.hdmi);
> +	}
> +
>  	if (hdata->hdmiphy_port)
>  		put_device(&hdata->hdmiphy_port->dev);
>  	put_device(&hdata->ddc_adpt->dev);
> 

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

Thread overview: 33+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-13  9:39 [PATCH v2 0/6] Enable HDMI support on Exynos platforms Marek Szyprowski
2015-01-13  9:39 ` [PATCH v2 1/6] ARM: Exynos: add support for sub-power domains Marek Szyprowski
2015-01-13 10:44   ` Ulf Hansson
2015-01-13 10:53     ` Marek Szyprowski
2015-01-13 14:44       ` Ulf Hansson
2015-01-13  9:39 ` [PATCH v2 2/6] ARM: dts: exynos4: add hdmi related nodes Marek Szyprowski
2015-01-13  9:39 ` [PATCH v2 3/6] ARM: dts: exynos4: add dependency between TV and LCD0 power domains Marek Szyprowski
2015-01-13  9:39 ` [PATCH v2 4/6] ARM: dts: exynos4412-odroid: enable hdmi support Marek Szyprowski
2015-01-13  9:41 ` [PATCH v2 5/6] ARM: dts: exynos4210-universal_c210: " Marek Szyprowski
2015-01-13  9:41 ` [PATCH v2 6/6] ARM: dts: exynos5250: add display power domain Marek Szyprowski
2015-01-14 15:25 ` [PATCH v2 0/6] Enable HDMI support on Exynos platforms Tobias Jakobi
2015-01-15 10:06   ` Marek Szyprowski
2015-01-15 10:10     ` Tobias Jakobi
2015-01-15 10:26       ` Marek Szyprowski
2015-01-15 10:41         ` Joonyoung Shim
2015-01-15 13:57           ` Tobias Jakobi
2015-01-15 13:59     ` Tobias Jakobi
2015-01-15 23:54     ` Tobias Jakobi
2015-01-16 22:32       ` Tobias Jakobi
2015-01-16 22:44         ` Tobias Jakobi
2015-01-19  6:04           ` Joonyoung Shim
2015-01-19 16:30         ` Marek Szyprowski
2015-01-19 23:03           ` Tobias Jakobi
2015-01-20  7:54             ` Marek Szyprowski
2015-01-19 23:33           ` Tobias Jakobi
2015-01-20 11:25           ` Javier Martinez Canillas
2015-01-29 13:31             ` [RFC] drm/exynos: move hdmi clk disable out of pm ops Gustavo Padovan
2015-01-30  2:02               ` Joonyoung Shim
2015-01-30  8:03                 ` Javier Martinez Canillas
2015-01-30  8:05                   ` Javier Martinez Canillas
2015-01-30  8:27                   ` Joonyoung Shim
2015-01-30 21:45                     ` [PATCH] drm/exynos: don' disable hdmi clocks for exynos5420 Gustavo Padovan
2015-02-02  5:34                       ` Joonyoung Shim [this message]

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=54CF0C76.1080107@samsung.com \
    --to=jy0922.shim@samsung.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=gustavo@padovan.org \
    --cc=inki.dae@samsung.com \
    --cc=kgene@kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=liquid.acid@gmx.net \
    --cc=m.szyprowski@samsung.com \
    --cc=prathyush.k@samsung.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.