Skip to contentSkip to conversation

Patch "drm/ast: Fix soft lockup" has been added to the 6.8-stable tree

PATCH [email protected] 1 participant 1 message Apr 15, 2024

Subsystems (3)
lore
Share & tools
lore

[email protected]

author Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

drm/ast: Fix soft lockup

to the 6.8-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
drm-ast-fix-soft-lockup.patch
and it can be found in the queue-6.8 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

From bc004f5038220b1891ef4107134ccae44be55109 Mon Sep 17 00:00:00 2001
From: Jammy Huang <[email protected]>
Date: Wed, 3 Apr 2024 17:02:46 +0800
Subject: drm/ast: Fix soft lockup

From: Jammy Huang <[email protected]>

commit bc004f5038220b1891ef4107134ccae44be55109 upstream.

There is a while-loop in ast_dp_set_on_off() that could lead to infinite-loop. This is because the register, VGACRI-Dx, checked in this API is a scratch register actually controlled by a MCU, named DPMCU, in BMC.

These scratch registers are protected by scu-lock. If suc-lock is not off, DPMCU can not update these registers and then host will have soft lockup due to never updated status.

DPMCU is used to control DP and relative registers to handshake with host's VGA driver. Even the most time-consuming task, DP's link training, is less than 100ms. 200ms should be enough.

Fixes 594e9c04b586 ("drm/ast: Create the driver for ASPEED proprietory Display-Port")
Cc KuoHsiang Chou <[email protected]>
Cc Thomas Zimmermann <[email protected]>
Cc Dave Airlie <[email protected]>
Cc Jocelyn Falempe <[email protected]>
Cc <[email protected]> # v5.19+
---
 drivers/gpu/drm/ast/ast_dp.c |    3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/ast/ast_dp.c +3 -0
@@ -180,6 +180,7 @@ void ast_dp_set_on_off(struct drm_device
 {
 	struct ast_device *ast = to_ast_device(dev);
 	u8 video_on_off = on;
+	u32 i = 0;
 
 	// Video On/Off
 	ast_set_index_reg_mask(ast, AST_IO_VGACRI, 0xE3, (u8) ~AST_DP_VIDEO_ENABLE, on);
@@ -192,6 +193,8 @@ void ast_dp_set_on_off(struct drm_device
 						ASTDP_MIRROR_VIDEO_ENABLE) != video_on_off) {
 			// wait 1 ms
 			mdelay(1);
+			if (++i > 200)
+				break;
 		}
 	}
 }

Patches currently in stable-queue which might be from [email protected] are

queue-6.8/drm-ast-fix-soft-lockup.patch