Skip to content

Commit 3b754ed

Browse files
carlocaionesuperna9999
authored andcommitted
drm/meson: Reduce the FIFO lines held when AFBC is not used
Having a bigger number of FIFO lines held after vsync is only useful to SoCs using AFBC to give time to the AFBC decoder to be reset, configured and enabled again. For SoCs not using AFBC this, on the contrary, is causing on some displays issues and a few pixels vertical offset in the displayed image. Conditionally increase the number of lines held after vsync only for SoCs using AFBC, leaving the default value for all the others. Fixes: 24e0d40 ("drm/meson: hold 32 lines after vsync to give time for AFBC start") Signed-off-by: Carlo Caione <[email protected]> Acked-by: Martin Blumenstingl <[email protected]> Acked-by: Neil Armstrong <[email protected]> [narmstrong: added fixes tag] Signed-off-by: Neil Armstrong <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 4217c6a commit 3b754ed

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

drivers/gpu/drm/meson/meson_viu.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -436,15 +436,14 @@ void meson_viu_init(struct meson_drm *priv)
436436

437437
/* Initialize OSD1 fifo control register */
438438
reg = VIU_OSD_DDR_PRIORITY_URGENT |
439-
VIU_OSD_HOLD_FIFO_LINES(31) |
440439
VIU_OSD_FIFO_DEPTH_VAL(32) | /* fifo_depth_val: 32*8=256 */
441440
VIU_OSD_WORDS_PER_BURST(4) | /* 4 words in 1 burst */
442441
VIU_OSD_FIFO_LIMITS(2); /* fifo_lim: 2*16=32 */
443442

444443
if (meson_vpu_is_compatible(priv, VPU_COMPATIBLE_G12A))
445-
reg |= VIU_OSD_BURST_LENGTH_32;
444+
reg |= (VIU_OSD_BURST_LENGTH_32 | VIU_OSD_HOLD_FIFO_LINES(31));
446445
else
447-
reg |= VIU_OSD_BURST_LENGTH_64;
446+
reg |= (VIU_OSD_BURST_LENGTH_64 | VIU_OSD_HOLD_FIFO_LINES(4));
448447

449448
writel_relaxed(reg, priv->io_base + _REG(VIU_OSD1_FIFO_CTRL_STAT));
450449
writel_relaxed(reg, priv->io_base + _REG(VIU_OSD2_FIFO_CTRL_STAT));

0 commit comments

Comments
 (0)