linux-stable/drivers/gpu/drm/ast
Jammy Huang a81b2acd43 drm/ast: Fix soft lockup
commit bc004f5038 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.

Signed-off-by: Jammy Huang <jammy_huang@aspeedtech.com>
Fixes: 594e9c04b5 ("drm/ast: Create the driver for ASPEED proprietory Display-Port")
Reviewed-by: Jocelyn Falempe <jfalempe@redhat.com>
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
Cc: KuoHsiang Chou <kuohsiang_chou@aspeedtech.com>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Cc: Dave Airlie <airlied@redhat.com>
Cc: Jocelyn Falempe <jfalempe@redhat.com>
Cc: dri-devel@lists.freedesktop.org
Cc: <stable@vger.kernel.org> # v5.19+
Link: https://patchwork.freedesktop.org/patch/msgid/20240403090246.1495487-1-jammy_huang@aspeedtech.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-04-17 11:19:34 +02:00
..
Kconfig drm: Only select I2C_ALGOBIT for drivers that actually need it 2023-01-10 11:15:44 +01:00
Makefile
ast_dp.c drm/ast: Fix soft lockup 2024-04-17 11:19:34 +02:00
ast_dp501.c drm/ast: report connection status on Display Port. 2023-07-28 17:08:28 +02:00
ast_dram_tables.h
ast_drv.c drm/ast: Use drm_aperture_remove_conflicting_pci_framebuffers 2023-04-04 14:55:50 +02:00
ast_drv.h drm/ast: Disconnect BMC if physical connector is connected 2023-12-03 07:33:06 +01:00
ast_i2c.c drm/ast: Rename to_ast_private() to to_ast_device() 2023-03-01 10:28:50 +01:00
ast_main.c drm/ast: Do not enable PCI resources multiple times 2023-07-25 20:51:41 +02:00
ast_mm.c drm/ast: Enable and unlock device access early during init 2023-06-27 14:26:32 +02:00
ast_mode.c drm/ast: Disconnect BMC if physical connector is connected 2023-12-03 07:33:06 +01:00
ast_post.c drm/ast: Distinguish among chip generations 2023-06-27 14:26:34 +02:00
ast_tables.h drm/ast: Add resolution support for 1152x864@75 2022-09-20 10:19:32 +02:00