提交 040cd2d1 编写于 作者: R Rex Zhu 提交者: Alex Deucher

drm/amd/powerplay: Align with VBIOS to support AVFS parameters.

Signed-off-by: NRex Zhu <Rex.Zhu@amd.com>
Reviewed-by: NAlex Deucher <alexander.deucher@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 c5b053d2
...@@ -1206,10 +1206,10 @@ struct atom_asic_profiling_info_v4_1 ...@@ -1206,10 +1206,10 @@ struct atom_asic_profiling_info_v4_1
uint32_t gb_vdroop_table_ckson_a1; uint32_t gb_vdroop_table_ckson_a1;
uint32_t gb_vdroop_table_ckson_a2; uint32_t gb_vdroop_table_ckson_a2;
uint32_t avfsgb_fuse_table_cksoff_m1; uint32_t avfsgb_fuse_table_cksoff_m1;
uint16_t avfsgb_fuse_table_cksoff_m2; uint32_t avfsgb_fuse_table_cksoff_m2;
uint32_t avfsgb_fuse_table_cksoff_b; uint32_t avfsgb_fuse_table_cksoff_b;
uint32_t avfsgb_fuse_table_ckson_m1; uint32_t avfsgb_fuse_table_ckson_m1;
uint16_t avfsgb_fuse_table_ckson_m2; uint32_t avfsgb_fuse_table_ckson_m2;
uint32_t avfsgb_fuse_table_ckson_b; uint32_t avfsgb_fuse_table_ckson_b;
uint16_t max_voltage_0_25mv; uint16_t max_voltage_0_25mv;
uint8_t enable_gb_vdroop_table_cksoff; uint8_t enable_gb_vdroop_table_cksoff;
...@@ -1220,16 +1220,16 @@ struct atom_asic_profiling_info_v4_1 ...@@ -1220,16 +1220,16 @@ struct atom_asic_profiling_info_v4_1
uint8_t enable_apply_avfs_cksoff_voltage; uint8_t enable_apply_avfs_cksoff_voltage;
uint8_t reserved; uint8_t reserved;
uint32_t dispclk2gfxclk_a; uint32_t dispclk2gfxclk_a;
uint16_t dispclk2gfxclk_b; uint32_t dispclk2gfxclk_b;
uint32_t dispclk2gfxclk_c; uint32_t dispclk2gfxclk_c;
uint32_t pixclk2gfxclk_a; uint32_t pixclk2gfxclk_a;
uint16_t pixclk2gfxclk_b; uint32_t pixclk2gfxclk_b;
uint32_t pixclk2gfxclk_c; uint32_t pixclk2gfxclk_c;
uint32_t dcefclk2gfxclk_a; uint32_t dcefclk2gfxclk_a;
uint16_t dcefclk2gfxclk_b; uint32_t dcefclk2gfxclk_b;
uint32_t dcefclk2gfxclk_c; uint32_t dcefclk2gfxclk_c;
uint32_t phyclk2gfxclk_a; uint32_t phyclk2gfxclk_a;
uint16_t phyclk2gfxclk_b; uint32_t phyclk2gfxclk_b;
uint32_t phyclk2gfxclk_c; uint32_t phyclk2gfxclk_c;
}; };
......
...@@ -315,13 +315,13 @@ int pp_atomfwctrl_get_avfs_information(struct pp_hwmgr *hwmgr, ...@@ -315,13 +315,13 @@ int pp_atomfwctrl_get_avfs_information(struct pp_hwmgr *hwmgr,
param->ulGbFuseTableCksoffM1 = param->ulGbFuseTableCksoffM1 =
le32_to_cpu(profile->avfsgb_fuse_table_cksoff_m1); le32_to_cpu(profile->avfsgb_fuse_table_cksoff_m1);
param->ulGbFuseTableCksoffM2 = param->ulGbFuseTableCksoffM2 =
le16_to_cpu(profile->avfsgb_fuse_table_cksoff_m2); le32_to_cpu(profile->avfsgb_fuse_table_cksoff_m2);
param->ulGbFuseTableCksoffB = param->ulGbFuseTableCksoffB =
le32_to_cpu(profile->avfsgb_fuse_table_cksoff_b); le32_to_cpu(profile->avfsgb_fuse_table_cksoff_b);
param->ulGbFuseTableCksonM1 = param->ulGbFuseTableCksonM1 =
le32_to_cpu(profile->avfsgb_fuse_table_ckson_m1); le32_to_cpu(profile->avfsgb_fuse_table_ckson_m1);
param->ulGbFuseTableCksonM2 = param->ulGbFuseTableCksonM2 =
le16_to_cpu(profile->avfsgb_fuse_table_ckson_m2); le32_to_cpu(profile->avfsgb_fuse_table_ckson_m2);
param->ulGbFuseTableCksonB = param->ulGbFuseTableCksonB =
le32_to_cpu(profile->avfsgb_fuse_table_ckson_b); le32_to_cpu(profile->avfsgb_fuse_table_ckson_b);
...@@ -335,25 +335,25 @@ int pp_atomfwctrl_get_avfs_information(struct pp_hwmgr *hwmgr, ...@@ -335,25 +335,25 @@ int pp_atomfwctrl_get_avfs_information(struct pp_hwmgr *hwmgr,
param->ulDispclk2GfxclkM1 = param->ulDispclk2GfxclkM1 =
le32_to_cpu(profile->dispclk2gfxclk_a); le32_to_cpu(profile->dispclk2gfxclk_a);
param->ulDispclk2GfxclkM2 = param->ulDispclk2GfxclkM2 =
le16_to_cpu(profile->dispclk2gfxclk_b); le32_to_cpu(profile->dispclk2gfxclk_b);
param->ulDispclk2GfxclkB = param->ulDispclk2GfxclkB =
le32_to_cpu(profile->dispclk2gfxclk_c); le32_to_cpu(profile->dispclk2gfxclk_c);
param->ulDcefclk2GfxclkM1 = param->ulDcefclk2GfxclkM1 =
le32_to_cpu(profile->dcefclk2gfxclk_a); le32_to_cpu(profile->dcefclk2gfxclk_a);
param->ulDcefclk2GfxclkM2 = param->ulDcefclk2GfxclkM2 =
le16_to_cpu(profile->dcefclk2gfxclk_b); le32_to_cpu(profile->dcefclk2gfxclk_b);
param->ulDcefclk2GfxclkB = param->ulDcefclk2GfxclkB =
le32_to_cpu(profile->dcefclk2gfxclk_c); le32_to_cpu(profile->dcefclk2gfxclk_c);
param->ulPixelclk2GfxclkM1 = param->ulPixelclk2GfxclkM1 =
le32_to_cpu(profile->pixclk2gfxclk_a); le32_to_cpu(profile->pixclk2gfxclk_a);
param->ulPixelclk2GfxclkM2 = param->ulPixelclk2GfxclkM2 =
le16_to_cpu(profile->pixclk2gfxclk_b); le32_to_cpu(profile->pixclk2gfxclk_b);
param->ulPixelclk2GfxclkB = param->ulPixelclk2GfxclkB =
le32_to_cpu(profile->pixclk2gfxclk_c); le32_to_cpu(profile->pixclk2gfxclk_c);
param->ulPhyclk2GfxclkM1 = param->ulPhyclk2GfxclkM1 =
le32_to_cpu(profile->phyclk2gfxclk_a); le32_to_cpu(profile->phyclk2gfxclk_a);
param->ulPhyclk2GfxclkM2 = param->ulPhyclk2GfxclkM2 =
le16_to_cpu(profile->phyclk2gfxclk_b); le32_to_cpu(profile->phyclk2gfxclk_b);
param->ulPhyclk2GfxclkB = param->ulPhyclk2GfxclkB =
le32_to_cpu(profile->phyclk2gfxclk_c); le32_to_cpu(profile->phyclk2gfxclk_c);
......
...@@ -2097,7 +2097,7 @@ static int vega10_populate_avfs_parameters(struct pp_hwmgr *hwmgr) ...@@ -2097,7 +2097,7 @@ static int vega10_populate_avfs_parameters(struct pp_hwmgr *hwmgr)
pp_table->AvfsGbCksOn.m1 = pp_table->AvfsGbCksOn.m1 =
cpu_to_le32(avfs_params.ulGbFuseTableCksonM1); cpu_to_le32(avfs_params.ulGbFuseTableCksonM1);
pp_table->AvfsGbCksOn.m2 = pp_table->AvfsGbCksOn.m2 =
cpu_to_le16(avfs_params.ulGbFuseTableCksonM2); cpu_to_le32(avfs_params.ulGbFuseTableCksonM2);
pp_table->AvfsGbCksOn.b = pp_table->AvfsGbCksOn.b =
cpu_to_le32(avfs_params.ulGbFuseTableCksonB); cpu_to_le32(avfs_params.ulGbFuseTableCksonB);
pp_table->AvfsGbCksOn.m1_shift = 24; pp_table->AvfsGbCksOn.m1_shift = 24;
...@@ -2109,7 +2109,7 @@ static int vega10_populate_avfs_parameters(struct pp_hwmgr *hwmgr) ...@@ -2109,7 +2109,7 @@ static int vega10_populate_avfs_parameters(struct pp_hwmgr *hwmgr)
pp_table->AvfsGbCksOff.m1 = pp_table->AvfsGbCksOff.m1 =
cpu_to_le32(avfs_params.ulGbFuseTableCksoffM1); cpu_to_le32(avfs_params.ulGbFuseTableCksoffM1);
pp_table->AvfsGbCksOff.m2 = pp_table->AvfsGbCksOff.m2 =
cpu_to_le16(avfs_params.ulGbFuseTableCksoffM2); cpu_to_le32(avfs_params.ulGbFuseTableCksoffM2);
pp_table->AvfsGbCksOff.b = pp_table->AvfsGbCksOff.b =
cpu_to_le32(avfs_params.ulGbFuseTableCksoffB); cpu_to_le32(avfs_params.ulGbFuseTableCksoffB);
pp_table->AvfsGbCksOff.m1_shift = 24; pp_table->AvfsGbCksOff.m1_shift = 24;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册