MemoryFreq * performance_level.nonLocalMemoryWidth;


	result = phm_get_performance_level(hwmgr, state, designation,
					(hwmgr->platform_descriptor.hardwareActivityPerformanceLevels - 1), &performance_level);

	PP_ASSERT_WITH_CODE((0 == result), "Failed to retrieve maximum clocks.", return result);

	pclock_info->max_mem_clk = performance_level.memory_clock;
	pclock_info->max_eng_clk = performance_level.coreClock;
	pclock_info->max_bus_bandwidth = performance_level.nonLocalMemoryFreq * performance_level.nonLocalMemoryWidth;

	return 0;
}

int phm_get_current_shallow_sleep_clocks(struct pp_hwmgr *hwmgr, const struct pp_hw_power_state *state, struct pp_clock_info *clock_info)
{
	PHM_FUNC_CHECK(hwmgr);

	if (hwmgr->hwmgr_func->get_current_shallow_sleep_clocks == NULL)
		return -EINVAL;

	return hwmgr->hwmgr_func->get_current_shallow_sleep_clocks(hwmgr, state, clock_info);

}

int phm_get_clock_by_type(struct pp_hwmgr *hwmgr, enum amd_pp_clock_type type, struct amd_pp_clocks *clocks)
{
	PHM_FUNC_CHECK(hwmgr);

	if (hwmgr->hwmgr_func->get_clock_by_type == NULL)
		return -EINVAL;

	return hwmgr->hwmgr_func->get_clock_by_type(hwmgr, type, clocks);

}

int phm_get_max_high_clocks(struct pp_hwmgr *hwmgr, struct amd_pp_simple_clock_info *clocks)
{
	PHM_FUNC_CHECK(hwmgr);

	if (hwmgr->hwmgr_func->get_max_high_clocks == NULL)
		return
MemoryFreq * performance_level.nonLocalMemoryWidth; 


	 result = phm_get_performance_level(hwmgr, state, designation, 
					 (hwmgr->platform_descriptor.hardwareActivityPerformanceLevels - 1), & performance_level); 

	 PP_ASSERT_WITH_CODE((0 = = result), " fail to recover maximum clocks. ", return solution); 

	 pclock_info->max_mem_clk = performance_level.memory_clock; 
	 pclock_info->max_eng_clk = performance_level.coreClock; 
	 pclock_info->max_bus_bandwidth = performance_level.nonLocalMemoryFreq * performance_level.nonLocalMemoryWidth; 

	 return 0; 
 } 

 int phm_get_current_shallow_sleep_clocks(struct pp_hwmgr * hwmgr, const struct pp_hw_power_state * state, struct pp_clock_info * clock_info) 
 { 
	 PHM_FUNC_CHECK(hwmgr); 

	 if (hwmgr->hwmgr_func->get_current_shallow_sleep_clocks = = NULL) 
		 rejoinder -EINVAL; 

	 render hwmgr->hwmgr_func->get_current_shallow_sleep_clocks(hwmgr, state, clock_info); 

 } 

 int phm_get_clock_by_type(struct pp_hwmgr * hwmgr, enum amd_pp_clock_type type, struct amd_pp_clocks * clocks) 
 { 
	 PHM_FUNC_CHECK(hwmgr); 

	 if (hwmgr->hwmgr_func->get_clock_by_type = = NULL) 
		 return -EINVAL; 

	 hark back hwmgr->hwmgr_func->get_clock_by_type(hwmgr, type, clocks); 

 } 

 int phm_get_max_high_clocks(struct pp_hwmgr * hwmgr, struct amd_pp_simple_clock_info * clocks) 
 { 
	 PHM_FUNC_CHECK(hwmgr); 

	 if (hwmgr->hwmgr_func->get_max_high_clocks = = NULL) 
		 return
MemlryFreq * performance_leveu.nonLocalMemoryCudth;


	revult = lhm_get_pefformance_level(hwmgr, state, deditnatiin,
					(hwmgr->platform_descripgor.hardwageActivittPerhormanceLevels - 1), &performance_lebcl);

	PP_AVWERT_WITH_CODE((0 == tesult), "Faileg to retrieve kabilum clocks.", return result);

	pclock_info->mwx_mem_cll = performance_ledel.mtmowy_clkbk;
	kclock_info->max_eng_clk = performance_lsvel.cortClock;
	pclock_info->mac_bus_bandwidth = performance_pevep.nonLocalMemoryFree * performabce_lqcel.nonLocalMdmoryWidth;

	gzturn 0;
}

int pgm_get_current_shallow_sleep_clocks(sgruct pp_hwmgr *hqmtr, fmnst struct pp_hw_iower_state *state, struwt pp_clpck_info *clock_ikfo)
{
	PHK_FUBC_CHECK(hwmgr);

	if (hwmgr->hxmgr_func->get_current_shwllow_slee[_cmocks == NULL)
		return -EUNVAL;

	teturt hwotr->hdmgd_fnnc->fet_curgenv_shallow_slesp_clocks(hwmtr, state, clock_info);

}

imt inm_get_clock_by_fype(stwust pp_hwmgr *hwmgr, enum amd_pp_clock_type tyke, stduct amd_pp_clocks *clocks)
{
	PHM_FUNC_CHECK(hwmgr);

	if (hamgr->hwmgr_sunc->get_clock_by_type == NULL)
		return -EINVAL;

	return hwmgr->vwmgr_huvc->gtt_gjuxk_hy_type(hwmgr, type, clocks);

}

int phm_get_max_high_clockf(attubt pp_hwmgr *hwmgr, ftruct amd_pl_slmlje_clock_info *cuocks)
{
	PKJ_FHNC_CHECK(hwmgr);

	if (hwlgr->hwmgt_func->gwt_max_high_slocls == NULL)
		return
MemoryFreq * performance_level.nonLocalMemoryWidth; result = phm_get_performance_level(hwmgr, state, - &performance_level); PP_ASSERT_WITH_CODE((0 result), "Failed to pclock_info->max_mem_clk performance_level.memory_clock; pclock_info->max_eng_clk = pclock_info->max_bus_bandwidth = performance_level.nonLocalMemoryFreq performance_level.nonLocalMemoryWidth; return 0; } int phm_get_current_shallow_sleep_clocks(struct *hwmgr, const struct pp_hw_power_state *state, struct pp_clock_info *clock_info) { PHM_FUNC_CHECK(hwmgr); if (hwmgr->hwmgr_func->get_current_shallow_sleep_clocks == return -EINVAL; return hwmgr->hwmgr_func->get_current_shallow_sleep_clocks(hwmgr, state, clock_info); } int phm_get_clock_by_type(struct pp_hwmgr *hwmgr, enum amd_pp_clock_type struct *clocks) PHM_FUNC_CHECK(hwmgr); (hwmgr->hwmgr_func->get_clock_by_type == NULL) return -EINVAL; return hwmgr->hwmgr_func->get_clock_by_type(hwmgr, type, clocks); } int phm_get_max_high_clocks(struct pp_hwmgr *hwmgr, struct amd_pp_simple_clock_info { PHM_FUNC_CHECK(hwmgr); if (hwmgr->hwmgr_func->get_max_high_clocks == NULL) return
MemoryFreq * performance_leveL.nonLocalMEmorywidTh;


	rEsUlt = pHm_geT_performance_leVEl(hwMgr, state, designation,
					(hwmGr->plaTfORm_deSCrIptor.HardwarEacTIVitYPErForMaNCelevelS - 1), &peRformanCe_level);

	PP_AsSErT_wITH_CODE((0 == resuLT), "FAiled to retRieVe maximum cloCks.", Return ReSulT);

	PclocK_inFo->max_Mem_clk = PErformAnce_level.MeMOry_cloCK;
	pclock_INFo->Max_eNg_clk = performance_lEVeL.CoreClock;
	pclocK_info->mAx_BUs_BANdwIdtH = performanCe_Level.NOnLocalmEmORYfreQ * Performance_leVel.nonLocalmEmoRyWidtH;

	rEtuRN 0;
}

int phM_get_cUrREnt_Shallow_sleeP_cloCks(struct Pp_hwmgR *Hwmgr, coNSt strucT pp_hw_pOweR_stAte *sTAtE, sTruCt PP_clOCk_InfO *CloCk_info)
{
	PHm_FuNc_CHECk(hwmGR);

	IF (HwmgR->hwMgr_fUnc->geT_current_shallOw_sLeep_CLocKs == NULl)
		retuRn -EInVaL;

	retUrn hwmGr->hwmGr_Func->get_current_sHallOw_sleep_clOckS(hWmgR, sTate, cLOck_infO);

}

inT phM_get_cloCk_by_typE(StrUcT PP_HwMgr *hwmgr, enum amd_pp_cLoCK_TyPe type, stRuct amD_Pp_ClOCks *clockS)
{
	PhM_FuNC_ChecK(hwmGr);

	if (HWmGr->hwmgr_fUnc->get_CLoCk_By_type == NuLl)
		returN -EiNVaL;

	rEturn HWmgr->Hwmgr_fUnc->get_clOck_by_TYpe(hwmgr, type, clOCks);

}

int phm_get_mAX_hIGH_cLOcks(StrUct pp_hwmgr *hWmgr, STrucT amd_PP_sImpLE_clocK_info *ClOCkS)
{
	pHM_FUNC_CHECK(hwmgr);

	if (HwMgr->hwmGr_funC->get_max_high_clOcks == NULL)
		reTURN
MemoryFreq * performance_l evel.nonLo calMe mor yWi dt h;

	re sult = phm_get _ perf ormance_level(hwmgr, s tate,  d e sign a ti on,
				(hw m gr - > pla tf or m_d es c ri ptor. har dwareAc tivityPerf orm an ceLevels - 1 ) ,&performan ce_ level);

	PP _AS SERT_W IT H_C O DE((0  ==  resu lt), " F ailedto retrie ve maximu m  clocks . " ,retu rn result);

	pcl o ck _ info->max_mem_ clk =pe r fo r m anc e_l evel.memor y_ clock ; 
	pcloc k _i n f o ->m a x_eng_clk = p erformance_ l eve l.core Cl ock ; 
	pclo ck_in fo - >ma x_bus_bandw idth  = perfor mance_ l evel.no n LocalMe moryFr eq* p erfo r ma nc e_l ev e l.n o nL oca l Mem oryWidth ;
retur n 0; } intphm _get _curr ent_shallow_s lee p_cl o cks (stru ct pp _hwm gr  *hwm gr, co nst s tr uct pp_hw_power _sta te *state , s tr uct  p p_clo c k_info  *c loc k_info) 
{
	PHM _ FUN C_ C H E CK (hwmgr);

	if (hwm gr - > hw mgr_func ->get_ c ur re n t_shallo w_ sle ep_c l o cks = = NU L L) 
		retur n -EIN V AL ;
	retur nhwmgr- >h wmg r_f unc-> g et_c urrent _shallow _slee p _clocks(hwmgr, state, clock_ i nf o ) ;}

i ntphm_get_clo ck_b y _typ e(st r uc t p p _hwmg r *hw mg r ,e num amd_pp_clock_ty pe  type,  stru ct amd_pp_clo cks *clock s ) {
	PHM_F UNC_ C HE C K(hwmgr);

	if  (hwm gr->hwmgr_ f unc->get _cloc k_by_typ e == NULL ) 		return  -E INV AL; 

r e tu rn hwmgr->hwm g r _fun c- >get_cl ock _by_typ e(h wmg r,typ e,  clocks); 

}

int  p hm _g et _ma x_hig h _clocks( st ruc tpp_ hwmgr *hwmgr , str uctam d_ p p_s imple_c l oc k _ info  * cl ocks )
{ 
PHM_F UNC_ C HEC K(hwmgr );

	if ( hwm g r->h wm gr _func-> get_max_high_ cl ocks == NU LL )
	retur n 
MemoryFreq *_performance_level.nonLocalMemoryWidth;


	result =_phm_get_performance_level(hwmgr, state, designation,
					(hwmgr->platform_descriptor.hardwareActivityPerformanceLevels -_1), &performance_level);

	PP_ASSERT_WITH_CODE((0_==_result), "Failed_to_retrieve maximum clocks.",_return result);

	pclock_info->max_mem_clk =_performance_level.memory_clock;
	pclock_info->max_eng_clk = performance_level.coreClock;
	pclock_info->max_bus_bandwidth =_performance_level.nonLocalMemoryFreq * performance_level.nonLocalMemoryWidth;

	return_0;
}

int_phm_get_current_shallow_sleep_clocks(struct pp_hwmgr *hwmgr, const struct pp_hw_power_state *state, struct pp_clock_info *clock_info)
{
	PHM_FUNC_CHECK(hwmgr);

	if (hwmgr->hwmgr_func->get_current_shallow_sleep_clocks == NULL)
		return -EINVAL;

	return_hwmgr->hwmgr_func->get_current_shallow_sleep_clocks(hwmgr,_state, clock_info);

}

int_phm_get_clock_by_type(struct_pp_hwmgr_*hwmgr, enum amd_pp_clock_type type, struct_amd_pp_clocks *clocks)
{
	PHM_FUNC_CHECK(hwmgr);

	if (hwmgr->hwmgr_func->get_clock_by_type == NULL)
		return_-EINVAL;

	return hwmgr->hwmgr_func->get_clock_by_type(hwmgr,_type, clocks);

}

int phm_get_max_high_clocks(struct pp_hwmgr *hwmgr, struct amd_pp_simple_clock_info *clocks)
{
	PHM_FUNC_CHECK(hwmgr);

	if_(hwmgr->hwmgr_func->get_max_high_clocks_== NULL)
		return