Re: [PATCH 2/2] drm/vc4: Correct POS1_SCL for hvs5

2021-01-23 Thread Lucas Nussbaum
On 21/01/21 at 11:57 +0100, Maxime Ripard wrote:
> From: Dom Cobley 
> 
> 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] [] (dump_backtrace) from [] 
> (show_stack+0x20/0x24)
> [  284.315540]  r7: r6: r5:6813 r4:c18ecf1c
> [  284.315549] [] (show_stack) from [] 
> (dump_stack+0xc4/0xf0)
> [  284.315558] [] (dump_stack) from [] (__warn+0xfc/0x158)
> [  284.315564]  r9: r8:0009 r7:03d5 r6:0009 r5:c08cc7dc 
> r4:c0fd09b8
> [  284.315572] [] (__warn) from [] 
> (warn_slowpath_fmt+0x74/0xe4)
> [  284.315577]  r7:c08cc7dc r6:03d5 r5:c0fd09b8 r4:
> [  284.315584] [] (warn_slowpath_fmt) from [] 
> (vc4_plane_mode_set+0x1374/0x13c4)
> [  284.315589]  r8: r7: r6:1000 r5:c404c600 r4:c2e34600
> [  284.315596] [] (vc4_plane_mode_set) from [] 
> (vc4_plane_atomic_check+0x40/0x1c0)
> [  284.315601]  r10:0001 r9:c2e34600 r8:c0e67068 r7:c0fc44e0 r6:c2ce3640 
> r5:c3d636c0
> [  284.315605]  r4:c2e34600
> [  284.315614] [] (vc4_plane_atomic_check) from [] 
> (drm_atomic_helper_check_planes+0xec/0x1ec)
> [  284.315620]  r9:c2e34600 r8:c0e67068 r7:c0fc44e0 r6:c2ce3640 r5:c3d636c0 
> r4:0006
> [  284.315627] [] (drm_atomic_helper_check_planes) from 
> [] (drm_atomic_helper_check+0x54/0x9c)
> [  284.315633]  r9:c2e35400 r8:0006 r7: r6:c2ba7800 r5:c3d636c0 
> r4:
> [  284.315641] [] (drm_atomic_helper_check) from [] 
> (vc4_atomic_check+0x25c/0x454)
> [  284.315645]  r7: r6:c2ba7800 r5:0001 r4:c3d636c0
> [  284.315652] [] (vc4_atomic_check) from [] 
> (drm_atomic_check_only+0x5cc/0x7e0)
> [  284.315658]  r10:c404c6c8 r9: r8:c472c480 r7:0003 r6:c3d636c0 
> r5:
> [  284.315662]  r4:003c r3:c08b7a4c
> [  284.315670] [] (drm_atomic_check_only) from [] 
> (drm_mode_atomic_ioctl+0x758/0xa7c)
> [  284.315675]  r10:c3d46000 r9:c3d636c0 r8:c2ce8a70 r7:027e3a54 r6:0043 
> r5:c1fbb800
> [  284.315679]  r4:0281a858
> [  284.315688] [] (drm_mode_atomic_ioctl) from [] 
> (drm_ioctl_kernel+0xc4/0x108)
> [  284.315693]  r10:c03864bc r9:c1fbb800 r8:c3d47e64 r7:c089b308 r6:0002 
> r5:c2ba7800
> [  284.315697]  r4:
> [  284.315705] [] (drm_ioctl_kernel) from [] 
> (drm_ioctl+0x1e8/0x3a0)
> [  284.315711]  r9:c1fbb800 r8:00bc r7:c3d47e64 r6:0038 r5:c0e59570 
> r4:0038
> [  284.315719] [] (drm_ioctl) from [] 
> (sys_ioctl+0x35c/0x914)
> [  284.315724]  r10:c2d08200 r9: r8:c36fa300 r7:befdd870 r6:c03864bc 
> r5:c36fa301
> [  284.315728]  r4:c03864bc
> [  284.315735] [] (sys_ioctl) from [] 
> (ret_fast_syscall+0x0/0x28)
> [  284.315739] Exception stack(0xc3d47fa8 to 0xc3d47ff0)
> [  284.315745] 7fa0:   027eb750 befdd870  c03864bc 
> befdd870 
> [  284.315750] 7fc0: 027eb750 befdd870 c03864bc 0036 027e3948 0281a640 
> 0281a850 027e3a50
> [  284.315756] 7fe0: b4b64100 befdd844 b4b5ba2c b49c994c
> [  284.315762]  r10:0036 r9:c3d46000 r8:c0200204 r7:0036 r6:c03864bc 
> r5:befdd870
> [  284.315765]  r4:027eb750
> 
> Fixes: c54619b0bfb3 ("drm/vc4: Add support for the BCM2711 HVS5")
> Signed-off-by: Dom Cobley 
> Signed-off-by: Maxime Ripard 

Tested-By: Lucas Nussbaum 

- Lucas


signature.asc
Description: PGP signature
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH 1/2] drm/vc4: Correct lbm size and calculation

2021-01-22 Thread Lucas Nussbaum
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 
> > 
> > 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 
> > Signed-off-by: Maxime Ripard 
> 
> 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


signature.asc
Description: PGP signature
___
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel


Re: [PATCH RFT 0/2] drm/vc4: Clear the display list on startup

2021-01-13 Thread Lucas Nussbaum
Hi Maxime,

On 12/01/21 at 14:47 +0100, Maxime Ripard wrote:
> Hi Lucas,
> 
> Given that I'm not having a great success at reproducing the issue you
> mentioned, could you test the following patches to see if it improves things?

Unfortunately I'm missing a cable and will only get it back during the
week-end, so I cannot test before early next week. However I'm Ccing
Ryutaroh Matsumoto who could also reproduce it. Maybe he is in a better
position to test this (@Ryutaroh: I bounced the patches to you).

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