All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] drm/vc4: Correct lbm size and calculation
@ 2021-01-21 10:57 Maxime Ripard
  2021-01-21 10:57 ` [PATCH 2/2] drm/vc4: Correct POS1_SCL for hvs5 Maxime Ripard
                   ` (2 more replies)
  0 siblings, 3 replies; 11+ messages in thread
From: Maxime Ripard @ 2021-01-21 10:57 UTC (permalink / raw)
  To: dri-devel
  Cc: Dom Cobley, Ryutaroh Matsumoto, Lucas Nussbaum, Maxime Ripard,
	Dave Stevenson

From: Dom Cobley <popcornmix@gmail.com>

LBM base address is measured in units of pixels per cycle.
That is 4 for 2711 (hvs5) and 2 for 2708.

We are wasting 75% of lbm by indexing without the scaling.
But we were also using too high a size for the lbm resulting
in partial corruption (right hand side) of vertically
scaled images, usually at 4K or lower resolutions with more layers.

The physical RAM of LBM on 2711 is 8 * 1920 * 16 * 12-bit
(pixels are stored 12-bits per component regardless of format).

The LBM adress indexes work in units of pixels per clock,
so for 4 pixels per clock that means we have 32 * 1920 = 60K

Fixes: c54619b0bfb3 ("drm/vc4: Add support for the BCM2711 HVS5")
Signed-off-by: Dom Cobley <popcornmix@gmail.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
---
 drivers/gpu/drm/vc4/vc4_hvs.c   | 8 ++++----
 drivers/gpu/drm/vc4/vc4_plane.c | 7 ++++++-
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/vc4/vc4_hvs.c b/drivers/gpu/drm/vc4/vc4_hvs.c
index 2b3a597fa65f..c239045e05d6 100644
--- a/drivers/gpu/drm/vc4/vc4_hvs.c
+++ b/drivers/gpu/drm/vc4/vc4_hvs.c
@@ -622,11 +622,11 @@ static int vc4_hvs_bind(struct device *dev, struct device *master, void *data)
 	 * for now we just allocate globally.
 	 */
 	if (!hvs->hvs5)
-		/* 96kB */
-		drm_mm_init(&hvs->lbm_mm, 0, 96 * 1024);
+		/* 48k words of 2x12-bit pixels */
+		drm_mm_init(&hvs->lbm_mm, 0, 48 * 1024);
 	else
-		/* 70k words */
-		drm_mm_init(&hvs->lbm_mm, 0, 70 * 2 * 1024);
+		/* 60k words of 4x12-bit pixels */
+		drm_mm_init(&hvs->lbm_mm, 0, 60 * 1024);
 
 	/* Upload filter kernels.  We only have the one for now, so we
 	 * keep it around for the lifetime of the driver.
diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c
index 6bd8260aa9f2..b98eabb52920 100644
--- a/drivers/gpu/drm/vc4/vc4_plane.c
+++ b/drivers/gpu/drm/vc4/vc4_plane.c
@@ -437,6 +437,7 @@ static void vc4_write_ppf(struct vc4_plane_state *vc4_state, u32 src, u32 dst)
 static u32 vc4_lbm_size(struct drm_plane_state *state)
 {
 	struct vc4_plane_state *vc4_state = to_vc4_plane_state(state);
+	struct vc4_dev *vc4 = to_vc4_dev(state->plane->dev);
 	u32 pix_per_line;
 	u32 lbm;
 
@@ -472,7 +473,11 @@ static u32 vc4_lbm_size(struct drm_plane_state *state)
 		lbm = pix_per_line * 16;
 	}
 
-	lbm = roundup(lbm, 32);
+	/* Align it to 64 or 128 (hvs5) bytes */
+	lbm = roundup(lbm, vc4->hvs->hvs5 ? 128 : 64);
+
+	/* Each "word" of the LBM memory contains 2 or 4 (hvs5) pixels */
+	lbm /= vc4->hvs->hvs5 ? 4 : 2;
 
 	return lbm;
 }
-- 
2.29.2

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

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

* [PATCH 2/2] drm/vc4: Correct POS1_SCL for hvs5
  2021-01-21 10:57 [PATCH 1/2] drm/vc4: Correct lbm size and calculation Maxime Ripard
