[SRU][J][PATCH 1/1] UBUNTU: SAUCE: drm/amd/display: Fix incorrect code path taken in amdgpu_dm_atomic_check()
Manuel Diewald
manuel.diewald at canonical.com
Mon Dec 8 16:38:17 UTC 2025
BugLink: https://bugs.launchpad.net/bugs/2128729
The Ubuntu backport of e6a7df96facdc ("drm/amd/display: Fix MST Null Ptr
for RV") to fix CVE-2024-26700 does not consider that
compute_mst_dsc_configs_for_state() returns a boolean to
indicate success or failure in 5.15, while it returns an integer
in later kernel versions with 0 indicating success. This means
we need to flip the error condition when checking whether the
call succeeded when backporting this to 5.15 and older.
Currently, the error path is taken even though the call to
compute_mst_dsc_configs_for_state() succeeds which causes some systems
to have no video output or a black screen while the system is running.
Fix this by checking the return value of
compute_mst_dsc_configs_for_state() in amdgpu_dm_atomic_check()
correctly.
Signed-off-by: Manuel Diewald <manuel.diewald at canonical.com>
---
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index cb349358fc70..c672fbed2fe3 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -11329,7 +11329,7 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
#if defined(CONFIG_DRM_AMD_DC_DCN)
if (dc_resource_is_dsc_encoding_supported(dc)) {
ret = compute_mst_dsc_configs_for_state(state, dm_state->context, vars);
- if (ret) {
+ if (!ret) {
DRM_DEBUG_DRIVER("compute_mst_dsc_configs_for_state() failed\n");
ret = -EINVAL;
goto fail;
--
2.34.1
More information about the kernel-team
mailing list