]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/vc4: hdmi: Avoid full hdmi audio fifo writes
authorDom Cobley <popcornmix@gmail.com>
Mon, 13 Jun 2022 14:47:47 +0000 (16:47 +0200)
committerMaxime Ripard <maxime@cerno.tech>
Tue, 28 Jun 2022 12:55:48 +0000 (14:55 +0200)
We are getting occasional VC4_HD_MAI_CTL_ERRORF in
HDMI_MAI_CTL which seem to correspond with audio dropouts.

Reduce the threshold where we deassert DREQ to avoid the fifo
overfilling

Fixes: b5780ae2a73c ("drm/vc4: Add HDMI audio support")
Signed-off-by: Dom Cobley <popcornmix@gmail.com>
Link: https://lore.kernel.org/r/20220613144800.326124-21-maxime@cerno.tech
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
drivers/gpu/drm/vc4/vc4_hdmi.c

index 0e778609cfec0e20fc6a2d1dbc8ea007dd97980f..9f49dd9b9d1b588355ab6f336f9e790b8d7f22f1 100644 (file)
@@ -1956,10 +1956,10 @@ static int vc4_hdmi_audio_prepare(struct device *dev, void *data,
 
        /* Set the MAI threshold */
        HDMI_WRITE(HDMI_MAI_THR,
-                  VC4_SET_FIELD(0x10, VC4_HD_MAI_THR_PANICHIGH) |
-                  VC4_SET_FIELD(0x10, VC4_HD_MAI_THR_PANICLOW) |
-                  VC4_SET_FIELD(0x10, VC4_HD_MAI_THR_DREQHIGH) |
-                  VC4_SET_FIELD(0x10, VC4_HD_MAI_THR_DREQLOW));
+                  VC4_SET_FIELD(0x08, VC4_HD_MAI_THR_PANICHIGH) |
+                  VC4_SET_FIELD(0x08, VC4_HD_MAI_THR_PANICLOW) |
+                  VC4_SET_FIELD(0x06, VC4_HD_MAI_THR_DREQHIGH) |
+                  VC4_SET_FIELD(0x08, VC4_HD_MAI_THR_DREQLOW));
 
        HDMI_WRITE(HDMI_MAI_CONFIG,
                   VC4_HDMI_MAI_CONFIG_BIT_REVERSE |