All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] drm/stm: ltdc: remove clk_round_rate comment
@ 2019-05-13 13:15 ` Yannick Fertré
  0 siblings, 0 replies; 9+ messages in thread
From: Yannick Fertré @ 2019-05-13 13:15 UTC (permalink / raw)
  To: Yannick Fertre, Philippe Cornu, Benjamin Gaignard,
	Vincent Abriou, David Airlie, Daniel Vetter, Maxime Coquelin,
	Alexandre Torgue, dri-devel, linux-stm32, linux-arm-kernel,
	linux-kernel

Clk_round_rate returns rounded clock without changing
the hardware in any way.
This function couldn't replace set_rate/get_rate calls.
Todo comment has been removed & a new log inserted.

Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
---
Changes in v2:
	- Clk_enable & clk_disable are needed for the SOC STM32F7
	 (not for STM32MP1). I return this part of the patch to make sure the
	 driver is compatible with all SOC STM32.

 drivers/gpu/drm/stm/ltdc.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
index 97912e2..1104e78 100644
--- a/drivers/gpu/drm/stm/ltdc.c
+++ b/drivers/gpu/drm/stm/ltdc.c
@@ -507,11 +507,6 @@ static bool ltdc_crtc_mode_fixup(struct drm_crtc *crtc,
 	struct ltdc_device *ldev = crtc_to_ltdc(crtc);
 	int rate = mode->clock * 1000;

-	/*
-	 * TODO clk_round_rate() does not work yet. When ready, it can
-	 * be used instead of clk_set_rate() then clk_get_rate().
-	 */
-
 	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);
@@ -521,6 +516,9 @@ static bool ltdc_crtc_mode_fixup(struct drm_crtc *crtc,

 	adjusted_mode->clock = clk_get_rate(ldev->pixel_clk) / 1000;

+	DRM_DEBUG_DRIVER("requested clock %dkHz, adjusted clock %dkHz\n",
+			 mode->clock, adjusted_mode->clock);
+
 	return true;
 }

--
2.7.4


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

* [PATCH v2] drm/stm: ltdc: remove clk_round_rate comment
@ 2019-05-13 13:15 ` Yannick Fertré
  0 siblings, 0 replies; 9+ messages in thread
From: Yannick Fertré @ 2019-05-13 13:15 UTC (permalink / raw)
  To: Yannick Fertre, Philippe Cornu, Benjamin Gaignard,
	Vincent Abriou, David Airlie, Daniel Vetter, Maxime Coquelin,
	Alexandre Torgue, dri-devel, linux-stm32, linux-arm-kernel,
	linux-kernel

Clk_round_rate returns rounded clock without changing
the hardware in any way.
This function couldn't replace set_rate/get_rate calls.
Todo comment has been removed & a new log inserted.

Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
---
Changes in v2:
	- Clk_enable & clk_disable are needed for the SOC STM32F7
	 (not for STM32MP1). I return this part of the patch to make sure the
	 driver is compatible with all SOC STM32.

 drivers/gpu/drm/stm/ltdc.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
index 97912e2..1104e78 100644
--- a/drivers/gpu/drm/stm/ltdc.c
+++ b/drivers/gpu/drm/stm/ltdc.c
@@ -507,11 +507,6 @@ static bool ltdc_crtc_mode_fixup(struct drm_crtc *crtc,
 	struct ltdc_device *ldev = crtc_to_ltdc(crtc);
 	int rate = mode->clock * 1000;

-	/*
-	 * TODO clk_round_rate() does not work yet. When ready, it can
-	 * be used instead of clk_set_rate() then clk_get_rate().
-	 */
-
 	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);
@@ -521,6 +516,9 @@ static bool ltdc_crtc_mode_fixup(struct drm_crtc *crtc,

 	adjusted_mode->clock = clk_get_rate(ldev->pixel_clk) / 1000;

+	DRM_DEBUG_DRIVER("requested clock %dkHz, adjusted clock %dkHz\n",
+			 mode->clock, adjusted_mode->clock);
+
 	return true;
 }

--
2.7.4


_______________________________________________
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] 9+ messages in thread

