summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
diff options
context:
space:
mode:
authorRex Zhu <Rex.Zhu@amd.com>2018-02-27 14:09:40 +0800
committerAlex Deucher <alexander.deucher@amd.com>2018-03-05 15:38:20 -0500
commit65ad7cac3866f5fa80dcef3e5048a839046d6a46 (patch)
tree1e5e50ed45d949c0d7dd2966bee06fdad681695d /drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
parenta2c120ce6b686c753968b7b1293c7bb878440b7f (diff)
drm/amd/pp: Refine powerplay instance
Include adev in powerplay instance. so can visit adev directly instand of through cgs interface. 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/powerplay/hwmgr/hwmgr.c')
-rw-r--r--drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c b/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
index 33eabc18211d..7e1bd1144f5d 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/hwmgr.c
@@ -146,10 +146,11 @@ int hwmgr_early_init(struct pp_instance *handle)
return -ENOMEM;
handle->hwmgr = hwmgr;
+ hwmgr->adev = handle->parent;
hwmgr->device = handle->device;
- hwmgr->chip_family = handle->chip_family;
- hwmgr->chip_id = handle->chip_id;
- hwmgr->feature_mask = handle->feature_mask;
+ hwmgr->chip_family = ((struct amdgpu_device *)handle->parent)->family;
+ hwmgr->chip_id = ((struct amdgpu_device *)handle->parent)->asic_type;
+ hwmgr->feature_mask = amdgpu_pp_feature_mask;
hwmgr->usec_timeout = AMD_MAX_USEC_TIMEOUT;
hwmgr->power_source = PP_PowerSource_AC;
hwmgr->pp_table_version = PP_TABLE_V1;