public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH 1/1] drm/imx/ipuv-v3: Fix front porch adjustment upon hactive aligning
@ 2023-05-03 11:14 Alexander Stein
  2023-06-13 14:07 ` Ian Ray
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Alexander Stein @ 2023-05-03 11:14 UTC (permalink / raw)
  To: Philipp Zabel, David Airlie, Daniel Vetter, Shawn Guo,
	Sascha Hauer, Fabio Estevam, Sebastian Reichel
  Cc: Alexander Stein, Pengutronix Kernel Team, NXP Linux Team,
	dri-devel, linux-arm-kernel

When hactive is not aligned to 8 pixels, it is aligned accordingly and
hfront porch needs to be reduced the same amount. Unfortunately the front
porch is set to the difference rather than reducing it. There are some
Samsung TVs which can't cope with a front porch of instead of 70.

Fixes: 94dfec48fca7 ("drm/imx: Add 8 pixel alignment fix")
Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
---
AFAICS ipu_di_adjust_videomode() checks that front porch is big enough to
reduce the alignment difference.

 drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.c b/drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.c
index 1d306f7be9fd..341e9125bf2c 100644
--- a/drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.c
+++ b/drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.c
@@ -311,7 +311,7 @@ static void ipu_crtc_mode_set_nofb(struct drm_crtc *crtc)
 			 sig_cfg.mode.hactive, new_hactive);
 
 		dev_info(ipu_crtc->dev, "hfront_porch: %u\n", sig_cfg.mode.hfront_porch);
-		sig_cfg.mode.hfront_porch = new_hactive - sig_cfg.mode.hactive;
+		sig_cfg.mode.hfront_porch -= new_hactive - sig_cfg.mode.hactive;
 		dev_info(ipu_crtc->dev, "hfront_porch: %u\n", sig_cfg.mode.hfront_porch);
 		sig_cfg.mode.hactive = new_hactive;
 	}
-- 
2.34.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH 1/1] drm/imx/ipuv-v3: Fix front porch adjustment upon hactive aligning
  2023-05-03 11:14 [PATCH 1/1] drm/imx/ipuv-v3: Fix front porch adjustment upon hactive aligning Alexander Stein
@ 2023-06-13 14:07 ` Ian Ray
  2023-07-21  8:36 ` Alexander Stein
  2023-07-28 14:47 ` Philipp Zabel
  2 siblings, 0 replies; 5+ messages in thread
From: Ian Ray @ 2023-06-13 14:07 UTC (permalink / raw)
  To: Alexander Stein
  Cc: Philipp Zabel, David Airlie, Daniel Vetter, Shawn Guo,
	Sascha Hauer, Fabio Estevam, Sebastian Reichel, dri-devel,
	NXP Linux Team, Pengutronix Kernel Team, linux-arm-kernel

On Wed, May 03, 2023 at 01:14:56PM +0200, Alexander Stein wrote:
> When hactive is not aligned to 8 pixels, it is aligned accordingly and
> hfront porch needs to be reduced the same amount. Unfortunately the front
> porch is set to the difference rather than reducing it. There are some
> Samsung TVs which can't cope with a front porch of instead of 70.
> 
> Fixes: 94dfec48fca7 ("drm/imx: Add 8 pixel alignment fix")
> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>

Tested on the same 1366x768 display hardware that required the original                                                                                                                                                                                                         
fix in commit 94dfec48fca7.                                                                                                                                                                                                                                                     
                                                                                                                                                                                                                                                                                
Tested-by: Ian Ray <ian.ray@ge.com>                                                                                                                                                                                                                                             


> ---
> AFAICS ipu_di_adjust_videomode() checks that front porch is big enough to
> reduce the alignment difference.
> 
>  drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.c b/drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.c
> index 1d306f7be9fd..341e9125bf2c 100644
> --- a/drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.c
> +++ b/drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.c
> @@ -311,7 +311,7 @@ static void ipu_crtc_mode_set_nofb(struct drm_crtc *crtc)
>                          sig_cfg.mode.hactive, new_hactive);
>  
>                 dev_info(ipu_crtc->dev, "hfront_porch: %u\n", sig_cfg.mode.hfront_porch);
> -               sig_cfg.mode.hfront_porch = new_hactive - sig_cfg.mode.hactive;
> +               sig_cfg.mode.hfront_porch -= new_hactive - sig_cfg.mode.hactive;
>                 dev_info(ipu_crtc->dev, "hfront_porch: %u\n", sig_cfg.mode.hfront_porch);
>                 sig_cfg.mode.hactive = new_hactive;
>         }
> -- 
> 2.34.1
> 

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

* Re: [PATCH 1/1] drm/imx/ipuv-v3: Fix front porch adjustment upon hactive aligning
  2023-05-03 11:14 [PATCH 1/1] drm/imx/ipuv-v3: Fix front porch adjustment upon hactive aligning Alexander Stein
  2023-06-13 14:07 ` Ian Ray
@ 2023-07-21  8:36 ` Alexander Stein
  2023-07-28 15:31   ` Philipp Zabel
  2023-07-28 14:47 ` Philipp Zabel
  2 siblings, 1 reply; 5+ messages in thread
From: Alexander Stein @ 2023-07-21  8:36 UTC (permalink / raw)
  To: Philipp Zabel, David Airlie, Daniel Vetter, Shawn Guo,
	Sascha Hauer, Fabio Estevam, Sebastian Reichel
  Cc: Pengutronix Kernel Team, NXP Linux Team, dri-devel,
	linux-arm-kernel