* [PATCH v2] drm/stm: ltdc: remove clk_round_rate comment
@ 2019-05-13 13:15 ` Yannick Fertré
  0 siblings, 0 replies; 9+ messages in thread
From: Yannick Fertré @ 2019-05-13 13:15 UTC (permalink / raw)
  To: Yannick Fertre, Philippe Cornu, Benjamin Gaignard,
	Vincent Abriou, David Airlie, Daniel Vetter, Maxime Coquelin,
	Alexandre Torgue, dri-devel, linux-stm32, linux-arm-kernel,
	linux-kernel

Clk_round_rate returns rounded clock without changing
the hardware in any way.
This function couldn't replace set_rate/get_rate calls.
Todo comment has been removed & a new log inserted.

Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
---
Changes in v2:
	- Clk_enable & clk_disable are needed for the SOC STM32F7
	 (not for STM32MP1). I return this part of the patch to make sure the
	 driver is compatible with all SOC STM32.

 drivers/gpu/drm/stm/ltdc.c | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
index 97912e2..1104e78 100644
--- a/drivers/gpu/drm/stm/ltdc.c
+++ b/drivers/gpu/drm/stm/ltdc.c
@@ -507,11 +507,6 @@ static bool ltdc_crtc_mode_fixup(struct drm_crtc *crtc,
 	struct ltdc_device *ldev = crtc_to_ltdc(crtc);
 	int rate = mode->clock * 1000;

-	/*
-	 * TODO clk_round_rate() does not work yet. When ready, it can
-	 * be used instead of clk_set_rate() then clk_get_rate().
-	 */
-
 	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);
@@ -521,6 +516,9 @@ static bool ltdc_crtc_mode_fixup(struct drm_crtc *crtc,

 	adjusted_mode->clock = clk_get_rate(ldev->pixel_clk) / 1000;

+	DRM_DEBUG_DRIVER("requested clock %dkHz, adjusted clock %dkHz\n",
+			 mode->clock, adjusted_mode->clock);
+
 	return true;
 }

--
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH v2] drm/stm: ltdc: remove clk_round_rate comment
  2019-05-13 13:15 ` Yannick Fertré
  (?)
@ 2019-05-13 14:45   ` Philippe CORNU
  -1 siblings, 0 replies; 9+ messages in thread
From: Philippe CORNU @ 2019-05-13 14:45 UTC (permalink / raw)
  To: Yannick FERTRE, Benjamin GAIGNARD, Vincent ABRIOU, David Airlie,
	Daniel Vetter, Maxime Coquelin, Alexandre TORGUE, dri-devel,
	linux-stm32, linux-arm-kernel, linux-kernel

Dear Yannick,

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

Thank you,

Philippe :-)

On 5/13/19 3:15 PM, Yannick Fertré wrote:
> Clk_round_rate returns rounded clock without changing
> the hardware in any way.
> This function couldn't replace set_rate/get_rate calls.
> Todo comment has been removed & a new log inserted.
> 
> Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
> ---
> Changes in v2:
> 	- Clk_enable & clk_disable are needed for the SOC STM32F7
> 	 (not for STM32MP1). I return this part of the patch to make sure the
> 	 driver is compatible with all SOC STM32.
> 
>   drivers/gpu/drm/stm/ltdc.c | 8 +++-----
>   1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
> index 97912e2..1104e78 100644
> --- a/drivers/gpu/drm/stm/ltdc.c
> +++ b/drivers/gpu/drm/stm/ltdc.c
> @@ -507,11 +507,6 @@ static bool ltdc_crtc_mode_fixup(struct drm_crtc *crtc,
>   	struct ltdc_device *ldev = crtc_to_ltdc(crtc);
>   	int rate = mode->clock * 1000;
> 
> -	/*
> -	 * TODO clk_round_rate() does not work yet. When ready, it can
> -	 * be used instead of clk_set_rate() then clk_get_rate().
> -	 */
> -
>   	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);
> @@ -521,6 +516,9 @@ static bool ltdc_crtc_mode_fixup(struct drm_crtc *crtc,
> 
>   	adjusted_mode->clock = clk_get_rate(ldev->pixel_clk) / 1000;
> 
> +	DRM_DEBUG_DRIVER("requested clock %dkHz, adjusted clock %dkHz\n",
> +			 mode->clock, adjusted_mode->clock);
> +
>   	return true;
>   }
> 
> --
> 2.7.4
> 

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

* Re: [PATCH v2] drm/stm: ltdc: remove clk_round_rate comment
@ 2019-05-13 14:45   ` Philippe CORNU
  0 siblings, 0 replies; 9+ messages in thread
