All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/3] Fix DECON_UPDATE for TV
       [not found] <CGME20170117141533eucas1p12ba7eccfffcea02414f325e9ca31ab04@eucas1p1.samsung.com>
@ 2017-01-17 14:15   ` Andrzej Hajda
  0 siblings, 0 replies; 12+ messages in thread
From: Andrzej Hajda @ 2017-01-17 14:15 UTC (permalink / raw)
  To: Inki Dae, dri-devel
  Cc: Andrzej Hajda, Bartlomiej Zolnierkiewicz, Marek Szyprowski, linux-kernel

Hi Inki,

This is my final fight with DECON_UPDATE issues (I hope). My two previous patches
fixed problems on panel path, this patchset fixes also TV path.
The root cause of all evil was in incorrect DECON_CMU programming.

Now it works correctly on:
- panel,
- TV,
- both.
I have not observed (so far) IOMMU faults, or vblank timeouts.

Regards
Andrzej


Andrzej Hajda (3):
  drm/exynos/decon5433: do not disable video after reset
  drm/exynos/decon5433: fix CMU programming
  drm/exynos/decon5433: set STANDALONE_UPDATE_F on output enablement

 drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

-- 
2.7.4

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

* [PATCH 0/3] Fix DECON_UPDATE for TV
@ 2017-01-17 14:15   ` Andrzej Hajda
  0 siblings, 0 replies; 12+ messages in thread
From: Andrzej Hajda @ 2017-01-17 14:15 UTC (permalink / raw)
  To: Inki Dae, dri-devel
  Cc: Marek Szyprowski, linux-kernel, Bartlomiej Zolnierkiewicz

Hi Inki,

This is my final fight with DECON_UPDATE issues (I hope). My two previous patches
fixed problems on panel path, this patchset fixes also TV path.
The root cause of all evil was in incorrect DECON_CMU programming.

Now it works correctly on:
- panel,
- TV,
- both.
I have not observed (so far) IOMMU faults, or vblank timeouts.

Regards
Andrzej


Andrzej Hajda (3):
  drm/exynos/decon5433: do not disable video after reset
  drm/exynos/decon5433: fix CMU programming
  drm/exynos/decon5433: set STANDALONE_UPDATE_F on output enablement

 drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)

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

* [PATCH 1/3] drm/exynos/decon5433: do not disable video after reset
       [not found]   ` <CGME20170117141533eucas1p2494854a3707ce9cfa78ef3d6030535df@eucas1p2.samsung.com>
@ 2017-01-17 14:15       ` Andrzej Hajda
  0 siblings, 0 replies; 12+ messages in thread
From: Andrzej Hajda @ 2017-01-17 14:15 UTC (permalink / raw)
  To: Inki Dae, dri-devel
  Cc: Andrzej Hajda, Bartlomiej Zolnierkiewicz, Marek Szyprowski, linux-kernel

decon_commit is called just after reset so video is disabled anyway.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
---
 drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
index 634cfd7..6fd2b11 100644
--- a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
+++ b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
@@ -158,8 +158,6 @@ static void decon_commit(struct exynos_drm_crtc *crtc)
 		m->crtc_vsync_end = m->crtc_vsync_start + 1;
 	}
 
-	decon_set_bits(ctx, DECON_VIDCON0, VIDCON0_ENVID, 0);
-
 	/* enable clock gate */
 	val = CMU_CLKGAGE_MODE_SFR_F | CMU_CLKGAGE_MODE_MEM_F;
 	writel(val, ctx->addr + DECON_CMU);
-- 
2.7.4

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

* [PATCH 1/3] drm/exynos/decon5433: do not disable video after reset
@ 2017-01-17 14:15       ` Andrzej Hajda
  0 siblings, 0 replies; 12+ messages in thread
From: Andrzej Hajda @ 2017-01-17 14:15 UTC (permalink / raw)
  To: Inki Dae, dri-devel
  Cc: Marek Szyprowski, linux-kernel, Bartlomiej Zolnierkiewicz

decon_commit is called just after reset so video is disabled anyway.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
---
 drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
index 634cfd7..6fd2b11 100644
--- a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
+++ b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
@@ -158,8 +158,6 @@ static void decon_commit(struct exynos_drm_crtc *crtc)
 		m->crtc_vsync_end = m->crtc_vsync_start + 1;
 	}
 
-	decon_set_bits(ctx, DECON_VIDCON0, VIDCON0_ENVID, 0);
-
 	/* enable clock gate */
 	val = CMU_CLKGAGE_MODE_SFR_F | CMU_CLKGAGE_MODE_MEM_F;
 	writel(val, ctx->addr + DECON_CMU);
-- 
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] 12+ messages in thread

* [PATCH 2/3] drm/exynos/decon5433: fix CMU programming
       [not found]   ` <CGME20170117141533eucas1p2cb0936d0fd1c1f8d338184e78879ff29@eucas1p2.samsung.com>
