Skip to content

Commit 980a2ff

Browse files
committed
Merge tag 'amd-drm-fixes-6.1-2022-11-02' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes
amd-drm-fixes-6.1-2022-11-02: amdgpu: - DCN 3.1.4 fixes - DCN 3.2.x fixes - GC 11.x fixes - Virtual display fix - Fail suspend if resources can't be evicted - SR-IOV fix - Display PSR fix amdkfd: - Fix possible NULL pointer deref - GC 11.x trap handler fix Signed-off-by: Dave Airlie <[email protected]> From: Alex Deucher <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
2 parents c941ffc + 6640f8e commit 980a2ff

22 files changed

+464
-417
lines changed

drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -706,6 +706,13 @@ int amdgpu_amdkfd_submit_ib(struct amdgpu_device *adev,
706706

707707
void amdgpu_amdkfd_set_compute_idle(struct amdgpu_device *adev, bool idle)
708708
{
709+
/* Temporary workaround to fix issues observed in some
710+
* compute applications when GFXOFF is enabled on GFX11.
711+
*/
712+
if (IP_VERSION_MAJ(adev->ip_versions[GC_HWIP][0]) == 11) {
713+
pr_debug("GFXOFF is %s\n", idle ? "enabled" : "disabled");
714+
amdgpu_gfx_off_ctrl(adev, idle);
715+
}
709716
amdgpu_dpm_switch_power_profile(adev,
710717
PP_SMC_POWER_PROFILE_COMPUTE,
711718
!idle);

drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4060,15 +4060,18 @@ void amdgpu_device_fini_sw(struct amdgpu_device *adev)
40604060
* at suspend time.
40614061
*
40624062
*/
4063-
static void amdgpu_device_evict_resources(struct amdgpu_device *adev)
4063+
static int amdgpu_device_evict_resources(struct amdgpu_device *adev)
40644064
{
4065+
int ret;
4066+
40654067
/* No need to evict vram on APUs for suspend to ram or s2idle */
40664068
if ((adev->in_s3 || adev->in_s0ix) && (adev->flags & AMD_IS_APU))
4067-
return;
4069+
return 0;
40684070

4069-
if (amdgpu_ttm_evict_resources(adev, TTM_PL_VRAM))
4071+
ret = amdgpu_ttm_evict_resources(adev, TTM_PL_VRAM);
4072+
if (ret)
40704073
DRM_WARN("evicting device resources failed\n");
4071-
4074+
return ret;
40724075
}
40734076

40744077
/*
@@ -4118,7 +4121,9 @@ int amdgpu_device_suspend(struct drm_device *dev, bool fbcon)
41184121
if (!adev->in_s0ix)
41194122
amdgpu_amdkfd_suspend(adev, adev->in_runpm);
41204123

4121-
amdgpu_device_evict_resources(adev);
4124+
r = amdgpu_device_evict_resources(adev);
4125+
if (r)
4126+
return r;
41224127

41234128
amdgpu_fence_driver_hw_fini(adev);
41244129

drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2201,7 +2201,8 @@ amdgpu_pci_remove(struct pci_dev *pdev)
22012201
pm_runtime_forbid(dev->dev);
22022202
}
22032203

2204-
if (adev->ip_versions[MP1_HWIP][0] == IP_VERSION(13, 0, 2)) {
2204+
if (adev->ip_versions[MP1_HWIP][0] == IP_VERSION(13, 0, 2) &&
2205+
!amdgpu_sriov_vf(adev)) {
22052206
bool need_to_reset_gpu = false;
22062207

22072208
if (adev->gmc.xgmi.num_physical_nodes > 1) {

drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -337,12 +337,14 @@ static int amdgpu_firmware_info(struct drm_amdgpu_info_firmware *fw_info,
337337
fw_info->feature = adev->psp.cap_feature_version;
338338
break;
339339
case AMDGPU_INFO_FW_MES_KIQ:
340-
fw_info->ver = adev->mes.ucode_fw_version[0];
341-
fw_info->feature = 0;
340+
fw_info->ver = adev->mes.kiq_version & AMDGPU_MES_VERSION_MASK;
341+
fw_info->feature = (adev->mes.kiq_version & AMDGPU_MES_FEAT_VERSION_MASK)
342+
>> AMDGPU_MES_FEAT_VERSION_SHIFT;
342343
break;
343344
case AMDGPU_INFO_FW_MES:
344-
fw_info->ver = adev->mes.ucode_fw_version[1];
345-
fw_info->feature = 0;
345+
fw_info->ver = adev->mes.sched_version & AMDGPU_MES_VERSION_MASK;
346+
fw_info->feature = (adev->mes.sched_version & AMDGPU_MES_FEAT_VERSION_MASK)
347+
>> AMDGPU_MES_FEAT_VERSION_SHIFT;
346348
break;
347349
case AMDGPU_INFO_FW_IMU:
348350
fw_info->ver = adev->gfx.imu_fw_version;

drivers/gpu/drm/amd/amdgpu/amdgpu_vkms.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,8 @@ static int amdgpu_vkms_sw_init(void *handle)
500500

501501
adev_to_drm(adev)->mode_config.fb_base = adev->gmc.aper_base;
502502

503+
adev_to_drm(adev)->mode_config.fb_modifiers_not_supported = true;
504+
503505
r = amdgpu_display_modeset_create_props(adev);
504506
if (r)
505507
return r;

0 commit comments

Comments
 (0)