]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
drm/vc4: hvs: Remove ABORT_ON_EMPTY flag
authorDom Cobley <popcornmix@gmail.com>
Fri, 21 Jun 2024 15:20:43 +0000 (16:20 +0100)
committerDave Stevenson <dave.stevenson@raspberrypi.com>
Mon, 9 Sep 2024 12:02:53 +0000 (13:02 +0100)
ABORT_ON_EMPTY chooses whether the HVS abandons the current frame
when it experiences an underflow, or attempts to continue.

In theory the frame should be black from the point of underflow,
compared to a shift of sebsequent pixels to the left.

Unfortunately it seems to put the HVS is a bad state where it is not
possible to recover simply. This typically requires a reboot
following the 'flip done timed out message'.

Discussion with Broadcom has suggested we don't use this flag.
All their testing is done with it disabled.

Additionally setting BLANK_INSERT_EN causes the HDMI to output
blank pixels on an underflow which avoids it losing sync.

After this change a 'flip done timed out' due to sdram bandwidth
starvation or too low a clock is recoverable once the situation improves.

Signed-off-by: Dom Cobley <popcornmix@gmail.com>
Reviewed-by: Maxime Ripard <mripard@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240621152055.4180873-20-dave.stevenson@raspberrypi.com
Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.com>
drivers/gpu/drm/vc4/vc4_hdmi.c
drivers/gpu/drm/vc4/vc4_regs.h

index 28792dfa8c556a476d32d94353e63a65ed167410..c15372142ba00e0c6f8d4d0f27cdd9e07dae17e6 100644 (file)
@@ -1598,6 +1598,7 @@ static void vc4_hdmi_encoder_post_crtc_enable(struct drm_encoder *encoder,
                   VC4_HD_VID_CTL_CLRRGB |
                   VC4_HD_VID_CTL_UNDERFLOW_ENABLE |
                   VC4_HD_VID_CTL_FRAME_COUNTER_RESET |
+                  VC4_HD_VID_CTL_BLANK_INSERT_EN |
                   (vsync_pos ? 0 : VC4_HD_VID_CTL_VSYNC_LOW) |
                   (hsync_pos ? 0 : VC4_HD_VID_CTL_HSYNC_LOW));
 
index 8ac9515554f8a0455d7119a1b525470c7f90ab56..c55dec38392941d8444a402f288663205740449f 100644 (file)
@@ -777,6 +777,7 @@ enum {
 # define VC4_HD_VID_CTL_CLRSYNC                        BIT(24)
 # define VC4_HD_VID_CTL_CLRRGB                 BIT(23)
 # define VC4_HD_VID_CTL_BLANKPIX               BIT(18)
+# define VC4_HD_VID_CTL_BLANK_INSERT_EN                BIT(16)
 
 # define VC4_HD_CSC_CTL_ORDER_MASK             VC4_MASK(7, 5)
 # define VC4_HD_CSC_CTL_ORDER_SHIFT            5