diff options
author | Rex Zhu <Rex.Zhu@amd.com> | 2017-09-25 06:51:50 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-09-28 16:03:33 -0400 |
commit | 6d07fe7bcae57ee73d87766b6cd1e026d3fee85d (patch) | |
tree | d5610d5a4bd1ee4c8bd8e69f668864fbd8ca3cc2 /drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | |
parent | 790d84fdc9826500c88abfca0f3f86e96153bd4e (diff) |
drm/amdgpu: delete pp_enable in adev
amdgpu not care powerplay or dpm is enabled.
just check ip functions and pp functions
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Rex Zhu <Rex.Zhu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c index 2ed81cdb8320..eb886654ce44 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_powerplay.c | |||
@@ -59,7 +59,6 @@ static int amdgpu_pp_early_init(void *handle) | |||
59 | int ret = 0; | 59 | int ret = 0; |
60 | 60 | ||
61 | amd_pp = &(adev->powerplay); | 61 | amd_pp = &(adev->powerplay); |
62 | adev->pp_enabled = false; | ||
63 | amd_pp->pp_handle = (void *)adev; | 62 | amd_pp->pp_handle = (void *)adev; |
64 | 63 | ||
65 | switch (adev->asic_type) { | 64 | switch (adev->asic_type) { |
@@ -73,7 +72,6 @@ static int amdgpu_pp_early_init(void *handle) | |||
73 | case CHIP_STONEY: | 72 | case CHIP_STONEY: |
74 | case CHIP_VEGA10: | 73 | case CHIP_VEGA10: |
75 | case CHIP_RAVEN: | 74 | case CHIP_RAVEN: |
76 | adev->pp_enabled = true; | ||
77 | amd_pp->cgs_device = amdgpu_cgs_create_device(adev); | 75 | amd_pp->cgs_device = amdgpu_cgs_create_device(adev); |
78 | if (amdgpu_create_pp_handle(adev)) | 76 | if (amdgpu_create_pp_handle(adev)) |
79 | return -EINVAL; | 77 | return -EINVAL; |
@@ -138,9 +136,6 @@ static int amdgpu_pp_late_init(void *handle) | |||
138 | ret = adev->powerplay.ip_funcs->late_init( | 136 | ret = adev->powerplay.ip_funcs->late_init( |
139 | adev->powerplay.pp_handle); | 137 | adev->powerplay.pp_handle); |
140 | 138 | ||
141 | if (adev->pp_enabled && adev->pm.dpm_enabled) | ||
142 | amdgpu_dpm_dispatch_task(adev, AMD_PP_TASK_COMPLETE_INIT, NULL, NULL); | ||
143 | |||
144 | return ret; | 139 | return ret; |
145 | } | 140 | } |
146 | 141 | ||
@@ -212,7 +207,7 @@ static void amdgpu_pp_late_fini(void *handle) | |||
212 | adev->powerplay.pp_handle); | 207 | adev->powerplay.pp_handle); |
213 | 208 | ||
214 | 209 | ||
215 | if (adev->pp_enabled) { | 210 | if (adev->powerplay.cgs_device) { |
216 | amd_powerplay_destroy(adev->powerplay.pp_handle); | 211 | amd_powerplay_destroy(adev->powerplay.pp_handle); |
217 | amdgpu_cgs_destroy_device(adev->powerplay.cgs_device); | 212 | amdgpu_cgs_destroy_device(adev->powerplay.cgs_device); |
218 | } | 213 | } |