Advertisement
Guest User

Untitled

a guest
Apr 25th, 2020
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Diff 1.40 KB | None | 0 0
  1. diff --git a/drivers/gpu/drm/meson/meson_viu.c b/drivers/gpu/drm/meson/meson_viu.c
  2. index 65fbf27cda1e..69757e78452e 100644
  3. --- a/drivers/gpu/drm/meson/meson_viu.c
  4. +++ b/drivers/gpu/drm/meson/meson_viu.c
  5. @@ -431,10 +431,22 @@ void meson_viu_init(struct meson_drm *priv)
  6.  
  7.     /* Initialize OSD1 fifo control register */
  8.     reg = VIU_OSD_DDR_PRIORITY_URGENT |
  9. -       VIU_OSD_HOLD_FIFO_LINES(31) |
  10. -       VIU_OSD_FIFO_DEPTH_VAL(32) | /* fifo_depth_val: 32*8=256 */
  11. -       VIU_OSD_WORDS_PER_BURST(4) | /* 4 words in 1 burst */
  12. -       VIU_OSD_FIFO_LIMITS(2);      /* fifo_lim: 2*16=32 */
  13. +         VIU_OSD_FIFO_DEPTH_VAL(32) | /* fifo_depth_val: 32*8=256 */
  14. +         VIU_OSD_WORDS_PER_BURST(4) | /* 4 words in 1 burst */
  15. +         VIU_OSD_FIFO_LIMITS(2);      /* fifo_lim: 2*16=32 */
  16. +
  17. +   /*
  18. +    * When using AFBC on newer SoCs the AFBC encoder has to be reset. To
  19. +    * leave time for that we need hold more lines to avoid glitches.
  20. +    * On the 32-bit SoCs however we need to hold fewer lines because
  21. +    * otherwise screen tearing can occur (for example in kmscube).
  22. +    */
  23. +   if (meson_vpu_is_compatible(priv, VPU_COMPATIBLE_M8) ||
  24. +       meson_vpu_is_compatible(priv, VPU_COMPATIBLE_M8B) ||
  25. +       meson_vpu_is_compatible(priv, VPU_COMPATIBLE_M8M2))
  26. +       reg |= VIU_OSD_HOLD_FIFO_LINES(12);
  27. +   else
  28. +       reg |= VIU_OSD_HOLD_FIFO_LINES(31);
  29.  
  30.     if (meson_vpu_is_compatible(priv, VPU_COMPATIBLE_G12A))
  31.         reg |= VIU_OSD_BURST_LENGTH_32;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement