@@ -141,6 +141,9 @@ static struct cmn2asic_msg_mapping smu_v13_0_0_message_map[SMU_MSG_MAX_COUNT] =
141
141
MSG_MAP (PrepareMp1ForUnload , PPSMC_MSG_PrepareMp1ForUnload , 0 ),
142
142
MSG_MAP (DFCstateControl , PPSMC_MSG_SetExternalClientDfCstateAllow , 0 ),
143
143
MSG_MAP (ArmD3 , PPSMC_MSG_ArmD3 , 0 ),
144
+ MSG_MAP (SetNumBadMemoryPagesRetired , PPSMC_MSG_SetNumBadMemoryPagesRetired , 0 ),
145
+ MSG_MAP (SetBadMemoryPagesRetiredFlagsPerChannel ,
146
+ PPSMC_MSG_SetBadMemoryPagesRetiredFlagsPerChannel , 0 ),
144
147
};
145
148
146
149
static struct cmn2asic_mapping smu_v13_0_0_clk_map [SMU_CLK_COUNT ] = {
@@ -1838,6 +1841,40 @@ static void smu_v13_0_0_set_smu_mailbox_registers(struct smu_context *smu)
1838
1841
smu -> debug_resp_reg = SOC15_REG_OFFSET (MP1 , 0 , mmMP1_SMN_C2PMSG_54 );
1839
1842
}
1840
1843
1844
+ static int smu_v13_0_0_smu_send_bad_mem_page_num (struct smu_context * smu ,
1845
+ uint32_t size )
1846
+ {
1847
+ int ret = 0 ;
1848
+
1849
+ /* message SMU to update the bad page number on SMUBUS */
1850
+ ret = smu_cmn_send_smc_msg_with_param (smu ,
1851
+ SMU_MSG_SetNumBadMemoryPagesRetired ,
1852
+ size , NULL );
1853
+ if (ret )
1854
+ dev_err (smu -> adev -> dev ,
1855
+ "[%s] failed to message SMU to update bad memory pages number\n" ,
1856
+ __func__ );
1857
+
1858
+ return ret ;
1859
+ }
1860
+
1861
+ static int smu_v13_0_0_send_bad_mem_channel_flag (struct smu_context * smu ,
1862
+ uint32_t size )
1863
+ {
1864
+ int ret = 0 ;
1865
+
1866
+ /* message SMU to update the bad channel info on SMUBUS */
1867
+ ret = smu_cmn_send_smc_msg_with_param (smu ,
1868
+ SMU_MSG_SetBadMemoryPagesRetiredFlagsPerChannel ,
1869
+ size , NULL );
1870
+ if (ret )
1871
+ dev_err (smu -> adev -> dev ,
1872
+ "[%s] failed to message SMU to update bad memory pages channel info\n" ,
1873
+ __func__ );
1874
+
1875
+ return ret ;
1876
+ }
1877
+
1841
1878
static const struct pptable_funcs smu_v13_0_0_ppt_funcs = {
1842
1879
.get_allowed_feature_mask = smu_v13_0_0_get_allowed_feature_mask ,
1843
1880
.set_default_dpm_table = smu_v13_0_0_set_default_dpm_table ,
@@ -1908,6 +1945,8 @@ static const struct pptable_funcs smu_v13_0_0_ppt_funcs = {
1908
1945
.mode1_reset = smu_v13_0_0_mode1_reset ,
1909
1946
.set_mp1_state = smu_v13_0_0_set_mp1_state ,
1910
1947
.set_df_cstate = smu_v13_0_0_set_df_cstate ,
1948
+ .send_hbm_bad_pages_num = smu_v13_0_0_smu_send_bad_mem_page_num ,
1949
+ .send_hbm_bad_channel_flag = smu_v13_0_0_send_bad_mem_channel_flag ,
1911
1950
};
1912
1951
1913
1952
void smu_v13_0_0_set_ppt_funcs (struct smu_context * smu )
0 commit comments