@ 2021-01-21 10:57 ` Maxime Ripard
  2021-01-22 10:14   ` Dave Stevenson
  2021-01-23  8:05   ` Lucas Nussbaum
  2021-01-21 11:04 ` [PATCH 1/2] drm/vc4: Correct lbm size and calculation Maxime Ripard
  2021-01-22 10:12 ` Dave Stevenson
  2 siblings, 2 replies; 11+ messages in thread
From: Maxime Ripard @ 2021-01-21 10:57 UTC (permalink / raw)
  To: dri-devel
  Cc: Dom Cobley, Ryutaroh Matsumoto, Lucas Nussbaum, Maxime Ripard,
	Dave Stevenson

From: Dom Cobley <popcornmix@gmail.com>

Fixes failure with 4096x1080 resolutions

[  284.315379] WARNING: CPU: 1 PID: 901 at drivers/gpu/drm/vc4/vc4_plane.c:981 vc4_plane_mode_set+0x1374/0x13c4
[  284.315385] Modules linked in: ir_rc5_decoder rpivid_hevc(C) bcm2835_codec(C) bcm2835_isp(C) bcm2835_mmal_vchiq(C) bcm2835_gpiomem v4l2_mem2mem videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 videobuf2_common videodev mc cdc_acm xpad ir_rc6_decoder rc_rc6_mce gpio_ir_recv fuse
[  284.315509] CPU: 1 PID: 901 Comm: kodi.bin Tainted: G         C        5.10.7 #1
[  284.315514] Hardware name: BCM2711
[  284.315518] Backtrace:
[  284.315533] [<c0cc5ca0>] (dump_backtrace) from [<c0cc6014>] (show_stack+0x20/0x24)
[  284.315540]  r7:ffffffff r6:00000000 r5:68000013 r4:c18ecf1c
[  284.315549] [<c0cc5ff4>] (show_stack) from [<c0cca638>] (dump_stack+0xc4/0xf0)
[  284.315558] [<c0cca574>] (dump_stack) from [<c022314c>] (__warn+0xfc/0x158)
[  284.315564]  r9:00000000 r8:00000009 r7:000003d5 r6:00000009 r5:c08cc7dc r4:c0fd09b8
[  284.315572] [<c0223050>] (__warn) from [<c0cc67ec>] (warn_slowpath_fmt+0x74/0xe4)
[  284.315577]  r7:c08cc7dc r6:000003d5 r5:c0fd09b8 r4:00000000
[  284.315584] [<c0cc677c>] (warn_slowpath_fmt) from [<c08cc7dc>] (vc4_plane_mode_set+0x1374/0x13c4)
[  284.315589]  r8:00000000 r7:00000000 r6:00001000 r5:c404c600 r4:c2e34600
[  284.315596] [<c08cb468>] (vc4_plane_mode_set) from [<c08cc984>] (vc4_plane_atomic_check+0x40/0x1c0)
[  284.315601]  r10:00000001 r9:c2e34600 r8:c0e67068 r7:c0fc44e0 r6:c2ce3640 r5:c3d636c0
[  284.315605]  r4:c2e34600
[  284.315614] [<c08cc944>] (vc4_plane_atomic_check) from [<c0860504>] (drm_atomic_helper_check_planes+0xec/0x1ec)
[  284.315620]  r9:c2e34600 r8:c0e67068 r7:c0fc44e0 r6:c2ce3640 r5:c3d636c0 r4:00000006
[  284.315627] [<c0860418>] (drm_atomic_helper_check_planes) from [<c0860658>] (drm_atomic_helper_check+0x54/0x9c)
[  284.315633]  r9:c2e35400 r8:00000006 r7:00000000 r6:c2ba7800 r5:c3d636c0 r4:00000000
[  284.315641] [<c0860604>] (drm_atomic_helper_check) from [<c08b7ca8>] (vc4_atomic_check+0x25c/0x454)
[  284.315645]  r7:00000000 r6:c2ba7800 r5:00000001 r4:c3d636c0
[  284.315652] [<c08b7a4c>] (vc4_atomic_check) from [<c0881278>] (drm_atomic_check_only+0x5cc/0x7e0)
[  284.315658]  r10:c404c6c8 r9:ffffffff r8:c472c480 r7:00000003 r6:c3d636c0 r5:00000000
[  284.315662]  r4:0000003c r3:c08b7a4c
[  284.315670] [<c0880cac>] (drm_atomic_check_only) from [<c089ba60>] (drm_mode_atomic_ioctl+0x758/0xa7c)
[  284.315675]  r10:c3d46000 r9:c3d636c0 r8:c2ce8a70 r7:027e3a54 r6:00000043 r5:c1fbb800
[  284.315679]  r4:0281a858
[  284.315688] [<c089b308>] (drm_mode_atomic_ioctl) from [<c086e9f8>] (drm_ioctl_kernel+0xc4/0x108)
[  284.315693]  r10:c03864bc r9:c1fbb800 r8:c3d47e64 r7:c089b308 r6:00000002 r5:c2ba7800
[  284.315697]  r4:00000000
[  284.315705] [<c086e934>] (drm_ioctl_kernel) from [<c086ee28>] (drm_ioctl+0x1e8/0x3a0)
[  284.315711]  r9:c1fbb800 r8:000000bc r7:c3d47e64 r6:00000038 r5:c0e59570 r4:00000038
[  284.315719] [<c086ec40>] (drm_ioctl) from [<c041f354>] (sys_ioctl+0x35c/0x914)
[  284.315724]  r10:c2d08200 r9:00000000 r8:c36fa300 r7:befdd870 r6:c03864bc r5:c36fa301
[  284.315728]  r4:c03864bc
[  284.315735] [<c041eff8>] (sys_ioctl) from [<c0200040>] (ret_fast_syscall+0x0/0x28)
[  284.315739] Exception stack(0xc3d47fa8 to 0xc3d47ff0)
[  284.315745] 7fa0:                   027eb750 befdd870 00000000 c03864bc befdd870 00000000
[  284.315750] 7fc0: 027eb750 befdd870 c03864bc 00000036 027e3948 0281a640 0281a850 027e3a50
[  284.315756] 7fe0: b4b64100 befdd844 b4b5ba2c b49c994c
[  284.315762]  r10:00000036 r9:c3d46000 r8:c0200204 r7:00000036 r6:c03864bc r5:befdd870
[  284.315765]  r4:027eb750

Fixes: c54619b0bfb3 ("drm/vc4: Add support for the BCM2711 HVS5")
Signed-off-by: Dom Cobley <popcornmix@gmail.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
---
 drivers/gpu/drm/vc4/vc4_plane.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c
index b98eabb52920..8c55679cbaef 100644
--- a/drivers/gpu/drm/vc4/vc4_plane.c
+++ b/drivers/gpu/drm/vc4/vc4_plane.c
@@ -917,9 +917,9 @@ static int vc4_plane_mode_set(struct drm_plane *plane,
 		if (!vc4_state->is_unity) {
 			vc4_dlist_write(vc4_state,
 					VC4_SET_FIELD(vc4_state->crtc_w,
-						      SCALER_POS1_SCL_WIDTH) |
+						      SCALER5_POS1_SCL_WIDTH) |
 					VC4_SET_FIELD(vc4_state->crtc_h,
-						      SCALER_POS1_SCL_HEIGHT));
+						      SCALER5_POS1_SCL_HEIGHT));
 		}
 
 		/* Position Word 2: Source Image Size */
-- 
2.29.2

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

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

* Re: [PATCH 1/2] drm/vc4: Correct lbm size and calculation
  2021-01-21 10:57 [PATCH 1/2] drm/vc4: Correct lbm size and calculation Maxime Ripard
  2021-01-21 10:57 ` [PATCH 2/2] drm/vc4: Correct POS1_SCL for hvs5 Maxime Ripard
@ 2021-01-21 11:04 ` Maxime Ripard
  2021-01-21 16:26   ` Lucas Nussbaum
  2021-01-22 10:12 ` Dave Stevenson
  2 siblings, 1 reply; 11+ messages in thread
From: Maxime Ripard @ 2021-01-21 11:04 UTC (permalink / raw)
  To: Lucas Nussbaum, Ryutaroh Matsumoto; +Cc: Dom Cobley, dri-devel, Dave Stevenson


[-- Attachment #1.1: Type: text/plain, Size: 1042 bytes --]

Hi Lucas, Ryutaroh,

On Thu, Jan 21, 2021 at 11:57:58AM +0100, Maxime Ripard wrote:
> From: Dom Cobley <popcornmix@gmail.com>
> 
> LBM base address is measured in units of pixels per cycle.
> That is 4 for 2711 (hvs5) and 2 for 2708.
> 
> We are wasting 75% of lbm by indexing without the scaling.
> But we were also using too high a size for the lbm resulting
> in partial corruption (right hand side) of vertically
> scaled images, usually at 4K or lower resolutions with more layers.
> 
> The physical RAM of LBM on 2711 is 8 * 1920 * 16 * 12-bit
> (pixels are stored 12-bits per component regardless of format).
> 
> The LBM adress indexes work in units of pixels per clock,
> so for 4 pixels per clock that means we have 32 * 1920 = 60K
> 
> Fixes: c54619b0bfb3 ("drm/vc4: Add support for the BCM2711 HVS5")
> Signed-off-by: Dom Cobley <popcornmix@gmail.com>
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>

This one should fix your issue

Feel free to test it and let me know if it's not the case

Maxime

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

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

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

* Re: [PATCH 1/2] drm/vc4: Correct lbm size and calculation
  2021-01-21 11:04 ` [PATCH 1/2] drm/vc4: Correct lbm size and calculation Maxime Ripard
@ 2021-01-21 16:26   ` Lucas Nussbaum
  2021-01-22  5:11     ` Ryutaroh Matsumoto
  2021-01-22 10:54     ` Maxime Ripard
  0 siblings, 2 replies; 11+ messages in thread
From: Lucas Nussbaum @ 2021-01-21 16:26 UTC (permalink / raw)
  To: Maxime Ripard; +Cc: Dom Cobley, Dave Stevenson, dri-devel, Ryutaroh Matsumoto


[-- Attachment #1.1: Type: text/plain, Size: 1226 bytes --]

Hi Maxime,

On 21/01/21 at 12:04 +0100, Maxime Ripard wrote:
> Hi Lucas, Ryutaroh,
> 
> On Thu, Jan 21, 2021 at 11:57:58AM +0100, Maxime Ripard wrote:
> > From: Dom Cobley <popcornmix@gmail.com>
> > 
> > LBM base address is measured in units of pixels per cycle.
> > That is 4 for 2711 (hvs5) and 2 for 2708.
> > 
> > We are wasting 75% of lbm by indexing without the scaling.
> > But we were also using too high a size for the lbm resulting
> > in partial corruption (right hand side) of vertically
> > scaled images, usually at 4K or lower resolutions with more layers.
> > 
> > The physical RAM of LBM on 2711 is 8 * 1920 * 16 * 12-bit
> > (pixels are stored 12-bits per component regardless of format).
> > 
> > The LBM adress indexes work in units of pixels per clock,
> > so for 4 pixels per clock that means we have 32 * 1920 = 60K
> > 
> > Fixes: c54619b0bfb3 ("drm/vc4: Add support for the BCM2711 HVS5")
> > Signed-off-by: Dom Cobley <popcornmix@gmail.com>
> > Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> 
> This one should fix your issue
> 
> Feel free to test it and let me know if it's not the case

I confirm that the patches fix the issue I was seeing.

Thanks!

Lucas

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

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

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

* Re: [PATCH 1/2] drm/vc4: Correct lbm size and calculation
  2021-01-21 16:26   ` Lucas Nussbaum
@ 2021-01-22  5:11     ` Ryutaroh Matsumoto
  2021-01-22 10:54     ` Maxime Ripard
  1 sibling, 0 replies; 11+ messages in thread
From: Ryutaroh Matsumoto @ 2021-01-22  5:11 UTC (permalink / raw)
  To: lucas; +Cc: popcornmix, maxime, dri-devel, dave.stevenson

Hi Maxime,

>> This one should fix your issue
>> Feel free to test it and let me know if it's not the case
> I confirm that the patches fix the issue I was seeing.

I also applied the sent patches
[PATCH 1/2] drm/vc4: Correct lbm size and calculation
[PATCH 2/2] drm/vc4: Correct POS1_SCL for hvs5
to the 5.10.9 kernel, and the symptom disappeared on my Raspberry Pi 4B 8GB.

Thank you very much! Ryutaroh
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 1/2] drm/vc4: Correct lbm size and calculation
  2021-01-21 10:57 [PATCH 1/2] drm/vc4: Correct lbm size and calculation Maxime Ripard
  2021-01-21 10:57 ` [PATCH 2/2] drm/vc4: Correct POS1_SCL for hvs5 Maxime Ripard
  2021-01-21 11:04 ` [PATCH 1/2] drm/vc4: Correct lbm size and calculation Maxime Ripard
@ 2021-01-22 10:12 ` Dave Stevenson
  2 siblings, 0 replies; 11+ messages in thread
From: Dave Stevenson @ 2021-01-22 10:12 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Dom Cobley, Lucas Nussbaum, DRI Development, Ryutaroh Matsumoto

Hi Maxime

On Thu, 21 Jan 2021 at 10:58, Maxime Ripard <maxime@cerno.tech> wrote:
>
> From: Dom Cobley <popcornmix@gmail.com>
>
> LBM base address is measured in units of pixels per cycle.
> That is 4 for 2711 (hvs5) and 2 for 2708.
>
> We are wasting 75% of lbm by indexing without the scaling.
> But we were also using too high a size for the lbm resulting
> in partial corruption (right hand side) of vertically
> scaled images, usually at 4K or lower resolutions with more layers.
>
> The physical RAM of LBM on 2711 is 8 * 1920 * 16 * 12-bit
> (pixels are stored 12-bits per component regardless of format).
>
> The LBM adress indexes work in units of pixels per clock,
> so for 4 pixels per clock that means we have 32 * 1920 = 60K
>
> Fixes: c54619b0bfb3 ("drm/vc4: Add support for the BCM2711 HVS5")
> Signed-off-by: Dom Cobley <popcornmix@gmail.com>
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>

Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>

> ---
>  drivers/gpu/drm/vc4/vc4_hvs.c   | 8 ++++----
>  drivers/gpu/drm/vc4/vc4_plane.c | 7 ++++++-
>  2 files changed, 10 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/gpu/drm/vc4/vc4_hvs.c b/drivers/gpu/drm/vc4/vc4_hvs.c
> index 2b3a597fa65f..c239045e05d6 100644
> --- a/drivers/gpu/drm/vc4/vc4_hvs.c
> +++ b/drivers/gpu/drm/vc4/vc4_hvs.c
> @@ -622,11 +622,11 @@ static int vc4_hvs_bind(struct device *dev, struct device *master, void *data)
>          * for now we just allocate globally.
>          */
>         if (!hvs->hvs5)
> -               /* 96kB */
> -               drm_mm_init(&hvs->lbm_mm, 0, 96 * 1024);
> +               /* 48k words of 2x12-bit pixels */
> +               drm_mm_init(&hvs->lbm_mm, 0, 48 * 1024);
>         else
> -               /* 70k words */
> -               drm_mm_init(&hvs->lbm_mm, 0, 70 * 2 * 1024);
> +               /* 60k words of 4x12-bit pixels */
> +               drm_mm_init(&hvs->lbm_mm, 0, 60 * 1024);
>
>         /* Upload filter kernels.  We only have the one for now, so we
>          * keep it around for the lifetime of the driver.
> diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c
> index 6bd8260aa9f2..b98eabb52920 100644
> --- a/drivers/gpu/drm/vc4/vc4_plane.c
> +++ b/drivers/gpu/drm/vc4/vc4_plane.c
> @@ -437,6 +437,7 @@ static void vc4_write_ppf(struct vc4_plane_state *vc4_state, u32 src, u32 dst)
>  static u32 vc4_lbm_size(struct drm_plane_state *state)
>  {
>         struct vc4_plane_state *vc4_state = to_vc4_plane_state(state);
> +       struct vc4_dev *vc4 = to_vc4_dev(state->plane->dev);
>         u32 pix_per_line;
>         u32 lbm;
>
> @@ -472,7 +473,11 @@ static u32 vc4_lbm_size(struct drm_plane_state *state)
>                 lbm = pix_per_line * 16;
>         }
>
> -       lbm = roundup(lbm, 32);
> +       /* Align it to 64 or 128 (hvs5) bytes */
> +       lbm = roundup(lbm, vc4->hvs->hvs5 ? 128 : 64);
> +
> +       /* Each "word" of the LBM memory contains 2 or 4 (hvs5) pixels */
> +       lbm /= vc4->hvs->hvs5 ? 4 : 2;
>
>         return lbm;
>  }
> --
> 2.29.2
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 2/2] drm/vc4: Correct POS1_SCL for hvs5
  2021-01-21 10:57 ` [PATCH 2/2] drm/vc4: Correct POS1_SCL for hvs5 Maxime Ripard
@ 2021-01-22 10:14   ` Dave Stevenson
  2021-01-23  8:05   ` Lucas Nussbaum
  1 sibling, 0 replies; 11+ messages in thread
From: Dave Stevenson @ 2021-01-22 10:14 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Dom Cobley, Lucas Nussbaum, DRI Development, Ryutaroh Matsumoto

Hi Maxime.

On Thu, 21 Jan 2021 at 10:58, Maxime Ripard <maxime@cerno.tech> wrote:
>
> From: Dom Cobley <popcornmix@gmail.com>
>
> Fixes failure with 4096x1080 resolutions
>
> [  284.315379] WARNING: CPU: 1 PID: 901 at drivers/gpu/drm/vc4/vc4_plane.c:981 vc4_plane_mode_set+0x1374/0x13c4
> [  284.315385] Modules linked in: ir_rc5_decoder rpivid_hevc(C) bcm2835_codec(C) bcm2835_isp(C) bcm2835_mmal_vchiq(C) bcm2835_gpiomem v4l2_mem2mem videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 videobuf2_common videodev mc cdc_acm xpad ir_rc6_decoder rc_rc6_mce gpio_ir_recv fuse
> [  284.315509] CPU: 1 PID: 901 Comm: kodi.bin Tainted: G         C        5.10.7 #1
> [  284.315514] Hardware name: BCM2711
> [  284.315518] Backtrace:
> [  284.315533] [<c0cc5ca0>] (dump_backtrace) from [<c0cc6014>] (show_stack+0x20/0x24)
> [  284.315540]  r7:ffffffff r6:00000000 r5:68000013 r4:c18ecf1c
> [  284.315549] [<c0cc5ff4>] (show_stack) from [<c0cca638>] (dump_stack+0xc4/0xf0)
> [  284.315558] [<c0cca574>] (dump_stack) from [<c022314c>] (__warn+0xfc/0x158)
> [  284.315564]  r9:00000000 r8:00000009 r7:000003d5 r6:00000009 r5:c08cc7dc r4:c0fd09b8
> [  284.315572] [<c0223050>] (__warn) from [<c0cc67ec>] (warn_slowpath_fmt+0x74/0xe4)
> [  284.315577]  r7:c08cc7dc r6:000003d5 r5:c0fd09b8 r4:00000000
> [  284.315584] [<c0cc677c>] (warn_slowpath_fmt) from [<c08cc7dc>] (vc4_plane_mode_set+0x1374/0x13c4)
> [  284.315589]  r8:00000000 r7:00000000 r6:00001000 r5:c404c600 r4:c2e34600
> [  284.315596] [<c08cb468>] (vc4_plane_mode_set) from [<c08cc984>] (vc4_plane_atomic_check+0x40/0x1c0)
> [  284.315601]  r10:00000001 r9:c2e34600 r8:c0e67068 r7:c0fc44e0 r6:c2ce3640 r5:c3d636c0
> [  284.315605]  r4:c2e34600
> [  284.315614] [<c08cc944>] (vc4_plane_atomic_check) from [<c0860504>] (drm_atomic_helper_check_planes+0xec/0x1ec)
> [  284.315620]  r9:c2e34600 r8:c0e67068 r7:c0fc44e0 r6:c2ce3640 r5:c3d636c0 r4:00000006
> [  284.315627] [<c0860418>] (drm_atomic_helper_check_planes) from [<c0860658>] (drm_atomic_helper_check+0x54/0x9c)
> [  284.315633]  r9:c2e35400 r8:00000006 r7:00000000 r6:c2ba7800 r5:c3d636c0 r4:00000000
> [  284.315641] [<c0860604>] (drm_atomic_helper_check) from [<c08b7ca8>] (vc4_atomic_check+0x25c/0x454)
> [  284.315645]  r7:00000000 r6:c2ba7800 r5:00000001 r4:c3d636c0
> [  284.315652] [<c08b7a4c>] (vc4_atomic_check) from [<c0881278>] (drm_atomic_check_only+0x5cc/0x7e0)
> [  284.315658]  r10:c404c6c8 r9:ffffffff r8:c472c480 r7:00000003 r6:c3d636c0 r5:00000000
> [  284.315662]  r4:0000003c r3:c08b7a4c
> [  284.315670] [<c0880cac>] (drm_atomic_check_only) from [<c089ba60>] (drm_mode_atomic_ioctl+0x758/0xa7c)
> [  284.315675]  r10:c3d46000 r9:c3d636c0 r8:c2ce8a70 r7:027e3a54 r6:00000043 r5:c1fbb800
> [  284.315679]  r4:0281a858
> [  284.315688] [<c089b308>] (drm_mode_atomic_ioctl) from [<c086e9f8>] (drm_ioctl_kernel+0xc4/0x108)
> [  284.315693]  r10:c03864bc r9:c1fbb800 r8:c3d47e64 r7:c089b308 r6:00000002 r5:c2ba7800
> [  284.315697]  r4:00000000
> [  284.315705] [<c086e934>] (drm_ioctl_kernel) from [<c086ee28>] (drm_ioctl+0x1e8/0x3a0)
> [  284.315711]  r9:c1fbb800 r8:000000bc r7:c3d47e64 r6:00000038 r5:c0e59570 r4:00000038
> [  284.315719] [<c086ec40>] (drm_ioctl) from [<c041f354>] (sys_ioctl+0x35c/0x914)
> [  284.315724]  r10:c2d08200 r9:00000000 r8:c36fa300 r7:befdd870 r6:c03864bc r5:c36fa301
> [  284.315728]  r4:c03864bc
> [  284.315735] [<c041eff8>] (sys_ioctl) from [<c0200040>] (ret_fast_syscall+0x0/0x28)
> [  284.315739] Exception stack(0xc3d47fa8 to 0xc3d47ff0)
> [  284.315745] 7fa0:                   027eb750 befdd870 00000000 c03864bc befdd870 00000000
> [  284.315750] 7fc0: 027eb750 befdd870 c03864bc 00000036 027e3948 0281a640 0281a850 027e3a50
> [  284.315756] 7fe0: b4b64100 befdd844 b4b5ba2c b49c994c
> [  284.315762]  r10:00000036 r9:c3d46000 r8:c0200204 r7:00000036 r6:c03864bc r5:befdd870
> [  284.315765]  r4:027eb750
>
> Fixes: c54619b0bfb3 ("drm/vc4: Add support for the BCM2711 HVS5")
> Signed-off-by: Dom Cobley <popcornmix@gmail.com>
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>