@ 2017-01-17 14:15       ` Andrzej Hajda
  0 siblings, 0 replies; 12+ messages in thread
From: Andrzej Hajda @ 2017-01-17 14:15 UTC (permalink / raw)
  To: Inki Dae, dri-devel
  Cc: Andrzej Hajda, Bartlomiej Zolnierkiewicz, Marek Szyprowski, linux-kernel

DECON_CMU register has reserved bits which should not be zeroed, otherwise
IP can behave strangely and cause IOMMU faults.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
---
 drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
index 6fd2b11..9f4d60d 100644
--- a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
+++ b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
@@ -158,10 +158,6 @@ static void decon_commit(struct exynos_drm_crtc *crtc)
 		m->crtc_vsync_end = m->crtc_vsync_start + 1;
 	}
 
-	/* enable clock gate */
-	val = CMU_CLKGAGE_MODE_SFR_F | CMU_CLKGAGE_MODE_MEM_F;
-	writel(val, ctx->addr + DECON_CMU);
-
 	decon_setup_trigger(ctx);
 
 	/* lcd on and use command if */
-- 
2.7.4

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

* [PATCH 2/3] drm/exynos/decon5433: fix CMU programming
@ 2017-01-17 14:15       ` Andrzej Hajda
  0 siblings, 0 replies; 12+ messages in thread
From: Andrzej Hajda @ 2017-01-17 14:15 UTC (permalink / raw)
  To: Inki Dae, dri-devel
  Cc: Marek Szyprowski, linux-kernel, Bartlomiej Zolnierkiewicz

DECON_CMU register has reserved bits which should not be zeroed, otherwise
IP can behave strangely and cause IOMMU faults.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
---
 drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 4 ----
 1 file changed, 4 deletions(-)

diff --git a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
index 6fd2b11..9f4d60d 100644
--- a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
+++ b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
@@ -158,10 +158,6 @@ static void decon_commit(struct exynos_drm_crtc *crtc)
 		m->crtc_vsync_end = m->crtc_vsync_start + 1;
 	}
 
-	/* enable clock gate */
-	val = CMU_CLKGAGE_MODE_SFR_F | CMU_CLKGAGE_MODE_MEM_F;
-	writel(val, ctx->addr + DECON_CMU);
-
 	decon_setup_trigger(ctx);
 
 	/* lcd on and use command if */
-- 
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] 12+ messages in thread

* [PATCH 3/3] drm/exynos/decon5433: set STANDALONE_UPDATE_F on output enablement
       [not found]   ` <CGME20170117141534eucas1p207911f635648506070e22d57ba045680@eucas1p2.samsung.com>
@ 2017-01-17 14:15       ` Andrzej Hajda
  0 siblings, 0 replies; 12+ messages in thread
From: Andrzej Hajda @ 2017-01-17 14:15 UTC (permalink / raw)
  To: Inki Dae, dri-devel
  Cc: Andrzej Hajda, Bartlomiej Zolnierkiewicz, Marek Szyprowski, linux-kernel

DECON_TV requires STANDALONE_UPDATE after output enabling, otherwise it does
not start. This change is neutral for DECON.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
---
 drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
index 9f4d60d..bcb190f 100644
--- a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
+++ b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
@@ -198,6 +198,8 @@ static void decon_commit(struct exynos_drm_crtc *crtc)
 
 	/* enable output and display signal */
 	decon_set_bits(ctx, DECON_VIDCON0, VIDCON0_ENVID | VIDCON0_ENVID_F, ~0);
