dri-devel.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/stm: ltdc: fix data enable polarity
@ 2019-03-29 15:50 Yannick Fertré
  2019-03-29 21:32 ` Mukesh Ojha
  2019-03-29 21:32 ` Mukesh Ojha
  0 siblings, 2 replies; 5+ messages in thread
From: Yannick Fertré @ 2019-03-29 15:50 UTC (permalink / raw)
  To: Yannick Fertre, Philippe Cornu, Vincent Abriou, David Airlie,
	Daniel Vetter, Maxime Coquelin, Alexandre Torgue, dri-devel,
	linux-stm32, linux-arm-kernel, linux-kernel

Wrong DISPLAY_FLAGS used to set the data enable polarity.

Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
---
 drivers/gpu/drm/stm/ltdc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
index b1741a9..6ba326a 100644
--- a/drivers/gpu/drm/stm/ltdc.c
+++ b/drivers/gpu/drm/stm/ltdc.c
@@ -555,7 +555,7 @@ static void ltdc_crtc_mode_set_nofb(struct drm_crtc *crtc)
 	if (vm.flags & DISPLAY_FLAGS_VSYNC_HIGH)
 		val |= GCR_VSPOL;
 
-	if (vm.flags & DISPLAY_FLAGS_DE_HIGH)
+	if (vm.flags & DISPLAY_FLAGS_DE_LOW)
 		val |= GCR_DEPOL;
 
 	if (vm.flags & DISPLAY_FLAGS_PIXDATA_NEGEDGE)
-- 
2.7.4

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

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

* Re: [PATCH] drm/stm: ltdc: fix data enable polarity
  2019-03-29 15:50 [PATCH] drm/stm: ltdc: fix data enable polarity Yannick Fertré
@ 2019-03-29 21:32 ` Mukesh Ojha
  2019-03-29 21:32 ` Mukesh Ojha
  1 sibling, 0 replies; 5+ messages in thread
From: Mukesh Ojha @ 2019-03-29 21:32 UTC (permalink / raw)
  To: Yannick Fertré,
	Philippe Cornu, Vincent Abriou, David Airlie, Daniel Vetter,
	Maxime Coquelin, Alexandre Torgue, dri-devel, linux-stm32,
	linux-arm-kernel, linux-kernel


On 3/29/2019 9:20 PM, Yannick Fertré wrote:
> Wrong DISPLAY_FLAGS used to set the data enable polarity.
Used or checked.
Can you also explain how it is wrong to check against this FLAG in commit?
>
> Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
> ---
>   drivers/gpu/drm/stm/ltdc.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
> index b1741a9..6ba326a 100644
> --- a/drivers/gpu/drm/stm/ltdc.c
> +++ b/drivers/gpu/drm/stm/ltdc.c
> @@ -555,7 +555,7 @@ static void ltdc_crtc_mode_set_nofb(struct drm_crtc *crtc)
>   	if (vm.flags & DISPLAY_FLAGS_VSYNC_HIGH)
>   		val |= GCR_VSPOL;
>   
> -	if (vm.flags & DISPLAY_FLAGS_DE_HIGH)
> +	if (vm.flags & DISPLAY_FLAGS_DE_LOW)
>   		val |= GCR_DEPOL;
>   
>   	if (vm.flags & DISPLAY_FLAGS_PIXDATA_NEGEDGE)

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

* Re: [PATCH] drm/stm: ltdc: fix data enable polarity
  2019-03-29 15:50 [PATCH] drm/stm: ltdc: fix data enable polarity Yannick Fertré
  2019-03-29 21:32 ` Mukesh Ojha
@ 2019-03-29 21:32 ` Mukesh Ojha
  2019-04-01  9:18   ` Philippe CORNU
  1 sibling, 1 reply; 5+ messages in thread
From: Mukesh Ojha @ 2019-03-29 21:32 UTC (permalink / raw)
  To: Yannick Fertré,
	Philippe Cornu, Vincent Abriou, David Airlie, Daniel Vetter,
	Maxime Coquelin, Alexandre Torgue, dri-devel, linux-stm32,
	linux-arm-kernel, linux-kernel


On 3/29/2019 9:20 PM, Yannick Fertré wrote:
> Wrong DISPLAY_FLAGS used to set the data enable polarity.
Used or checked?
Can you also explain how it is wrong to check against this FLAG in commit?
>
> Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
> ---
>   drivers/gpu/drm/stm/ltdc.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
> index b1741a9..6ba326a 100644
> --- a/drivers/gpu/drm/stm/ltdc.c
> +++ b/drivers/gpu/drm/stm/ltdc.c
> @@ -555,7 +555,7 @@ static void ltdc_crtc_mode_set_nofb(struct drm_crtc *crtc)
>   	if (vm.flags & DISPLAY_FLAGS_VSYNC_HIGH)
>   		val |= GCR_VSPOL;
>   
> -	if (vm.flags & DISPLAY_FLAGS_DE_HIGH)
> +	if (vm.flags & DISPLAY_FLAGS_DE_LOW)
>   		val |= GCR_DEPOL;
>   
>   	if (vm.flags & DISPLAY_FLAGS_PIXDATA_NEGEDGE)

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

* Re: [PATCH] drm/stm: ltdc: fix data enable polarity
  2019-03-29 21:32 ` Mukesh Ojha
@ 2019-04-01  9:18   ` Philippe CORNU
  2019-04-24 12:26     ` Benjamin Gaignard
  0 siblings, 1 reply; 5+ messages in thread
From: Philippe CORNU @ 2019-04-01  9:18 UTC (permalink / raw)
  To: Mukesh Ojha, Yannick FERTRE, Vincent ABRIOU, David Airlie,
	Daniel Vetter, Maxime Coquelin, Alexandre TORGUE, dri-devel,
	linux-stm32, linux-arm-kernel, linux-kernel



