drm/amd/display: Return error code on DSC atomic check failure
authorjsg <jsg@openbsd.org>
Tue, 13 Jun 2023 02:42:49 +0000 (02:42 +0000)
committerjsg <jsg@openbsd.org>
Tue, 13 Jun 2023 02:42:49 +0000 (02:42 +0000)
From Hersen Wu
b7ae53dd0d290b27fd4e0bdeff5849ecb3d588a3 in linux-6.1.y/6.1.29
dd24662d9dfbad281bbf030f06d68c7938fa0c66 in mainline linux

sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c
sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c

index 33f941e..dbe4311 100644 (file)
@@ -9750,6 +9750,7 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
                ret = compute_mst_dsc_configs_for_state(state, dm_state->context, vars);
                if (ret) {
                        DRM_DEBUG_DRIVER("compute_mst_dsc_configs_for_state() failed\n");
+                       ret = -EINVAL;
                        goto fail;
                }
 
index df74bc8..e2f9141 100644 (file)
@@ -1368,6 +1368,7 @@ int pre_validate_dsc(struct drm_atomic_state *state,
        ret = pre_compute_mst_dsc_configs_for_state(state, local_dc_state, vars);
        if (ret != 0) {
                DRM_INFO_ONCE("pre_compute_mst_dsc_configs_for_state() failed\n");
+               ret = -EINVAL;
                goto clean_exit;
        }