diff options
author | Rex Zhu <Rex.Zhu@amd.com> | 2015-12-07 03:42:35 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-12-21 16:42:50 -0500 |
commit | 7ad4e7f09372946d1bfd5359c45ccce024d0689e (patch) | |
tree | ef55f94746f6f51d7db40d932a3025d861a634a4 /drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | |
parent | 195567e99bdf6491a370b71a1dcf6b4c891495d7 (diff) |
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: Alex Deucher <alexander.deucher@amd.com>
Change-Id: Ice4a73212d8e3106d05f04a27043820ffd32929e
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c index 4f6740cc1e69..6cbbae7367f7 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | |||
@@ -121,6 +121,19 @@ static int amdgpu_pp_early_init(void *handle) | |||
121 | return ret; | 121 | return ret; |
122 | } | 122 | } |
123 | 123 | ||
124 | |||
125 | static int amdgpu_pp_late_init(void *handle) | ||
126 | { | ||
127 | int ret = 0; | ||
128 | struct amdgpu_device *adev = (struct amdgpu_device *)handle; | ||
129 | |||
130 | if (adev->powerplay.ip_funcs->late_init) | ||
131 | ret = adev->powerplay.ip_funcs->late_init( | ||
132 | adev->powerplay.pp_handle); | ||
133 | |||
134 | return ret; | ||
135 | } | ||
136 | |||
124 | static int amdgpu_pp_sw_init(void *handle) | 137 | static int amdgpu_pp_sw_init(void *handle) |
125 | { | 138 | { |
126 | int ret = 0; | 139 | int ret = 0; |
@@ -282,7 +295,7 @@ static void amdgpu_pp_print_status(void *handle) | |||
282 | 295 | ||
283 | const struct amd_ip_funcs amdgpu_pp_ip_funcs = { | 296 | const struct amd_ip_funcs amdgpu_pp_ip_funcs = { |
284 | .early_init = amdgpu_pp_early_init, | 297 | .early_init = amdgpu_pp_early_init, |
285 | .late_init = NULL, | 298 | .late_init = amdgpu_pp_late_init, |
286 | .sw_init = amdgpu_pp_sw_init, | 299 | .sw_init = amdgpu_pp_sw_init, |
287 | .sw_fini = amdgpu_pp_sw_fini, | 300 | .sw_fini = amdgpu_pp_sw_fini, |
288 | .hw_init = amdgpu_pp_hw_init, | 301 | .hw_init = amdgpu_pp_hw_init, |