950-0432-vc4-drm-Avoid-full-hdmi-audio-fifo-writes.patch 1.2 KB

1234567891011121314151617181920212223242526272829303132
  1. From bf7f969a35078e4a26ca2beb562593bcbf636afa Mon Sep 17 00:00:00 2001
  2. From: Dom Cobley <[email protected]>
  3. Date: Sun, 24 Jan 2021 15:44:10 +0000
  4. Subject: [PATCH] vc4/drm: Avoid full hdmi audio fifo writes
  5. We are getting occasional VC4_HD_MAI_CTL_ERRORF in
  6. HDMI_MAI_CTL which seem to correspond with audio dropouts.
  7. Reduce the threshold where we deassert DREQ to avoid the fifo overfilling
  8. Signed-off-by: Dom Cobley <[email protected]>
  9. ---
  10. drivers/gpu/drm/vc4/vc4_hdmi.c | 8 ++++----
  11. 1 file changed, 4 insertions(+), 4 deletions(-)
  12. --- a/drivers/gpu/drm/vc4/vc4_hdmi.c
  13. +++ b/drivers/gpu/drm/vc4/vc4_hdmi.c
  14. @@ -1613,10 +1613,10 @@ static int vc4_hdmi_audio_prepare(struct
  15. /* Set the MAI threshold */
  16. HDMI_WRITE(HDMI_MAI_THR,
  17. - VC4_SET_FIELD(0x10, VC4_HD_MAI_THR_PANICHIGH) |
  18. - VC4_SET_FIELD(0x10, VC4_HD_MAI_THR_PANICLOW) |
  19. - VC4_SET_FIELD(0x10, VC4_HD_MAI_THR_DREQHIGH) |
  20. - VC4_SET_FIELD(0x10, VC4_HD_MAI_THR_DREQLOW));
  21. + VC4_SET_FIELD(0x08, VC4_HD_MAI_THR_PANICHIGH) |
  22. + VC4_SET_FIELD(0x08, VC4_HD_MAI_THR_PANICLOW) |
  23. + VC4_SET_FIELD(0x06, VC4_HD_MAI_THR_DREQHIGH) |
  24. + VC4_SET_FIELD(0x08, VC4_HD_MAI_THR_DREQLOW));
  25. HDMI_WRITE(HDMI_MAI_CONFIG,
  26. VC4_HDMI_MAI_CONFIG_BIT_REVERSE |