Reviewed-by: Dave Stevenson <dave.stevenson@raspberrypi.com>

> ---
>  drivers/gpu/drm/vc4/vc4_plane.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/vc4/vc4_plane.c b/drivers/gpu/drm/vc4/vc4_plane.c
> index b98eabb52920..8c55679cbaef 100644
> --- a/drivers/gpu/drm/vc4/vc4_plane.c
> +++ b/drivers/gpu/drm/vc4/vc4_plane.c
> @@ -917,9 +917,9 @@ static int vc4_plane_mode_set(struct drm_plane *plane,
>                 if (!vc4_state->is_unity) {
>                         vc4_dlist_write(vc4_state,
>                                         VC4_SET_FIELD(vc4_state->crtc_w,
> -                                                     SCALER_POS1_SCL_WIDTH) |
> +                                                     SCALER5_POS1_SCL_WIDTH) |
>                                         VC4_SET_FIELD(vc4_state->crtc_h,
> -                                                     SCALER_POS1_SCL_HEIGHT));
> +                                                     SCALER5_POS1_SCL_HEIGHT));
>                 }
>
>                 /* Position Word 2: Source Image Size */
> --
> 2.29.2
>
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 1/2] drm/vc4: Correct lbm size and calculation
  2021-01-21 16:26   ` Lucas Nussbaum
  2021-01-22  5:11     ` Ryutaroh Matsumoto
@ 2021-01-22 10:54     ` Maxime Ripard
  1 sibling, 0 replies; 11+ messages in thread
From: Maxime Ripard @ 2021-01-22 10:54 UTC (permalink / raw)
  To: Lucas Nussbaum; +Cc: Dom Cobley, Dave Stevenson, dri-devel, Ryutaroh Matsumoto


[-- Attachment #1.1: Type: text/plain, Size: 1432 bytes --]

Hi Lucas,

On Thu, Jan 21, 2021 at 05:26:22PM +0100, Lucas Nussbaum wrote:
> Hi Maxime,
> 
> On 21/01/21 at 12:04 +0100, Maxime Ripard wrote:
> > Hi Lucas, Ryutaroh,
> > 
> > On Thu, Jan 21, 2021 at 11:57:58AM +0100, Maxime Ripard wrote:
> > > From: Dom Cobley <popcornmix@gmail.com>
> > > 
> > > LBM base address is measured in units of pixels per cycle.
> > > That is 4 for 2711 (hvs5) and 2 for 2708.
> > > 
> > > We are wasting 75% of lbm by indexing without the scaling.
> > > But we were also using too high a size for the lbm resulting
> > > in partial corruption (right hand side) of vertically
> > > scaled images, usually at 4K or lower resolutions with more layers.
> > > 
> > > The physical RAM of LBM on 2711 is 8 * 1920 * 16 * 12-bit
> > > (pixels are stored 12-bits per component regardless of format).
> > > 
> > > The LBM adress indexes work in units of pixels per clock,
> > > so for 4 pixels per clock that means we have 32 * 1920 = 60K
> > > 
> > > Fixes: c54619b0bfb3 ("drm/vc4: Add support for the BCM2711 HVS5")
> > > Signed-off-by: Dom Cobley <popcornmix@gmail.com>
> > > Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> > 
> > This one should fix your issue
> > 
> > Feel free to test it and let me know if it's not the case
> 
> I confirm that the patches fix the issue I was seeing.

Great. Can I add your Tested-by (and Ryutaroh, can I add yours as well?)

Maxime

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

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

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

* Re: [PATCH 2/2] drm/vc4: Correct POS1_SCL for hvs5
  2021-01-21 10:57 ` [PATCH 2/2] drm/vc4: Correct POS1_SCL for hvs5 Maxime Ripard
  2021-01-22 10:14   ` Dave Stevenson
@ 2021-01-23  8:05   ` Lucas Nussbaum
  2021-01-23 11:14     ` Ryutaroh Matsumoto
  1 sibling, 1 reply; 11+ messages in thread
From: Lucas Nussbaum @ 2021-01-23  8:05 UTC (permalink / raw)
  To: Maxime Ripard; +Cc: Dom Cobley, Ryutaroh Matsumoto, dri-devel, Dave Stevenson


[-- Attachment #1.1: Type: text/plain, Size: 4126 bytes --]

On 21/01/21 at 11:57 +0100, Maxime Ripard wrote:
> From: Dom Cobley <popcornmix@gmail.com>
> 
> Fixes failure with 4096x1080 resolutions
> 
> [  284.315379] WARNING: CPU: 1 PID: 901 at drivers/gpu/drm/vc4/vc4_plane.c:981 vc4_plane_mode_set+0x1374/0x13c4
> [  284.315385] Modules linked in: ir_rc5_decoder rpivid_hevc(C) bcm2835_codec(C) bcm2835_isp(C) bcm2835_mmal_vchiq(C) bcm2835_gpiomem v4l2_mem2mem videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 videobuf2_common videodev mc cdc_acm xpad ir_rc6_decoder rc_rc6_mce gpio_ir_recv fuse
> [  284.315509] CPU: 1 PID: 901 Comm: kodi.bin Tainted: G         C        5.10.7 #1
> [  284.315514] Hardware name: BCM2711
> [  284.315518] Backtrace:
> [  284.315533] [<c0cc5ca0>] (dump_backtrace) from [<c0cc6014>] (show_stack+0x20/0x24)
> [  284.315540]  r7:ffffffff r6:00000000 r5:68000013 r4:c18ecf1c
> [  284.315549] [<c0cc5ff4>] (show_stack) from [<c0cca638>] (dump_stack+0xc4/0xf0)
> [  284.315558] [<c0cca574>] (dump_stack) from [<c022314c>] (__warn+0xfc/0x158)
> [  284.315564]  r9:00000000 r8:00000009 r7:000003d5 r6:00000009 r5:c08cc7dc r4:c0fd09b8
> [  284.315572] [<c0223050>] (__warn) from [<c0cc67ec>] (warn_slowpath_fmt+0x74/0xe4)
> [  284.315577]  r7:c08cc7dc r6:000003d5 r5:c0fd09b8 r4:00000000
> [  284.315584] [<c0cc677c>] (warn_slowpath_fmt) from [<c08cc7dc>] (vc4_plane_mode_set+0x1374/0x13c4)
> [  284.315589]  r8:00000000 r7:00000000 r6:00001000 r5:c404c600 r4:c2e34600
> [  284.315596] [<c08cb468>] (vc4_plane_mode_set) from [<c08cc984>] (vc4_plane_atomic_check+0x40/0x1c0)
> [  284.315601]  r10:00000001 r9:c2e34600 r8:c0e67068 r7:c0fc44e0 r6:c2ce3640 r5:c3d636c0
> [  284.315605]  r4:c2e34600
> [  284.315614] [<c08cc944>] (vc4_plane_atomic_check) from [<c0860504>] (drm_atomic_helper_check_planes+0xec/0x1ec)
> [  284.315620]  r9:c2e34600 r8:c0e67068 r7:c0fc44e0 r6:c2ce3640 r5:c3d636c0 r4:00000006
> [  284.315627] [<c0860418>] (drm_atomic_helper_check_planes) from [<c0860658>] (drm_atomic_helper_check+0x54/0x9c)
> [  284.315633]  r9:c2e35400 r8:00000006 r7:00000000 r6:c2ba7800 r5:c3d636c0 r4:00000000
> [  284.315641] [<c0860604>] (drm_atomic_helper_check) from [<c08b7ca8>] (vc4_atomic_check+0x25c/0x454)
> [  284.315645]  r7:00000000 r6:c2ba7800 r5:00000001 r4:c3d636c0
> [  284.315652] [<c08b7a4c>] (vc4_atomic_check) from [<c0881278>] (drm_atomic_check_only+0x5cc/0x7e0)
> [  284.315658]  r10:c404c6c8 r9:ffffffff r8:c472c480 r7:00000003 r6:c3d636c0 r5:00000000
> [  284.315662]  r4:0000003c r3:c08b7a4c
> [  284.315670] [<c0880cac>] (drm_atomic_check_only) from [<c089ba60>] (drm_mode_atomic_ioctl+0x758/0xa7c)
> [  284.315675]  r10:c3d46000 r9:c3d636c0 r8:c2ce8a70 r7:027e3a54 r6:00000043 r5:c1fbb800
> [  284.315679]  r4:0281a858
> [  284.315688] [<c089b308>] (drm_mode_atomic_ioctl) from [<c086e9f8>] (drm_ioctl_kernel+0xc4/0x108)
> [  284.315693]  r10:c03864bc r9:c1fbb800 r8:c3d47e64 r7:c089b308 r6:00000002 r5:c2ba7800
> [  284.315697]  r4:00000000
> [  284.315705] [<c086e934>] (drm_ioctl_kernel) from [<c086ee28>] (drm_ioctl+0x1e8/0x3a0)
> [  284.315711]  r9:c1fbb800 r8:000000bc r7:c3d47e64 r6:00000038 r5:c0e59570 r4:00000038
> [  284.315719] [<c086ec40>] (drm_ioctl) from [<c041f354>] (sys_ioctl+0x35c/0x914)
> [  284.315724]  r10:c2d08200 r9:00000000 r8:c36fa300 r7:befdd870 r6:c03864bc r5:c36fa301
> [  284.315728]  r4:c03864bc
> [  284.315735] [<c041eff8>] (sys_ioctl) from [<c0200040>] (ret_fast_syscall+0x0/0x28)
> [  284.315739] Exception stack(0xc3d47fa8 to 0xc3d47ff0)
> [  284.315745] 7fa0:                   027eb750 befdd870 00000000 c03864bc befdd870 00000000
> [  284.315750] 7fc0: 027eb750 befdd870 c03864bc 00000036 027e3948 0281a640 0281a850 027e3a50
> [  284.315756] 7fe0: b4b64100 befdd844 b4b5ba2c b49c994c
> [  284.315762]  r10:00000036 r9:c3d46000 r8:c0200204 r7:00000036 r6:c03864bc r5:befdd870
> [  284.315765]  r4:027eb750
> 
> Fixes: c54619b0bfb3 ("drm/vc4: Add support for the BCM2711 HVS5")
> Signed-off-by: Dom Cobley <popcornmix@gmail.com>
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>

Tested-By: Lucas Nussbaum <lucas@debian.org>

- Lucas

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

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

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

* Re: [PATCH 2/2] drm/vc4: Correct POS1_SCL for hvs5
  2021-01-23  8:05   ` Lucas Nussbaum
@ 2021-01-23 11:14     ` Ryutaroh Matsumoto
  2021-01-25 10:54       ` Maxime Ripard
  0 siblings, 1 reply; 11+ messages in thread
From: Ryutaroh Matsumoto @ 2021-01-23 11:14 UTC (permalink / raw)
  To: lucas; +Cc: popcornmix, maxime, dri-devel, dave.stevenson

From: Lucas Nussbaum <lucas@debian.org>
Subject: Re: [PATCH 2/2] drm/vc4: Correct POS1_SCL for hvs5
Date: Sat, 23 Jan 2021 09:05:48 +0100

> On 21/01/21 at 11:57 +0100, Maxime Ripard wrote:
>> From: Dom Cobley <popcornmix@gmail.com>
>> 
>> Fixes failure with 4096x1080 resolutions
>> 
>> [  284.315379] WARNING: CPU: 1 PID: 901 at drivers/gpu/drm/vc4/vc4_plane.c:981 vc4_plane_mode_set+0x1374/0x13c4
>> [  284.315385] Modules linked in: ir_rc5_decoder rpivid_hevc(C) bcm2835_codec(C) bcm2835_isp(C) bcm2835_mmal_vchiq(C) bcm2835_gpiomem v4l2_mem2mem videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 videobuf2_common videodev mc cdc_acm xpad ir_rc6_decoder rc_rc6_mce gpio_ir_recv fuse
>> [  284.315509] CPU: 1 PID: 901 Comm: kodi.bin Tainted: G         C        5.10.7 #1
>> [  284.315514] Hardware name: BCM2711
>> [  284.315518] Backtrace:
>> [  284.315533] [<c0cc5ca0>] (dump_backtrace) from [<c0cc6014>] (show_stack+0x20/0x24)
>> [  284.315540]  r7:ffffffff r6:00000000 r5:68000013 r4:c18ecf1c
>> [  284.315549] [<c0cc5ff4>] (show_stack) from [<c0cca638>] (dump_stack+0xc4/0xf0)
>> [  284.315558] [<c0cca574>] (dump_stack) from [<c022314c>] (__warn+0xfc/0x158)
>> [  284.315564]  r9:00000000 r8:00000009 r7:000003d5 r6:00000009 r5:c08cc7dc r4:c0fd09b8
>> [  284.315572] [<c0223050>] (__warn) from [<c0cc67ec>] (warn_slowpath_fmt+0x74/0xe4)
>> [  284.315577]  r7:c08cc7dc r6:000003d5 r5:c0fd09b8 r4:00000000
>> [  284.315584] [<c0cc677c>] (warn_slowpath_fmt) from [<c08cc7dc>] (vc4_plane_mode_set+0x1374/0x13c4)
>> [  284.315589]  r8:00000000 r7:00000000 r6:00001000 r5:c404c600 r4:c2e34600
>> [  284.315596] [<c08cb468>] (vc4_plane_mode_set) from [<c08cc984>] (vc4_plane_atomic_check+0x40/0x1c0)
>> [  284.315601]  r10:00000001 r9:c2e34600 r8:c0e67068 r7:c0fc44e0 r6:c2ce3640 r5:c3d636c0
>> [  284.315605]  r4:c2e34600
>> [  284.315614] [<c08cc944>] (vc4_plane_atomic_check) from [<c0860504>] (drm_atomic_helper_check_planes+0xec/0x1ec)
>> [  284.315620]  r9:c2e34600 r8:c0e67068 r7:c0fc44e0 r6:c2ce3640 r5:c3d636c0 r4:00000006
>> [  284.315627] [<c0860418>] (drm_atomic_helper_check_planes) from [<c0860658>] (drm_atomic_helper_check+0x54/0x9c)
>> [  284.315633]  r9:c2e35400 r8:00000006 r7:00000000 r6:c2ba7800 r5:c3d636c0 r4:00000000
>> [  284.315641] [<c0860604>] (drm_atomic_helper_check) from [<c08b7ca8>] (vc4_atomic_check+0x25c/0x454)
>> [  284.315645]  r7:00000000 r6:c2ba7800 r5:00000001 r4:c3d636c0
>> [  284.315652] [<c08b7a4c>] (vc4_atomic_check) from [<c0881278>] (drm_atomic_check_only+0x5cc/0x7e0)
>> [  284.315658]  r10:c404c6c8 r9:ffffffff r8:c472c480 r7:00000003 r6:c3d636c0 r5:00000000
>> [  284.315662]  r4:0000003c r3:c08b7a4c
>> [  284.315670] [<c0880cac>] (drm_atomic_check_only) from [<c089ba60>] (drm_mode_atomic_ioctl+0x758/0xa7c)
>> [  284.315675]  r10:c3d46000 r9:c3d636c0 r8:c2ce8a70 r7:027e3a54 r6:00000043 r5:c1fbb800
>> [  284.315679]  r4:0281a858
>> [  284.315688] [<c089b308>] (drm_mode_atomic_ioctl) from [<c086e9f8>] (drm_ioctl_kernel+0xc4/0x108)
>> [  284.315693]  r10:c03864bc r9:c1fbb800 r8:c3d47e64 r7:c089b308 r6:00000002 r5:c2ba7800
>> [  284.315697]  r4:00000000
>> [  284.315705] [<c086e934>] (drm_ioctl_kernel) from [<c086ee28>] (drm_ioctl+0x1e8/0x3a0)
>> [  284.315711]  r9:c1fbb800 r8:000000bc r7:c3d47e64 r6:00000038 r5:c0e59570 r4:00000038
>> [  284.315719] [<c086ec40>] (drm_ioctl) from [<c041f354>] (sys_ioctl+0x35c/0x914)
>> [  284.315724]  r10:c2d08200 r9:00000000 r8:c36fa300 r7:befdd870 r6:c03864bc r5:c36fa301
>> [  284.315728]  r4:c03864bc
>> [  284.315735] [<c041eff8>] (sys_ioctl) from [<c0200040>] (ret_fast_syscall+0x0/0x28)
>> [  284.315739] Exception stack(0xc3d47fa8 to 0xc3d47ff0)
>> [  284.315745] 7fa0:                   027eb750 befdd870 00000000 c03864bc befdd870 00000000
>> [  284.315750] 7fc0: 027eb750 befdd870 c03864bc 00000036 027e3948 0281a640 0281a850 027e3a50
>> [  284.315756] 7fe0: b4b64100 befdd844 b4b5ba2c b49c994c
>> [  284.315762]  r10:00000036 r9:c3d46000 r8:c0200204 r7:00000036 r6:c03864bc r5:befdd870
>> [  284.315765]  r4:027eb750
>> 
>> Fixes: c54619b0bfb3 ("drm/vc4: Add support for the BCM2711 HVS5")
>> Signed-off-by: Dom Cobley <popcornmix@gmail.com>
>> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> 
> Tested-By: Lucas Nussbaum <lucas@debian.org>

Tested-By: Ryutaroh Matsumoto <ryutaroh@ict.e.titech.ac.jp>

Thank you very much for all of your work!
Ryutaroh
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

* Re: [PATCH 2/2] drm/vc4: Correct POS1_SCL for hvs5
  2021-01-23 11:14     ` Ryutaroh Matsumoto
@ 2021-01-25 10:54       ` Maxime Ripard
  0 siblings, 0 replies; 11+ messages in thread
From: Maxime Ripard @ 2021-01-25 10:54 UTC (permalink / raw)
  To: Ryutaroh Matsumoto; +Cc: popcornmix, lucas, dri-devel, dave.stevenson


