From: jsg Date: Mon, 26 Feb 2024 00:04:18 +0000 (+0000) Subject: drm/amd/display: Fix MST Null Ptr for RV X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=42fb121d8328ae3bf605e0258b74babb968fb536;p=openbsd drm/amd/display: Fix MST Null Ptr for RV From Fangzhi Zuo 7407c61f43b66e90ad127d0cdd13cbc9d87141a5 in linux-6.6.y/6.6.18 e6a7df96facdcf5b1f71eb3ec26f2f9f6ad61e57 in mainline linux --- diff --git a/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c index c4e5c6ab034..9a3904921e1 100644 --- a/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c +++ b/sys/dev/pci/drm/amd/display/amdgpu_dm/amdgpu_dm.c @@ -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);