Merge amd-staging into amd-master 20220506
Signed-off-by: Hao Zhou <Hao.Zhou@amd.com>
Change-Id: I534e31fe3f65d363e5e83d3a72c7eb62d4a7acaf
[ROCm/rocm_smi_lib commit: 318a19d5fb]
Bu işleme şunda yer alıyor:
@@ -118,6 +118,10 @@ enum DevInfoTypes {
|
||||
kDevErrCntSDMA,
|
||||
kDevErrCntUMC,
|
||||
kDevErrCntGFX,
|
||||
kDevErrCntMMHUB,
|
||||
kDevErrCntPCIEBIF,
|
||||
kDevErrCntHDP,
|
||||
kDevErrCntXGMIWAFL,
|
||||
kDevErrCntFeatures,
|
||||
kDevMemTotGTT,
|
||||
kDevMemTotVisVRAM,
|
||||
|
||||
@@ -341,6 +341,22 @@ get_device_error_count(oam_dev_handle_t *handle,
|
||||
type = amd::smi::kDevErrCntGFX;
|
||||
break;
|
||||
|
||||
case RSMI_GPU_BLOCK_MMHUB:
|
||||
type = amd::smi::kDevErrCntMMHUB;
|
||||
break;
|
||||
|
||||
case RSMI_GPU_BLOCK_PCIE_BIF:
|
||||
type = amd::smi::kDevErrCntPCIEBIF;
|
||||
break;
|
||||
|
||||
case RSMI_GPU_BLOCK_HDP:
|
||||
type = amd::smi::kDevErrCntHDP;
|
||||
break;
|
||||
|
||||
case RSMI_GPU_BLOCK_XGMI_WAFL:
|
||||
type = amd::smi::kDevErrCntXGMIWAFL;
|
||||
break;
|
||||
|
||||
default:
|
||||
return RSMI_STATUS_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
@@ -1420,10 +1420,6 @@ def showClocks(deviceList):
|
||||
for device in deviceList:
|
||||
for clk_type in sorted(rsmi_clk_names_dict):
|
||||
freq_list = []
|
||||
if not os.path.isfile(
|
||||
os.path.join('/sys/class/drm', 'card%d' % (device), 'device', 'pp_dpm_%s' % clk_type)):
|
||||
logging.debug('No clock file for %s on card%d' % (clk_type, device))
|
||||
continue
|
||||
if rocmsmi.rsmi_dev_gpu_clk_freq_get(device, rsmi_clk_names_dict[clk_type], None) == 1:
|
||||
ret = rocmsmi.rsmi_dev_gpu_clk_freq_get(device, rsmi_clk_names_dict[clk_type], byref(freq))
|
||||
if rsmi_ret_ok(ret, device, clk_type, True):
|
||||
@@ -1436,7 +1432,7 @@ def showClocks(deviceList):
|
||||
printLog(device, str(x), str(fr))
|
||||
printLog(device, '', None)
|
||||
else:
|
||||
printErrLog(device, '%s frequency is unsupported' % (clk_type))
|
||||
logging.debug('{} frequency is unsupported on device[{}]'.format(clk_type, device))
|
||||
printLog(device, '', None)
|
||||
if rocmsmi.rsmi_dev_pci_bandwidth_get(device, None) == 1:
|
||||
ret = rocmsmi.rsmi_dev_pci_bandwidth_get(device, byref(bw))
|
||||
@@ -1451,7 +1447,7 @@ def showClocks(deviceList):
|
||||
printLog(device, str(x), str(fr))
|
||||
printLog(device, '', None)
|
||||
else:
|
||||
printErrLog(device, 'PCIe frequency is unsupported')
|
||||
logging.debug('PCIe frequency is unsupported on device [{}]'.format(device))
|
||||
printLog(device, '', None)
|
||||
printLogSpacer(None, '-') # divider between devices for better visibility
|
||||
printLogSpacer()
|
||||
@@ -1485,10 +1481,6 @@ def showCurrentClocks(deviceList, clk_defined=None, concise=False):
|
||||
|
||||
else: # if clk is not defined, will display all current clk
|
||||
for clk_type in sorted(rsmi_clk_names_dict):
|
||||
if not os.path.isfile(
|
||||
os.path.join('/sys/class/drm', 'card%d' % (device), 'device', 'pp_dpm_%s' % clk_type)):
|
||||
logging.debug('No clock file for %s on card%d' % (clk_type, device))
|
||||
continue
|
||||
if rocmsmi.rsmi_dev_gpu_clk_freq_get(device, rsmi_clk_names_dict[clk_type], None) == 1:
|
||||
ret = rocmsmi.rsmi_dev_gpu_clk_freq_get(device, rsmi_clk_names_dict[clk_type], byref(freq))
|
||||
if rsmi_ret_ok(ret, device, clk_type, True):
|
||||
@@ -1500,7 +1492,7 @@ def showCurrentClocks(deviceList, clk_defined=None, concise=False):
|
||||
else:
|
||||
printLog(device, '%s clock level: %s' % (clk_type, levl), '(%sMhz)' % (str(fr)[:-2]))
|
||||
else:
|
||||
printErrLog(device, '%s clock is unsupported' % (clk_type))
|
||||
logging.debug('{} clock is unsupported on device[{}]'.format(clk_type, device))
|
||||
# pcie clocks
|
||||
if rocmsmi.rsmi_dev_pci_bandwidth_get(device, None) == 1:
|
||||
ret = rocmsmi.rsmi_dev_pci_bandwidth_get(device, byref(bw))
|
||||
@@ -1510,7 +1502,7 @@ def showCurrentClocks(deviceList, clk_defined=None, concise=False):
|
||||
bw.lanes[current_f])
|
||||
printLog(device, 'pcie clock level', '{} ({})'.format(current_f, fr))
|
||||
else:
|
||||
printErrLog(device, 'PCIe clock is unsupported')
|
||||
logging.debug('PCIe clock is unsupported on device[{}]'.format(device))
|
||||
printLogSpacer()
|
||||
|
||||
|
||||
|
||||
@@ -604,6 +604,22 @@ rsmi_dev_ecc_count_get(uint32_t dv_ind, rsmi_gpu_block_t block,
|
||||
type = amd::smi::kDevErrCntGFX;
|
||||
break;
|
||||
|
||||
case RSMI_GPU_BLOCK_MMHUB:
|
||||
type = amd::smi::kDevErrCntMMHUB;
|
||||
break;
|
||||
|
||||
case RSMI_GPU_BLOCK_PCIE_BIF:
|
||||
type = amd::smi::kDevErrCntPCIEBIF;
|
||||
break;
|
||||
|
||||
case RSMI_GPU_BLOCK_HDP:
|
||||
type = amd::smi::kDevErrCntHDP;
|
||||
break;
|
||||
|
||||
case RSMI_GPU_BLOCK_XGMI_WAFL:
|
||||
type = amd::smi::kDevErrCntXGMIWAFL;
|
||||
break;
|
||||
|
||||
default:
|
||||
return RSMI_STATUS_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
@@ -99,6 +99,10 @@ static const char *kDevPCIEThruPutFName = "pcie_bw";
|
||||
static const char *kDevErrCntSDMAFName = "ras/sdma_err_count";
|
||||
static const char *kDevErrCntUMCFName = "ras/umc_err_count";
|
||||
static const char *kDevErrCntGFXFName = "ras/gfx_err_count";
|
||||
static const char *kDevErrCntMMHUBFName = "ras/mmhub_err_count";
|
||||
static const char *kDevErrCntPCIEBIFFName = "ras/pcie_bif_err_count";
|
||||
static const char *kDevErrCntHDPFName = "ras/hdp_err_count";
|
||||
static const char *kDevErrCntXGMIWAFLFName = "ras/xgmi_wafl_err_count";
|
||||
static const char *kDevErrCntFeaturesFName = "ras/features";
|
||||
static const char *kDevMemPageBadFName = "ras/gpu_vram_bad_pages";
|
||||
static const char *kDevMemTotGTTFName = "mem_info_gtt_total";
|
||||
@@ -241,6 +245,10 @@ static const std::map<DevInfoTypes, const char *> kDevAttribNameMap = {
|
||||
{kDevErrCntSDMA, kDevErrCntSDMAFName},
|
||||
{kDevErrCntUMC, kDevErrCntUMCFName},
|
||||
{kDevErrCntGFX, kDevErrCntGFXFName},
|
||||
{kDevErrCntMMHUB, kDevErrCntMMHUBFName},
|
||||
{kDevErrCntPCIEBIF, kDevErrCntPCIEBIFFName},
|
||||
{kDevErrCntHDP, kDevErrCntHDPFName},
|
||||
{kDevErrCntXGMIWAFL, kDevErrCntXGMIWAFLFName},
|
||||
{kDevErrCntFeatures, kDevErrCntFeaturesFName},
|
||||
{kDevMemTotGTT, kDevMemTotGTTFName},
|
||||
{kDevMemTotVisVRAM, kDevMemTotVisVRAMFName},
|
||||
@@ -339,6 +347,10 @@ static std::map<DevInfoTypes, uint8_t> kDevInfoVarTypeToRSMIVariant = {
|
||||
{kDevErrCntUMC, RSMI_GPU_BLOCK_UMC},
|
||||
{kDevErrCntSDMA, RSMI_GPU_BLOCK_SDMA},
|
||||
{kDevErrCntGFX, RSMI_GPU_BLOCK_GFX},
|
||||
{kDevErrCntMMHUB, RSMI_GPU_BLOCK_MMHUB},
|
||||
{kDevErrCntPCIEBIF, RSMI_GPU_BLOCK_PCIE_BIF},
|
||||
{kDevErrCntHDP, RSMI_GPU_BLOCK_HDP},
|
||||
{kDevErrCntXGMIWAFL, RSMI_GPU_BLOCK_XGMI_WAFL},
|
||||
|
||||
// rsmi_event_group_t
|
||||
{kDevDFCountersAvailable, RSMI_EVNT_GRP_XGMI}
|
||||
@@ -467,6 +479,10 @@ static const std::map<const char *, dev_depends_t> kDevFuncDependsMap = {
|
||||
kDevErrCntUMC,
|
||||
kDevErrCntSDMA,
|
||||
kDevErrCntGFX,
|
||||
kDevErrCntMMHUB,
|
||||
kDevErrCntPCIEBIF,
|
||||
kDevErrCntHDP,
|
||||
kDevErrCntXGMIWAFL,
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -852,6 +868,10 @@ int Device::readDevInfo(DevInfoTypes type, std::vector<std::string> *val) {
|
||||
case kDevErrCntSDMA:
|
||||
case kDevErrCntUMC:
|
||||
case kDevErrCntGFX:
|
||||
case kDevErrCntMMHUB:
|
||||
case kDevErrCntPCIEBIF:
|
||||
case kDevErrCntHDP:
|
||||
case kDevErrCntXGMIWAFL:
|
||||
case kDevMemPageBad:
|
||||
return readDevInfoMultiLineStr(type, val);
|
||||
break;
|
||||
|
||||
Yeni konuda referans
Bir kullanıcı engelle