[-- Attachment #1.1: Type: text/plain, Size: 4623 bytes --]

On Sat, Jan 23, 2021 at 08:14:03PM +0900, Ryutaroh Matsumoto wrote:
> From: Lucas Nussbaum <lucas@debian.org>
> Subject: Re: [PATCH 2/2] drm/vc4: Correct POS1_SCL for hvs5
> Date: Sat, 23 Jan 2021 09:05:48 +0100
> 
> > On 21/01/21 at 11:57 +0100, Maxime Ripard wrote:
> >> From: Dom Cobley <popcornmix@gmail.com>
> >> 
> >> Fixes failure with 4096x1080 resolutions
> >> 
> >> [  284.315379] WARNING: CPU: 1 PID: 901 at drivers/gpu/drm/vc4/vc4_plane.c:981 vc4_plane_mode_set+0x1374/0x13c4
> >> [  284.315385] Modules linked in: ir_rc5_decoder rpivid_hevc(C) bcm2835_codec(C) bcm2835_isp(C) bcm2835_mmal_vchiq(C) bcm2835_gpiomem v4l2_mem2mem videobuf2_dma_contig videobuf2_memops videobuf2_v4l2 videobuf2_common videodev mc cdc_acm xpad ir_rc6_decoder rc_rc6_mce gpio_ir_recv fuse
> >> [  284.315509] CPU: 1 PID: 901 Comm: kodi.bin Tainted: G         C        5.10.7 #1
> >> [  284.315514] Hardware name: BCM2711
> >> [  284.315518] Backtrace:
> >> [  284.315533] [<c0cc5ca0>] (dump_backtrace) from [<c0cc6014>] (show_stack+0x20/0x24)
> >> [  284.315540]  r7:ffffffff r6:00000000 r5:68000013 r4:c18ecf1c
> >> [  284.315549] [<c0cc5ff4>] (show_stack) from [<c0cca638>] (dump_stack+0xc4/0xf0)
> >> [  284.315558] [<c0cca574>] (dump_stack) from [<c022314c>] (__warn+0xfc/0x158)
> >> [  284.315564]  r9:00000000 r8:00000009 r7:000003d5 r6:00000009 r5:c08cc7dc r4:c0fd09b8
> >> [  284.315572] [<c0223050>] (__warn) from [<c0cc67ec>] (warn_slowpath_fmt+0x74/0xe4)
> >> [  284.315577]  r7:c08cc7dc r6:000003d5 r5:c0fd09b8 r4:00000000
> >> [  284.315584] [<c0cc677c>] (warn_slowpath_fmt) from [<c08cc7dc>] (vc4_plane_mode_set+0x1374/0x13c4)
> >> [  284.315589]  r8:00000000 r7:00000000 r6:00001000 r5:c404c600 r4:c2e34600
> >> [  284.315596] [<c08cb468>] (vc4_plane_mode_set) from [<c08cc984>] (vc4_plane_atomic_check+0x40/0x1c0)
> >> [  284.315601]  r10:00000001 r9:c2e34600 r8:c0e67068 r7:c0fc44e0 r6:c2ce3640 r5:c3d636c0
> >> [  284.315605]  r4:c2e34600
> >> [  284.315614] [<c08cc944>] (vc4_plane_atomic_check) from [<c0860504>] (drm_atomic_helper_check_planes+0xec/0x1ec)
> >> [  284.315620]  r9:c2e34600 r8:c0e67068 r7:c0fc44e0 r6:c2ce3640 r5:c3d636c0 r4:00000006
> >> [  284.315627] [<c0860418>] (drm_atomic_helper_check_planes) from [<c0860658>] (drm_atomic_helper_check+0x54/0x9c)
> >> [  284.315633]  r9:c2e35400 r8:00000006 r7:00000000 r6:c2ba7800 r5:c3d636c0 r4:00000000
> >> [  284.315641] [<c0860604>] (drm_atomic_helper_check) from [<c08b7ca8>] (vc4_atomic_check+0x25c/0x454)
> >> [  284.315645]  r7:00000000 r6:c2ba7800 r5:00000001 r4:c3d636c0
> >> [  284.315652] [<c08b7a4c>] (vc4_atomic_check) from [<c0881278>] (drm_atomic_check_only+0x5cc/0x7e0)
> >> [  284.315658]  r10:c404c6c8 r9:ffffffff r8:c472c480 r7:00000003 r6:c3d636c0 r5:00000000
> >> [  284.315662]  r4:0000003c r3:c08b7a4c
> >> [  284.315670] [<c0880cac>] (drm_atomic_check_only) from [<c089ba60>] (drm_mode_atomic_ioctl+0x758/0xa7c)
> >> [  284.315675]  r10:c3d46000 r9:c3d636c0 r8:c2ce8a70 r7:027e3a54 r6:00000043 r5:c1fbb800
> >> [  284.315679]  r4:0281a858
> >> [  284.315688] [<c089b308>] (drm_mode_atomic_ioctl) from [<c086e9f8>] (drm_ioctl_kernel+0xc4/0x108)
> >> [  284.315693]  r10:c03864bc r9:c1fbb800 r8:c3d47e64 r7:c089b308 r6:00000002 r5:c2ba7800
> >> [  284.315697]  r4:00000000
> >> [  284.315705] [<c086e934>] (drm_ioctl_kernel) from [<c086ee28>] (drm_ioctl+0x1e8/0x3a0)
> >> [  284.315711]  r9:c1fbb800 r8:000000bc r7:c3d47e64 r6:00000038 r5:c0e59570 r4:00000038
> >> [  284.315719] [<c086ec40>] (drm_ioctl) from [<c041f354>] (sys_ioctl+0x35c/0x914)
> >> [  284.315724]  r10:c2d08200 r9:00000000 r8:c36fa300 r7:befdd870 r6:c03864bc r5:c36fa301
> >> [  284.315728]  r4:c03864bc
> >> [  284.315735] [<c041eff8>] (sys_ioctl) from [<c0200040>] (ret_fast_syscall+0x0/0x28)
> >> [  284.315739] Exception stack(0xc3d47fa8 to 0xc3d47ff0)
> >> [  284.315745] 7fa0:                   027eb750 befdd870 00000000 c03864bc befdd870 00000000
> >> [  284.315750] 7fc0: 027eb750 befdd870 c03864bc 00000036 027e3948 0281a640 0281a850 027e3a50
> >> [  284.315756] 7fe0: b4b64100 befdd844 b4b5ba2c b49c994c
> >> [  284.315762]  r10:00000036 r9:c3d46000 r8:c0200204 r7:00000036 r6:c03864bc r5:befdd870
> >> [  284.315765]  r4:027eb750
> >> 
> >> Fixes: c54619b0bfb3 ("drm/vc4: Add support for the BCM2711 HVS5")
> >> Signed-off-by: Dom Cobley <popcornmix@gmail.com>
> >> Signed-off-by: Maxime Ripard <maxime@cerno.tech>
> > 
> > Tested-By: Lucas Nussbaum <lucas@debian.org>
> 
> Tested-By: Ryutaroh Matsumoto <ryutaroh@ict.e.titech.ac.jp>

Applied both patches, thanks for testing!
Maxime

[-- Attachment #1.2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

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

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

end of thread, other threads:[~2021-01-26  8:38 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-21 10:57 [PATCH 1/2] drm/vc4: Correct lbm size and calculation Maxime Ripard
2021-01-21 10:57 ` [PATCH 2/2] drm/vc4: Correct POS1_SCL for hvs5 Maxime Ripard
2021-01-22 10:14   ` Dave Stevenson
2021-01-23  8:05   ` Lucas Nussbaum
2021-01-23 11:14     ` Ryutaroh Matsumoto
2021-01-25 10:54       ` Maxime Ripard
2021-01-21 11:04 ` [PATCH 1/2] drm/vc4: Correct lbm size and calculation Maxime Ripard
2021-01-21 16:26   ` Lucas Nussbaum
2021-01-22  5:11     ` Ryutaroh Matsumoto
2021-01-22 10:54     ` Maxime Ripard
2021-01-22 10:12 ` Dave Stevenson

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.