On 3/29/19 10:32 PM, Mukesh Ojha wrote:
> 
> On 3/29/2019 9:20 PM, Yannick Fertré wrote:
>> Wrong DISPLAY_FLAGS used to set the data enable polarity.
> Used or checked?
> Can you also explain how it is wrong to check against this FLAG in commit?

Dear Yannick,
Many thanks for your patch,

Dear Mukesh,
Many thanks for your comment,

Looking deeper in the stm32 LTDC Ref man chapter, we can read:

Bit 30 VSPOL: vertical synchronization polarity
This bit is set and cleared by software.
0: vertical synchronization is active low.
1: vertical synchronization is active high.

Bit 29 DEPOL: not data enable polarity
This bit is set and cleared by software.
0: not data enable polarity is active low.
1: not data enable polarity is active high.

So I suggest the following commit message:
"According to the STM32 LTDC documentation, GCR_DEPOL bit need to be set 
with DISPLAY_FLAGS_DE_LOW but not with DISPLAY_FLAGS_DE_HIGH."

With that or something similar

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

Philippe :-)


>>
>> Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
>> ---
>>    drivers/gpu/drm/stm/ltdc.c | 2 +-
>>    1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
>> index b1741a9..6ba326a 100644
>> --- a/drivers/gpu/drm/stm/ltdc.c
>> +++ b/drivers/gpu/drm/stm/ltdc.c
>> @@ -555,7 +555,7 @@ static void ltdc_crtc_mode_set_nofb(struct drm_crtc *crtc)
>>    	if (vm.flags & DISPLAY_FLAGS_VSYNC_HIGH)
>>    		val |= GCR_VSPOL;
>>    
>> -	if (vm.flags & DISPLAY_FLAGS_DE_HIGH)
>> +	if (vm.flags & DISPLAY_FLAGS_DE_LOW)
>>    		val |= GCR_DEPOL;
>>    
>>    	if (vm.flags & DISPLAY_FLAGS_PIXDATA_NEGEDGE)
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH] drm/stm: ltdc: fix data enable polarity
  2019-04-01  9:18   ` Philippe CORNU
@ 2019-04-24 12:26     ` Benjamin Gaignard
  0 siblings, 0 replies; 5+ messages in thread
From: Benjamin Gaignard @ 2019-04-24 12:26 UTC (permalink / raw)
  To: Philippe CORNU
  Cc: Mukesh Ojha, Yannick FERTRE, Vincent ABRIOU, David Airlie,
	Daniel Vetter, Maxime Coquelin, Alexandre TORGUE, dri-devel,
	linux-stm32, linux-arm-kernel, linux-kernel

Le lun. 1 avr. 2019 à 11:18, Philippe CORNU <philippe.cornu@st.com> a écrit :
>
>
>
> On 3/29/19 10:32 PM, Mukesh Ojha wrote:
> >
> > On 3/29/2019 9:20 PM, Yannick Fertré wrote:
> >> Wrong DISPLAY_FLAGS used to set the data enable polarity.
> > Used or checked?
> > Can you also explain how it is wrong to check against this FLAG in commit?
>
> Dear Yannick,
> Many thanks for your patch,
>
> Dear Mukesh,
> Many thanks for your comment,
>
> Looking deeper in the stm32 LTDC Ref man chapter, we can read:
>
> Bit 30 VSPOL: vertical synchronization polarity
> This bit is set and cleared by software.
> 0: vertical synchronization is active low.
> 1: vertical synchronization is active high.
>
> Bit 29 DEPOL: not data enable polarity
> This bit is set and cleared by software.
> 0: not data enable polarity is active low.
> 1: not data enable polarity is active high.
>
> So I suggest the following commit message:
> "According to the STM32 LTDC documentation, GCR_DEPOL bit need to be set
> with DISPLAY_FLAGS_DE_LOW but not with DISPLAY_FLAGS_DE_HIGH."
>
> With that or something similar
>
> Acked-by: Philippe Cornu <philippe.cornu@st.com>
>

Applied on drm-misc-next,
Thanks,
Benjamin

> Philippe :-)
>
>
> >>
> >> Signed-off-by: Yannick Fertré <yannick.fertre@st.com>
> >> ---
> >>    drivers/gpu/drm/stm/ltdc.c | 2 +-
> >>    1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/gpu/drm/stm/ltdc.c b/drivers/gpu/drm/stm/ltdc.c
> >> index b1741a9..6ba326a 100644
> >> --- a/drivers/gpu/drm/stm/ltdc.c
> >> +++ b/drivers/gpu/drm/stm/ltdc.c
> >> @@ -555,7 +555,7 @@ static void ltdc_crtc_mode_set_nofb(struct drm_crtc *crtc)
> >>      if (vm.flags & DISPLAY_FLAGS_VSYNC_HIGH)
> >>              val |= GCR_VSPOL;
> >>
> >> -    if (vm.flags & DISPLAY_FLAGS_DE_HIGH)
> >> +    if (vm.flags & DISPLAY_FLAGS_DE_LOW)
> >>              val |= GCR_DEPOL;
> >>
> >>      if (vm.flags & DISPLAY_FLAGS_PIXDATA_NEGEDGE)
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2019-04-24 12:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-29 15:50 [PATCH] drm/stm: ltdc: fix data enable polarity Yannick Fertré
2019-03-29 21:32 ` Mukesh Ojha
2019-03-29 21:32 ` Mukesh Ojha
2019-04-01  9:18   ` Philippe CORNU
2019-04-24 12:26     ` 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).