diff options
author | Yong Zhao <yong.zhao@amd.com> | 2015-11-09 17:21:45 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-07-14 11:06:37 -0400 |
commit | ba997709a6135355a1f311336c7c4a6c0e37dfe9 (patch) | |
tree | 2e1585433f095417df830a7ab081043a4c2340fd /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |
parent | a667386cb997a136e169de3cf70f007223bb74ee (diff) |
drm/amdgpu: Correctly establish the suspend/resume hook for amdkfd
Signed-off-by: Yong Zhao <yong.zhao@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: Oded Gabbay <oded.gabbay@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 0e629931210c..078886c6b758 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |||
@@ -55,6 +55,8 @@ | |||
55 | #include <linux/firmware.h> | 55 | #include <linux/firmware.h> |
56 | #include "amdgpu_vf_error.h" | 56 | #include "amdgpu_vf_error.h" |
57 | 57 | ||
58 | #include "amdgpu_amdkfd.h" | ||
59 | |||
58 | MODULE_FIRMWARE("amdgpu/vega10_gpu_info.bin"); | 60 | MODULE_FIRMWARE("amdgpu/vega10_gpu_info.bin"); |
59 | MODULE_FIRMWARE("amdgpu/raven_gpu_info.bin"); | 61 | MODULE_FIRMWARE("amdgpu/raven_gpu_info.bin"); |
60 | 62 | ||
@@ -2378,6 +2380,8 @@ int amdgpu_device_suspend(struct drm_device *dev, bool suspend, bool fbcon) | |||
2378 | } | 2380 | } |
2379 | drm_modeset_unlock_all(dev); | 2381 | drm_modeset_unlock_all(dev); |
2380 | 2382 | ||
2383 | amdgpu_amdkfd_suspend(adev); | ||
2384 | |||
2381 | /* unpin the front buffers and cursors */ | 2385 | /* unpin the front buffers and cursors */ |
2382 | list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { | 2386 | list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { |
2383 | struct amdgpu_crtc *amdgpu_crtc = to_amdgpu_crtc(crtc); | 2387 | struct amdgpu_crtc *amdgpu_crtc = to_amdgpu_crtc(crtc); |
@@ -2511,6 +2515,9 @@ int amdgpu_device_resume(struct drm_device *dev, bool resume, bool fbcon) | |||
2511 | } | 2515 | } |
2512 | } | 2516 | } |
2513 | } | 2517 | } |
2518 | r = amdgpu_amdkfd_resume(adev); | ||
2519 | if (r) | ||
2520 | return r; | ||
2514 | 2521 | ||
2515 | /* blat the mode back in */ | 2522 | /* blat the mode back in */ |
2516 | if (fbcon) { | 2523 | if (fbcon) { |