From: Philippe CORNU @ 2019-05-13 14:45 UTC (permalink / raw)
  To: Yannick FERTRE, Benjamin GAIGNARD, Vincent ABRIOU, David Airlie,
	Daniel Vetter, Maxime Coquelin, Alexandre TORGUE, dri-devel,
	linux-stm32, linux-arm-kernel, linux-kernel

Dear Yannick,

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

Thank you,

Philippe :-)

On 5/13/19 3:15 PM, Yannick Fertré wrote:
> Clk_round_rate returns rounded clock without changing
> the hardware in any way.
> This function couldn't replace set_rate/get_rate calls.
> Todo comment has been removed & a new log inserted.
> 
> Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
> ---
> Changes in v2:
> 	- Clk_enable & clk_disable are needed for the SOC STM32F7
> 	 (not for STM32MP1). I return this part of the patch to make sure the
> 	 driver is compatible with all SOC STM32.
> 
>   drivers/gpu/drm/stm/ltdc.c | 8 +++-----
>   1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
> index 97912e2..1104e78 100644
> --- a/drivers/gpu/drm/stm/ltdc.c
> +++ b/drivers/gpu/drm/stm/ltdc.c
> @@ -507,11 +507,6 @@ static bool ltdc_crtc_mode_fixup(struct drm_crtc *crtc,
>   	struct ltdc_device *ldev = crtc_to_ltdc(crtc);
>   	int rate = mode->clock * 1000;
> 
> -	/*
> -	 * TODO clk_round_rate() does not work yet. When ready, it can
> -	 * be used instead of clk_set_rate() then clk_get_rate().
> -	 */
> -
>   	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);
> @@ -521,6 +516,9 @@ static bool ltdc_crtc_mode_fixup(struct drm_crtc *crtc,
> 
>   	adjusted_mode->clock = clk_get_rate(ldev->pixel_clk) / 1000;
> 
> +	DRM_DEBUG_DRIVER("requested clock %dkHz, adjusted clock %dkHz\n",
> +			 mode->clock, adjusted_mode->clock);
> +
>   	return true;
>   }
> 
> --
> 2.7.4
> 
_______________________________________________
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] 9+ messages in thread

* Re: [PATCH v2] drm/stm: ltdc: remove clk_round_rate comment
@ 2019-05-13 14:45   ` Philippe CORNU
  0 siblings, 0 replies; 9+ messages in thread
From: Philippe CORNU @ 2019-05-13 14:45 UTC (permalink / raw)
  To: Yannick FERTRE, Benjamin GAIGNARD, Vincent ABRIOU, David Airlie,
	Daniel Vetter, Maxime Coquelin, Alexandre TORGUE, dri-devel,
	linux-stm32, linux-arm-kernel, linux-kernel

Dear Yannick,

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

Thank you,

Philippe :-)

On 5/13/19 3:15 PM, Yannick Fertré wrote:
> Clk_round_rate returns rounded clock without changing
> the hardware in any way.
> This function couldn't replace set_rate/get_rate calls.
> Todo comment has been removed & a new log inserted.
> 
> Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
> ---
> Changes in v2:
> 	- Clk_enable & clk_disable are needed for the SOC STM32F7
> 	 (not for STM32MP1). I return this part of the patch to make sure the
> 	 driver is compatible with all SOC STM32.
> 
>   drivers/gpu/drm/stm/ltdc.c | 8 +++-----
>   1 file changed, 3 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
> index 97912e2..1104e78 100644
> --- a/drivers/gpu/drm/stm/ltdc.c
> +++ b/drivers/gpu/drm/stm/ltdc.c
> @@ -507,11 +507,6 @@ static bool ltdc_crtc_mode_fixup(struct drm_crtc *crtc,
>   	struct ltdc_device *ldev = crtc_to_ltdc(crtc);
>   	int rate = mode->clock * 1000;
> 
> -	/*
> -	 * TODO clk_round_rate() does not work yet. When ready, it can
> -	 * be used instead of clk_set_rate() then clk_get_rate().
> -	 */
> -
>   	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);
> @@ -521,6 +516,9 @@ static bool ltdc_crtc_mode_fixup(struct drm_crtc *crtc,
> 
>   	adjusted_mode->clock = clk_get_rate(ldev->pixel_clk) / 1000;
> 
> +	DRM_DEBUG_DRIVER("requested clock %dkHz, adjusted clock %dkHz\n",
> +			 mode->clock, adjusted_mode->clock);
> +
>   	return true;
>   }
> 
> --
> 2.7.4
> 
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH v2] drm/stm: ltdc: remove clk_round_rate comment
  2019-05-13 14:45   ` Philippe CORNU
  (?)
@ 2019-05-24  8:35     ` Benjamin Gaignard
  -1 siblings, 0 replies; 9+ messages in thread
From: Benjamin Gaignard @ 2019-05-24  8:35 UTC (permalink / raw)
  To: Philippe CORNU
  Cc: Yannick FERTRE, Benjamin GAIGNARD, Vincent ABRIOU, David Airlie,
	Daniel Vetter, Maxime Coquelin, Alexandre TORGUE, dri-devel,
	linux-stm32, linux-arm-kernel, linux-kernel

Le lun. 13 mai 2019 à 16:46, Philippe CORNU <philippe.cornu@st.com> a écrit :
>
> Dear Yannick,
>
> Acked-by: Philippe Cornu <philippe.cornu@st.com>
>
Applied on drm-misc-next,

Benjamin

> Thank you,
>
> Philippe :-)
>
> On 5/13/19 3:15 PM, Yannick Fertré wrote:
> > Clk_round_rate returns rounded clock without changing
> > the hardware in any way.
> > This function couldn't replace set_rate/get_rate calls.
> > Todo comment has been removed & a new log inserted.
> >
> > Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
> > ---
> > Changes in v2:
> >       - Clk_enable & clk_disable are needed for the SOC STM32F7
> >        (not for STM32MP1). I return this part of the patch to make sure the
> >        driver is compatible with all SOC STM32.
> >
> >   drivers/gpu/drm/stm/ltdc.c | 8 +++-----
> >   1 file changed, 3 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
> > index 97912e2..1104e78 100644
> > --- a/drivers/gpu/drm/stm/ltdc.c
> > +++ b/drivers/gpu/drm/stm/ltdc.c
> > @@ -507,11 +507,6 @@ static bool ltdc_crtc_mode_fixup(struct drm_crtc *crtc,
> >       struct ltdc_device *ldev = crtc_to_ltdc(crtc);
> >       int rate = mode->clock * 1000;
> >
> > -     /*
> > -      * TODO clk_round_rate() does not work yet. When ready, it can
> > -      * be used instead of clk_set_rate() then clk_get_rate().
> > -      */
> > -
> >       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);
> > @@ -521,6 +516,9 @@ static bool ltdc_crtc_mode_fixup(struct drm_crtc *crtc,
> >
> >       adjusted_mode->clock = clk_get_rate(ldev->pixel_clk) / 1000;
> >
> > +     DRM_DEBUG_DRIVER("requested clock %dkHz, adjusted clock %dkHz\n",
> > +                      mode->clock, adjusted_mode->clock);
> > +
> >       return true;
> >   }
> >
> > --
> > 2.7.4
> >
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH v2] drm/stm: ltdc: remove clk_round_rate comment
@ 2019-05-24  8:35     ` Benjamin Gaignard
  0 siblings, 0 replies; 9+ messages in thread
From: Benjamin Gaignard @ 2019-05-24  8:35 UTC (permalink / raw)
  To: Philippe CORNU
  Cc: Benjamin GAIGNARD, David Airlie, linux-kernel, dri-devel,
	Yannick FERTRE, Maxime Coquelin, Daniel Vetter, Vincent ABRIOU,
	linux-stm32, linux-arm-kernel, Alexandre TORGUE

Le lun. 13 mai 2019 à 16:46, Philippe CORNU <philippe.cornu@st.com> a écrit :
>
> Dear Yannick,
>
> Acked-by: Philippe Cornu <philippe.cornu@st.com>
>
Applied on drm-misc-next,

Benjamin

