aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRex Zhu <Rex.Zhu@amd.com>2017-09-28 04:12:51 -0400
committerAlex Deucher <alexander.deucher@amd.com>2017-10-06 16:47:49 -0400
commite1827a307e96ec51a657a2b7e68a8ffc36ae2a43 (patch)
treeaad198a277a986ba77bf6ae2825934142dd11af4
parent3811f8f00c5fef3754091b5c5254355bed1d9022 (diff)
drm/amd/powerplay: delete flag PP_VALID
don't need to check pp_valid, all pp export functions are moved to ip_funcs and pp_funcs. so just need to check the function point. 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>
-rw-r--r--drivers/gpu/drm/amd/powerplay/amd_powerplay.c3
-rw-r--r--drivers/gpu/drm/amd/powerplay/inc/pp_instance.h3
2 files changed, 1 insertions, 5 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
index 71bb7d932c86..3c8ef4bfc205 100644
--- a/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
+++ b/drivers/gpu/drm/amd/powerplay/amd_powerplay.c
@@ -37,7 +37,7 @@ static int pp_dpm_dispatch_tasks(void *handle, enum amd_pp_task task_id,
37 37
38static inline int pp_check(struct pp_instance *handle) 38static inline int pp_check(struct pp_instance *handle)
39{ 39{
40 if (handle == NULL || handle->pp_valid != PP_VALID) 40 if (handle == NULL)
41 return -EINVAL; 41 return -EINVAL;
42 42
43 if (handle->hwmgr == NULL || handle->hwmgr->smumgr_funcs == NULL) 43 if (handle->hwmgr == NULL || handle->hwmgr->smumgr_funcs == NULL)
@@ -64,7 +64,6 @@ static int amd_powerplay_create(struct amd_pp_init *pp_init,
64 if (instance == NULL) 64 if (instance == NULL)
65 return -ENOMEM; 65 return -ENOMEM;
66 66
67 instance->pp_valid = PP_VALID;
68 instance->chip_family = pp_init->chip_family; 67 instance->chip_family = pp_init->chip_family;
69 instance->chip_id = pp_init->chip_id; 68 instance->chip_id = pp_init->chip_id;
70 instance->pm_en = pp_init->pm_en; 69 instance->pm_en = pp_init->pm_en;
diff --git a/drivers/gpu/drm/amd/powerplay/inc/pp_instance.h b/drivers/gpu/drm/amd/powerplay/inc/pp_instance.h
index 25fb1460a194..7d1eec5d2e7a 100644
--- a/drivers/gpu/drm/amd/powerplay/inc/pp_instance.h
+++ b/drivers/gpu/drm/amd/powerplay/inc/pp_instance.h
@@ -25,10 +25,7 @@
25 25
26#include "hwmgr.h" 26#include "hwmgr.h"
27 27
28#define PP_VALID 0x1F1F1F1F
29
30struct pp_instance { 28struct pp_instance {
31 uint32_t pp_valid;
32 uint32_t chip_family; 29 uint32_t chip_family;
33 uint32_t chip_id; 30 uint32_t chip_id;
34 bool pm_en; 31 bool pm_en;