Commit 7ad4e7f0 authored by Rex Zhu's avatar Rex Zhu Committed by Alex Deucher

drm/amd/powerplay: fix bug that dpm funcs in debugfs/sysfs missing.

in dpm module, sysfs init func move to late_init from sw_init.
Reviewed-by: default avatarAlex Deucher <alexander.deucher@amd.com>

Change-Id: Ice4a73212d8e3106d05f04a27043820ffd32929e
Signed-off-by: default avatarRex Zhu <Rex.Zhu@amd.com>
parent 195567e9
...@@ -121,6 +121,19 @@ static int amdgpu_pp_early_init(void *handle) ...@@ -121,6 +121,19 @@ static int amdgpu_pp_early_init(void *handle)
return ret; return ret;
} }
static int amdgpu_pp_late_init(void *handle)
{
int ret = 0;
struct amdgpu_device *adev = (struct amdgpu_device *)handle;
if (adev->powerplay.ip_funcs->late_init)
ret = adev->powerplay.ip_funcs->late_init(
adev->powerplay.pp_handle);
return ret;
}
static int amdgpu_pp_sw_init(void *handle) static int amdgpu_pp_sw_init(void *handle)
{ {
int ret = 0; int ret = 0;
...@@ -282,7 +295,7 @@ static void amdgpu_pp_print_status(void *handle) ...@@ -282,7 +295,7 @@ static void amdgpu_pp_print_status(void *handle)
const struct amd_ip_funcs amdgpu_pp_ip_funcs = { const struct amd_ip_funcs amdgpu_pp_ip_funcs = {
.early_init = amdgpu_pp_early_init, .early_init = amdgpu_pp_early_init,
.late_init = NULL, .late_init = amdgpu_pp_late_init,
.sw_init = amdgpu_pp_sw_init, .sw_init = amdgpu_pp_sw_init,
.sw_fini = amdgpu_pp_sw_fini, .sw_fini = amdgpu_pp_sw_fini,
.hw_init = amdgpu_pp_hw_init, .hw_init = amdgpu_pp_hw_init,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment