Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge tag 'amd-drm-fixes-5.18-2022-05-18' of https://gitlab.freedesktop.org/agd5f/linux into drm-fixes

amd-drm-fixes-5.18-2022-05-18:

amdgpu:
- Suspend/resume regression fix

Signed-off-by: Dave Airlie <airlied@redhat.com>
From: Alex Deucher <alexander.deucher@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20220518202045.9123-1-alexander.deucher@amd.com

+17 -1
+2
drivers/gpu/drm/amd/amdgpu/amdgpu.h
··· 1342 1342 1343 1343 #if defined(CONFIG_ACPI) && defined(CONFIG_SUSPEND) 1344 1344 bool amdgpu_acpi_is_s3_active(struct amdgpu_device *adev); 1345 + bool amdgpu_acpi_should_gpu_reset(struct amdgpu_device *adev); 1345 1346 bool amdgpu_acpi_is_s0ix_active(struct amdgpu_device *adev); 1346 1347 #else 1347 1348 static inline bool amdgpu_acpi_is_s0ix_active(struct amdgpu_device *adev) { return false; } 1349 + static inline bool amdgpu_acpi_should_gpu_reset(struct amdgpu_device *adev) { return false; } 1348 1350 static inline bool amdgpu_acpi_is_s3_active(struct amdgpu_device *adev) { return false; } 1349 1351 #endif 1350 1352
+14
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
··· 1046 1046 } 1047 1047 1048 1048 /** 1049 + * amdgpu_acpi_should_gpu_reset 1050 + * 1051 + * @adev: amdgpu_device_pointer 1052 + * 1053 + * returns true if should reset GPU, false if not 1054 + */ 1055 + bool amdgpu_acpi_should_gpu_reset(struct amdgpu_device *adev) 1056 + { 1057 + if (adev->flags & AMD_IS_APU) 1058 + return false; 1059 + return pm_suspend_target_state != PM_SUSPEND_TO_IDLE; 1060 + } 1061 + 1062 + /** 1049 1063 * amdgpu_acpi_is_s0ix_active 1050 1064 * 1051 1065 * @adev: amdgpu_device_pointer
+1 -1
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c
··· 2336 2336 struct drm_device *drm_dev = dev_get_drvdata(dev); 2337 2337 struct amdgpu_device *adev = drm_to_adev(drm_dev); 2338 2338 2339 - if (!adev->in_s0ix) 2339 + if (amdgpu_acpi_should_gpu_reset(adev)) 2340 2340 return amdgpu_asic_reset(adev); 2341 2341 2342 2342 return 0;