+
+	decon_set_bits(ctx, DECON_UPDATE, STANDALONE_UPDATE_F, ~0);
 }
 
 static void decon_win_set_pixfmt(struct decon_context *ctx, unsigned int win,
-- 
2.7.4

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

* [PATCH 3/3] drm/exynos/decon5433: set STANDALONE_UPDATE_F on output enablement
@ 2017-01-17 14:15       ` Andrzej Hajda
  0 siblings, 0 replies; 12+ messages in thread
From: Andrzej Hajda @ 2017-01-17 14:15 UTC (permalink / raw)
  To: Inki Dae, dri-devel
  Cc: Marek Szyprowski, linux-kernel, Bartlomiej Zolnierkiewicz

DECON_TV requires STANDALONE_UPDATE after output enabling, otherwise it does
not start. This change is neutral for DECON.

Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
---
 drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
index 9f4d60d..bcb190f 100644
--- a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
+++ b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
@@ -198,6 +198,8 @@ static void decon_commit(struct exynos_drm_crtc *crtc)
 
 	/* enable output and display signal */
 	decon_set_bits(ctx, DECON_VIDCON0, VIDCON0_ENVID | VIDCON0_ENVID_F, ~0);
+
+	decon_set_bits(ctx, DECON_UPDATE, STANDALONE_UPDATE_F, ~0);
 }
 
 static void decon_win_set_pixfmt(struct decon_context *ctx, unsigned int win,
-- 
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] 12+ messages in thread

* Re: [PATCH 0/3] Fix DECON_UPDATE for TV
  2017-01-17 14:15   ` Andrzej Hajda
@ 2017-01-18  1:29     ` Inki Dae
  -1 siblings, 0 replies; 12+ messages in thread
From: Inki Dae @ 2017-01-18  1:29 UTC (permalink / raw)
  To: Andrzej Hajda, dri-devel
  Cc: Bartlomiej Zolnierkiewicz, Marek Szyprowski, linux-kernel

Hi Andrzej,

2017년 01월 17일 23:15에 Andrzej Hajda 이(가) 쓴 글:
> Hi Inki,
> 
> This is my final fight with DECON_UPDATE issues (I hope). My two previous patches
> fixed problems on panel path, this patchset fixes also TV path.
> The root cause of all evil was in incorrect DECON_CMU programming.
> 
> Now it works correctly on:
> - panel,
> - TV,
> - both.
> I have not observed (so far) IOMMU faults, or vblank timeouts.

Really thanks for this patch set. Will review and merge it. This patch set will go to -fixes.

Thanks.

> 
> Regards
> Andrzej
> 
> 
> Andrzej Hajda (3):
>   drm/exynos/decon5433: do not disable video after reset
>   drm/exynos/decon5433: fix CMU programming
>   drm/exynos/decon5433: set STANDALONE_UPDATE_F on output enablement
> 
>  drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 

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

* Re: [PATCH 0/3] Fix DECON_UPDATE for TV
@ 2017-01-18  1:29     ` Inki Dae
  0 siblings, 0 replies; 12+ messages in thread
From: Inki Dae @ 2017-01-18  1:29 UTC (permalink / raw)
  To: Andrzej Hajda, dri-devel
  Cc: Marek Szyprowski, linux-kernel, Bartlomiej Zolnierkiewicz

Hi Andrzej,

2017년 01월 17일 23:15에 Andrzej Hajda 이(가) 쓴 글:
> Hi Inki,
> 
> This is my final fight with DECON_UPDATE issues (I hope). My two previous patches
> fixed problems on panel path, this patchset fixes also TV path.
> The root cause of all evil was in incorrect DECON_CMU programming.
> 
> Now it works correctly on:
> - panel,
> - TV,
> - both.
> I have not observed (so far) IOMMU faults, or vblank timeouts.

Really thanks for this patch set. Will review and merge it. This patch set will go to -fixes.

Thanks.

> 
> Regards
> Andrzej
> 
> 
> Andrzej Hajda (3):
>   drm/exynos/decon5433: do not disable video after reset
>   drm/exynos/decon5433: fix CMU programming
>   drm/exynos/decon5433: set STANDALONE_UPDATE_F on output enablement
> 
>  drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 8 ++------
>  1 file changed, 2 insertions(+), 6 deletions(-)
> 
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 1/3] drm/exynos/decon5433: do not disable video after reset
  2017-01-17 14:15       ` Andrzej Hajda
@ 2017-01-20  7:56         ` Inki Dae
  -1 siblings, 0 replies; 12+ messages in thread
From: Inki Dae @ 2017-01-20  7:56 UTC (permalink / raw)
  To: Andrzej Hajda, dri-devel
  Cc: Bartlomiej Zolnierkiewicz, Marek Szyprowski, linux-kernel

Applied including other two patches.

Thanks.

2017년 01월 17일 23:15에 Andrzej Hajda 이(가) 쓴 글:
> decon_commit is called just after reset so video is disabled anyway.
> 
> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
> ---
>  drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
> index 634cfd7..6fd2b11 100644
> --- a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
> +++ b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
> @@ -158,8 +158,6 @@ static void decon_commit(struct exynos_drm_crtc *crtc)
>  		m->crtc_vsync_end = m->crtc_vsync_start + 1;
>  	}
>  
> -	decon_set_bits(ctx, DECON_VIDCON0, VIDCON0_ENVID, 0);
> -
>  	/* enable clock gate */
>  	val = CMU_CLKGAGE_MODE_SFR_F | CMU_CLKGAGE_MODE_MEM_F;
>  	writel(val, ctx->addr + DECON_CMU);
> 

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

* Re: [PATCH 1/3] drm/exynos/decon5433: do not disable video after reset
@ 2017-01-20  7:56         ` Inki Dae
  0 siblings, 0 replies; 12+ messages in thread
From: Inki Dae @ 2017-01-20  7:56 UTC (permalink / raw)
  To: Andrzej Hajda, dri-devel
  Cc: Marek Szyprowski, linux-kernel, Bartlomiej Zolnierkiewicz

Applied including other two patches.

Thanks.

2017년 01월 17일 23:15에 Andrzej Hajda 이(가) 쓴 글:
> decon_commit is called just after reset so video is disabled anyway.
> 
> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
> ---
>  drivers/gpu/drm/exynos/exynos5433_drm_decon.c | 2 --
>  1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
> index 634cfd7..6fd2b11 100644
> --- a/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
> +++ b/drivers/gpu/drm/exynos/exynos5433_drm_decon.c
> @@ -158,8 +158,6 @@ static void decon_commit(struct exynos_drm_crtc *crtc)
>  		m->crtc_vsync_end = m->crtc_vsync_start + 1;
>  	}
>  
> -	decon_set_bits(ctx, DECON_VIDCON0, VIDCON0_ENVID, 0);
> -
>  	/* enable clock gate */
>  	val = CMU_CLKGAGE_MODE_SFR_F | CMU_CLKGAGE_MODE_MEM_F;
>  	writel(val, ctx->addr + DECON_CMU);
> 
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2017-01-20  7:57 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20170117141533eucas1p12ba7eccfffcea02414f325e9ca31ab04@eucas1p1.samsung.com>
2017-01-17 14:15 ` [PATCH 0/3] Fix DECON_UPDATE for TV Andrzej Hajda
2017-01-17 14:15   ` Andrzej Hajda
     [not found]   ` <CGME20170117141533eucas1p2494854a3707ce9cfa78ef3d6030535df@eucas1p2.samsung.com>
2017-01-17 14:15     ` [PATCH 1/3] drm/exynos/decon5433: do not disable video after reset Andrzej Hajda
2017-01-17 14:15       ` Andrzej Hajda
2017-01-20  7:56       ` Inki Dae
2017-01-20  7:56         ` Inki Dae
     [not found]   ` <CGME20170117141533eucas1p2cb0936d0fd1c1f8d338184e78879ff29@eucas1p2.samsung.com>
2017-01-17 14:15     ` [PATCH 2/3] drm/exynos/decon5433: fix CMU programming Andrzej Hajda
2017-01-17 14:15       ` Andrzej Hajda
     [not found]   ` <CGME20170117141534eucas1p207911f635648506070e22d57ba045680@eucas1p2.samsung.com>
2017-01-17 14:15     ` [PATCH 3/3] drm/exynos/decon5433: set STANDALONE_UPDATE_F on output enablement Andrzej Hajda
2017-01-17 14:15       ` Andrzej Hajda
2017-01-18  1:29   ` [PATCH 0/3] Fix DECON_UPDATE for TV Inki Dae
2017-01-18  1:29     ` Inki Dae

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.