LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] drm/stm: ltdc: restore calls to clk_{enable/disable}
@ 2019-05-27 11:58 Benjamin Gaignard
  2019-05-27 12:27 ` Philippe CORNU
  0 siblings, 1 reply; 3+ messages in thread
From: Benjamin Gaignard @ 2019-05-27 11:58 UTC (permalink / raw)
  To: yannick.fertre, philippe.cornu, airlied, daniel, alexandre.torgue
  Cc: dri-devel, linux-stm32, linux-arm-kernel, linux-kernel,
	Benjamin Gaignard

From: Benjamin Gaignard <benjamin.gaignard@linaro.org>

Restore calls to clk_{enable/disable} deleted after applying the wrong
version of the patch

Fixes: fd6905fca4f0 ("drm/stm: ltdc: remove clk_round_rate comment")

Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
---
 drivers/gpu/drm/stm/ltdc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
index ae2aaf2a62ee..ac29890edeb6 100644
--- a/drivers/gpu/drm/stm/ltdc.c
+++ b/drivers/gpu/drm/stm/ltdc.c
@@ -507,10 +507,12 @@ static bool ltdc_crtc_mode_fixup(struct drm_crtc *crtc,
 	struct ltdc_device *ldev = crtc_to_ltdc(crtc);
 	int rate = mode->clock * 1000;
 
+	clk_disable(ldev->pixel_clk);
 	if (clk_set_rate(ldev->pixel_clk, rate) < 0) {
 		DRM_ERROR("Cannot set rate (%dHz) for pixel clk\n", rate);
 		return false;
 	}
+	clk_enable(ldev->pixel_clk);
 
 	adjusted_mode->clock = clk_get_rate(ldev->pixel_clk) / 1000;
 
-- 
2.15.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/stm: ltdc: restore calls to clk_{enable/disable}
  2019-05-27 11:58 [PATCH] drm/stm: ltdc: restore calls to clk_{enable/disable} Benjamin Gaignard
@ 2019-05-27 12:27 ` Philippe CORNU
  2019-05-28  7:30   ` Benjamin Gaignard
  0 siblings, 1 reply; 3+ messages in thread
From: Philippe CORNU @ 2019-05-27 12:27 UTC (permalink / raw)
  To: Benjamin GAIGNARD, Yannick FERTRE, airlied, daniel, Alexandre TORGUE
  Cc: dri-devel, linux-stm32, linux-arm-kernel, linux-kernel,
	Benjamin Gaignard

Hi Benjamin,

Many thanks for this fix (and more generally for pushing STM patches on 
misc :-)

Acked-by: Philippe Cornu <philippe.cornu@st.com>

Philippe :-)

On 5/27/19 1:58 PM, Benjamin Gaignard wrote:
> From: Benjamin Gaignard <benjamin.gaignard@linaro.org>
> 
> Restore calls to clk_{enable/disable} deleted after applying the wrong
> version of the patch
> 
> Fixes: fd6905fca4f0 ("drm/stm: ltdc: remove clk_round_rate comment")
> 
> Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
> ---
>   drivers/gpu/drm/stm/ltdc.c | 2 ++
>   1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
> index ae2aaf2a62ee..ac29890edeb6 100644
> --- a/drivers/gpu/drm/stm/ltdc.c
> +++ b/drivers/gpu/drm/stm/ltdc.c
> @@ -507,10 +507,12 @@ static bool ltdc_crtc_mode_fixup(struct drm_crtc *crtc,
>   	struct ltdc_device *ldev = crtc_to_ltdc(crtc);
>   	int rate = mode->clock * 1000;
>   
> +	clk_disable(ldev->pixel_clk);
>   	if (clk_set_rate(ldev->pixel_clk, rate) < 0) {
>   		DRM_ERROR("Cannot set rate (%dHz) for pixel clk\n", rate);
>   		return false;
>   	}
> +	clk_enable(ldev->pixel_clk);
>   
>   	adjusted_mode->clock = clk_get_rate(ldev->pixel_clk) / 1000;
>   
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] drm/stm: ltdc: restore calls to clk_{enable/disable}
  2019-05-27 12:27 ` Philippe CORNU
@ 2019-05-28  7:30   ` Benjamin Gaignard
  0 siblings, 0 replies; 3+ messages in thread
From: Benjamin Gaignard @ 2019-05-28  7:30 UTC (permalink / raw)
  To: Philippe CORNU
  Cc: Benjamin GAIGNARD, Yannick FERTRE, airlied, daniel,
	Alexandre TORGUE, linux-arm-kernel, linux-stm32, dri-devel,
	linux-kernel

Le lun. 27 mai 2019 à 14:28, Philippe CORNU <philippe.cornu@st.com> a écrit :
>
> Hi Benjamin,
>
> Many thanks for this fix (and more generally for pushing STM patches on
> misc :-)
>
> Acked-by: Philippe Cornu <philippe.cornu@st.com>

Applied on drm-misc-next,
sorry for the mistake.

Benjamin
>
> Philippe :-)
>
> On 5/27/19 1:58 PM, Benjamin Gaignard wrote:
> > From: Benjamin Gaignard <benjamin.gaignard@linaro.org>
> >
> > Restore calls to clk_{enable/disable} deleted after applying the wrong
> > version of the patch
> >
> > Fixes: fd6905fca4f0 ("drm/stm: ltdc: remove clk_round_rate comment")
> >
> > Signed-off-by: Benjamin Gaignard <benjamin.gaignard@linaro.org>
> > ---
> >   drivers/gpu/drm/stm/ltdc.c | 2 ++
> >   1 file changed, 2 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
> > index ae2aaf2a62ee..ac29890edeb6 100644
> > --- a/drivers/gpu/drm/stm/ltdc.c
> > +++ b/drivers/gpu/drm/stm/ltdc.c
> > @@ -507,10 +507,12 @@ static bool ltdc_crtc_mode_fixup(struct drm_crtc *crtc,
> >       struct ltdc_device *ldev = crtc_to_ltdc(crtc);
> >       int rate = mode->clock * 1000;
> >
> > +     clk_disable(ldev->pixel_clk);
> >       if (clk_set_rate(ldev->pixel_clk, rate) < 0) {
> >               DRM_ERROR("Cannot set rate (%dHz) for pixel clk\n", rate);
> >               return false;
> >       }
> > +     clk_enable(ldev->pixel_clk);
> >
> >       adjusted_mode->clock = clk_get_rate(ldev->pixel_clk) / 1000;
> >
> >
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-05-28  7:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-27 11:58 [PATCH] drm/stm: ltdc: restore calls to clk_{enable/disable} Benjamin Gaignard
2019-05-27 12:27 ` Philippe CORNU
2019-05-28  7:30   ` Benjamin Gaignard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).