提交 ba997709 编写于 作者: Y Yong Zhao 提交者: Alex Deucher

drm/amdgpu: Correctly establish the suspend/resume hook for amdkfd

Signed-off-by: NYong Zhao <yong.zhao@amd.com>
Reviewed-by: NFelix Kuehling <Felix.Kuehling@amd.com>
Reviewed-by: NOded Gabbay <oded.gabbay@gmail.com>
Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 a667386c
...@@ -55,6 +55,8 @@ ...@@ -55,6 +55,8 @@
#include <linux/firmware.h> #include <linux/firmware.h>
#include "amdgpu_vf_error.h" #include "amdgpu_vf_error.h"
#include "amdgpu_amdkfd.h"
MODULE_FIRMWARE("amdgpu/vega10_gpu_info.bin"); MODULE_FIRMWARE("amdgpu/vega10_gpu_info.bin");
MODULE_FIRMWARE("amdgpu/raven_gpu_info.bin"); MODULE_FIRMWARE("amdgpu/raven_gpu_info.bin");
...@@ -2378,6 +2380,8 @@ int amdgpu_device_suspend(struct drm_device *dev, bool suspend, bool fbcon) ...@@ -2378,6 +2380,8 @@ int amdgpu_device_suspend(struct drm_device *dev, bool suspend, bool fbcon)
} }
drm_modeset_unlock_all(dev); drm_modeset_unlock_all(dev);
amdgpu_amdkfd_suspend(adev);
/* unpin the front buffers and cursors */ /* unpin the front buffers and cursors */
list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) {
struct amdgpu_crtc *amdgpu_crtc = to_amdgpu_crtc(crtc); 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,6 +2515,9 @@ int amdgpu_device_resume(struct drm_device *dev, bool resume, bool fbcon)
} }
} }
} }
r = amdgpu_amdkfd_resume(adev);
if (r)
return r;
/* blat the mode back in */ /* blat the mode back in */
if (fbcon) { if (fbcon) {
......
...@@ -1824,21 +1824,14 @@ static int cik_common_suspend(void *handle) ...@@ -1824,21 +1824,14 @@ static int cik_common_suspend(void *handle)
{ {
struct amdgpu_device *adev = (struct amdgpu_device *)handle; struct amdgpu_device *adev = (struct amdgpu_device *)handle;
amdgpu_amdkfd_suspend(adev);
return cik_common_hw_fini(adev); return cik_common_hw_fini(adev);
} }
static int cik_common_resume(void *handle) static int cik_common_resume(void *handle)
{ {
int r;
struct amdgpu_device *adev = (struct amdgpu_device *)handle; struct amdgpu_device *adev = (struct amdgpu_device *)handle;
r = cik_common_hw_init(adev); return cik_common_hw_init(adev);
if (r)
return r;
return amdgpu_amdkfd_resume(adev);
} }
static bool cik_common_is_idle(void *handle) static bool cik_common_is_idle(void *handle)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册