From: jsg Date: Thu, 23 Feb 2023 02:25:43 +0000 (+0000) Subject: drm/amd/amdgpu: fix warning during suspend X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=73029064ee9b7cc1d45b30903ec55f59caf5dd31;p=openbsd drm/amd/amdgpu: fix warning during suspend From Jack Xiao dbe3529e816ee77a19fb6636e762b1dadbd02d10 in linux-6.1.y/6.1.13 8f32378986218812083b127da5ba42d48297d7c4 in mainline linux --- diff --git a/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c b/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c index 432dad5dd9a..0b80179123f 100644 --- a/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c +++ b/sys/dev/pci/drm/amd/amdgpu/amdgpu_device.c @@ -4361,6 +4361,9 @@ int amdgpu_device_resume(struct drm_device *dev, bool fbcon) #endif adev->in_suspend = false; + if (adev->enable_mes) + amdgpu_mes_self_test(adev); + if (amdgpu_acpi_smart_shift_update(dev, AMDGPU_SS_DEV_D0)) DRM_WARN("smart shift update failed\n"); diff --git a/sys/dev/pci/drm/amd/amdgpu/mes_v11_0.c b/sys/dev/pci/drm/amd/amdgpu/mes_v11_0.c index 0e920459c83..8ef6cbb2397 100644 --- a/sys/dev/pci/drm/amd/amdgpu/mes_v11_0.c +++ b/sys/dev/pci/drm/amd/amdgpu/mes_v11_0.c @@ -1339,7 +1339,7 @@ static int mes_v11_0_late_init(void *handle) struct amdgpu_device *adev = (struct amdgpu_device *)handle; /* it's only intended for use in mes_self_test case, not for s0ix and reset */ - if (!amdgpu_in_reset(adev) && !adev->in_s0ix && + if (!amdgpu_in_reset(adev) && !adev->in_s0ix && !adev->in_suspend && (adev->ip_versions[GC_HWIP][0] != IP_VERSION(11, 0, 3))) amdgpu_mes_self_test(adev);