> Thank you,
>
> Philippe :-)
>
> On 5/13/19 3:15 PM, Yannick Fertré wrote:
> > Clk_round_rate returns rounded clock without changing
> > the hardware in any way.
> > This function couldn't replace set_rate/get_rate calls.
> > Todo comment has been removed & a new log inserted.
> >
> > Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
> > ---
> > Changes in v2:
> >       - Clk_enable & clk_disable are needed for the SOC STM32F7
> >        (not for STM32MP1). I return this part of the patch to make sure the
> >        driver is compatible with all SOC STM32.
> >
> >   drivers/gpu/drm/stm/ltdc.c | 8 +++-----
> >   1 file changed, 3 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
> > index 97912e2..1104e78 100644
> > --- a/drivers/gpu/drm/stm/ltdc.c
> > +++ b/drivers/gpu/drm/stm/ltdc.c
> > @@ -507,11 +507,6 @@ static bool ltdc_crtc_mode_fixup(struct drm_crtc *crtc,
> >       struct ltdc_device *ldev = crtc_to_ltdc(crtc);
> >       int rate = mode->clock * 1000;
> >
> > -     /*
> > -      * TODO clk_round_rate() does not work yet. When ready, it can
> > -      * be used instead of clk_set_rate() then clk_get_rate().
> > -      */
> > -
> >       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);
> > @@ -521,6 +516,9 @@ static bool ltdc_crtc_mode_fixup(struct drm_crtc *crtc,
> >
> >       adjusted_mode->clock = clk_get_rate(ldev->pixel_clk) / 1000;
> >
> > +     DRM_DEBUG_DRIVER("requested clock %dkHz, adjusted clock %dkHz\n",
> > +                      mode->clock, adjusted_mode->clock);
> > +
> >       return true;
> >   }
> >
> > --
> > 2.7.4
> >
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
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] 9+ messages in thread

* Re: [PATCH v2] drm/stm: ltdc: remove clk_round_rate comment
@ 2019-05-24  8:35     ` Benjamin Gaignard
  0 siblings, 0 replies; 9+ messages in thread
From: Benjamin Gaignard @ 2019-05-24  8:35 UTC (permalink / raw)
  To: Philippe CORNU
  Cc: Yannick FERTRE, Benjamin GAIGNARD, Vincent ABRIOU, David Airlie,
	Daniel Vetter, Maxime Coquelin, Alexandre TORGUE, dri-devel,
	linux-stm32, linux-arm-kernel, linux-kernel

Le lun. 13 mai 2019 à 16:46, Philippe CORNU <philippe.cornu@st.com> a écrit :
>
> Dear Yannick,
>
> Acked-by: Philippe Cornu <philippe.cornu@st.com>
>
Applied on drm-misc-next,

Benjamin

> Thank you,
>
> Philippe :-)
>
> On 5/13/19 3:15 PM, Yannick Fertré wrote:
> > Clk_round_rate returns rounded clock without changing
> > the hardware in any way.
> > This function couldn't replace set_rate/get_rate calls.
> > Todo comment has been removed & a new log inserted.
> >
> > Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
> > ---
> > Changes in v2:
> >       - Clk_enable & clk_disable are needed for the SOC STM32F7
> >        (not for STM32MP1). I return this part of the patch to make sure the
> >        driver is compatible with all SOC STM32.
> >
> >   drivers/gpu/drm/stm/ltdc.c | 8 +++-----
> >   1 file changed, 3 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
> > index 97912e2..1104e78 100644
> > --- a/drivers/gpu/drm/stm/ltdc.c
> > +++ b/drivers/gpu/drm/stm/ltdc.c
> > @@ -507,11 +507,6 @@ static bool ltdc_crtc_mode_fixup(struct drm_crtc *crtc,
> >       struct ltdc_device *ldev = crtc_to_ltdc(crtc);
> >       int rate = mode->clock * 1000;
> >
> > -     /*
> > -      * TODO clk_round_rate() does not work yet. When ready, it can
> > -      * be used instead of clk_set_rate() then clk_get_rate().
> > -      */
> > -
> >       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);
> > @@ -521,6 +516,9 @@ static bool ltdc_crtc_mode_fixup(struct drm_crtc *crtc,
> >
> >       adjusted_mode->clock = clk_get_rate(ldev->pixel_clk) / 1000;
> >
> > +     DRM_DEBUG_DRIVER("requested clock %dkHz, adjusted clock %dkHz\n",
> > +                      mode->clock, adjusted_mode->clock);
> > +
> >       return true;
> >   }
> >
> > --
> > 2.7.4
> >
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2019-05-24  8:35 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-05-13 13:15 [PATCH v2] drm/stm: ltdc: remove clk_round_rate comment Yannick Fertré
2019-05-13 13:15 ` Yannick Fertré
2019-05-13 13:15 ` Yannick Fertré
2019-05-13 14:45 ` Philippe CORNU
2019-05-13 14:45   ` Philippe CORNU
2019-05-13 14:45   ` Philippe CORNU
2019-05-24  8:35   ` Benjamin Gaignard
2019-05-24  8:35     ` Benjamin Gaignard
2019-05-24  8:35     ` Benjamin Gaignard

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.