drm/amd/display: Fix MST Null Ptr for RV
authorjsg <jsg@openbsd.org>
Mon, 26 Feb 2024 00:04:18 +0000 (00:04 +0000)
committerjsg <jsg@openbsd.org>
Mon, 26 Feb 2024 00:04:18 +0000 (00:04 +0000)
From Fangzhi Zuo
7407c61f43b66e90ad127d0cdd13cbc9d87141a5 in linux-6.6.y/6.6.18
e6a7df96facdcf5b1f71eb3ec26f2f9f6ad61e57 in mainline linux

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

index c4e5c6a..9a39049 100644 (file)
@@ -10364,11 +10364,13 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
                        goto fail;
                }
 
-               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;
+               if (dc_resource_is_dsc_encoding_supported(dc)) {
+                       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;
+                       }
                }
 
                ret = dm_update_mst_vcpi_slots_for_dsc(state, dm_state->context, vars);