Hi,

Am Mittwoch, 3. Mai 2023, 13:14:56 CEST schrieb Alexander Stein:
> When hactive is not aligned to 8 pixels, it is aligned accordingly and
> hfront porch needs to be reduced the same amount. Unfortunately the front
> porch is set to the difference rather than reducing it. There are some
> Samsung TVs which can't cope with a front porch of instead of 70.
> 
> Fixes: 94dfec48fca7 ("drm/imx: Add 8 pixel alignment fix")
> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> ---
> AFAICS ipu_di_adjust_videomode() checks that front porch is big enough to
> reduce the alignment difference.

A gentle ping. Is there anything to do? Or is someone picking this patch was 
tested by Ian?

Best regards,
Alexander

>  drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.c
> b/drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.c index 1d306f7be9fd..341e9125bf2c
> 100644
> --- a/drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.c
> +++ b/drivers/gpu/drm/imx/ipuv3/ipuv3-crtc.c
> @@ -311,7 +311,7 @@ static void ipu_crtc_mode_set_nofb(struct drm_crtc
> *crtc) sig_cfg.mode.hactive, new_hactive);
> 
>  		dev_info(ipu_crtc->dev, "hfront_porch: %u\n", 
sig_cfg.mode.hfront_porch);
> -		sig_cfg.mode.hfront_porch = new_hactive - 
sig_cfg.mode.hactive;
> +		sig_cfg.mode.hfront_porch -= new_hactive - 
sig_cfg.mode.hactive;
> dev_info(ipu_crtc->dev, "hfront_porch: %u\n", sig_cfg.mode.hfront_porch);
> sig_cfg.mode.hactive = new_hactive;
>  	}


-- 
TQ-Systems GmbH | Mühlstraße 2, Gut Delling | 82229 Seefeld, Germany
Amtsgericht München, HRB 105018
Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
http://www.tq-group.com/



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

* Re: [PATCH 1/1] drm/imx/ipuv-v3: Fix front porch adjustment upon hactive aligning
  2023-05-03 11:14 [PATCH 1/1] drm/imx/ipuv-v3: Fix front porch adjustment upon hactive aligning Alexander Stein
  2023-06-13 14:07 ` Ian Ray
  2023-07-21  8:36 ` Alexander Stein
@ 2023-07-28 14:47 ` Philipp Zabel
  2 siblings, 0 replies; 5+ messages in thread
From: Philipp Zabel @ 2023-07-28 14:47 UTC (permalink / raw)
  To: Alexander Stein, David Airlie, Daniel Vetter, Shawn Guo,
	Sascha Hauer, Fabio Estevam, Sebastian Reichel
  Cc: Pengutronix Kernel Team, NXP Linux Team, dri-devel,
	linux-arm-kernel

On Mi, 2023-05-03 at 13:14 +0200, Alexander Stein wrote:
> When hactive is not aligned to 8 pixels, it is aligned accordingly and
> hfront porch needs to be reduced the same amount. Unfortunately the front
> porch is set to the difference rather than reducing it. There are some
> Samsung TVs which can't cope with a front porch of instead of 70.
> 
> Fixes: 94dfec48fca7 ("drm/imx: Add 8 pixel alignment fix")
> Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>

Reviewed-by: Philipp Zabel <p.zabel@pengutronix.de>

regards
Philipp

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

* Re: [PATCH 1/1] drm/imx/ipuv-v3: Fix front porch adjustment upon hactive aligning
  2023-07-21  8:36 ` Alexander Stein
@ 2023-07-28 15:31   ` Philipp Zabel
  0 siblings, 0 replies; 5+ messages in thread
From: Philipp Zabel @ 2023-07-28 15:31 UTC (permalink / raw)
  To: Alexander Stein, David Airlie, Daniel Vetter, Shawn Guo,
	Sascha Hauer, Fabio Estevam, Sebastian Reichel
  Cc: Pengutronix Kernel Team, NXP Linux Team, dri-devel,
	linux-arm-kernel

On Fr, 2023-07-21 at 10:36 +0200, Alexander Stein wrote:
> Hi,
> 
> Am Mittwoch, 3. Mai 2023, 13:14:56 CEST schrieb Alexander Stein:
> > When hactive is not aligned to 8 pixels, it is aligned accordingly and
> > hfront porch needs to be reduced the same amount. Unfortunately the front
> > porch is set to the difference rather than reducing it. There are some
> > Samsung TVs which can't cope with a front porch of instead of 70.
> > 
> > Fixes: 94dfec48fca7 ("drm/imx: Add 8 pixel alignment fix")
> > Signed-off-by: Alexander Stein <alexander.stein@ew.tq-group.com>
> > ---
> > AFAICS ipu_di_adjust_videomode() checks that front porch is big enough to
> > reduce the alignment difference.
> 
> A gentle ping. Is there anything to do? Or is someone picking this patch was 
> tested by Ian?

Thank you, pushed to drm-misc-fixes with the subject changed to:
"drm/imx/ipuv3: Fix front porch adjustment upon hactive aligning".

regards
Philipp

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

end of thread, other threads:[~2023-07-28 15:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-03 11:14 [PATCH 1/1] drm/imx/ipuv-v3: Fix front porch adjustment upon hactive aligning Alexander Stein
2023-06-13 14:07 ` Ian Ray
2023-07-21  8:36 ` Alexander Stein
2023-07-28 15:31   ` Philipp Zabel
2023-07-28 14:47 ` Philipp Zabel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox