Change AMDSmiDevice to AMDSmiProcessor
grep -rli 'AMDSmiDevice' * | xargs -i@ sed -i 's/AMDSmiDevice/AMDSmiProcessor/g' @ Change-Id: Ib71e11d7122699cc62df3c4e9711ce3fc51e6fdf
This commit is contained in:
committed by
Naveen Krishna Chatradhi
orang tua
6cce103fba
melakukan
c4aa7d2c03
@@ -84,7 +84,7 @@ static amdsmi_status_t get_gpu_device_from_handle(amdsmi_device_handle device_ha
|
||||
if (device_handle == nullptr || gpudevice == nullptr)
|
||||
return AMDSMI_STATUS_INVAL;
|
||||
|
||||
amd::smi::AMDSmiDevice* device = nullptr;
|
||||
amd::smi::AMDSmiProcessor* device = nullptr;
|
||||
amdsmi_status_t r = amd::smi::AMDSmiSystem::getInstance()
|
||||
.handle_to_device(device_handle, &device);
|
||||
if (r != AMDSMI_STATUS_SUCCESS) return r;
|
||||
@@ -230,7 +230,7 @@ amdsmi_status_t amdsmi_get_device_handles(amdsmi_socket_handle socket_handle,
|
||||
if (r != AMDSMI_STATUS_SUCCESS) return r;
|
||||
|
||||
|
||||
std::vector<amd::smi::AMDSmiDevice*>& devices = socket->get_devices();
|
||||
std::vector<amd::smi::AMDSmiProcessor*>& devices = socket->get_devices();
|
||||
uint32_t device_size = static_cast<uint32_t>(devices.size());
|
||||
// Get the device count only
|
||||
if (device_handles == nullptr) {
|
||||
@@ -257,7 +257,7 @@ amdsmi_status_t amdsmi_get_device_type(amdsmi_device_handle device_handle ,
|
||||
if (device_type == nullptr) {
|
||||
return AMDSMI_STATUS_INVAL;
|
||||
}
|
||||
amd::smi::AMDSmiDevice* device = nullptr;
|
||||
amd::smi::AMDSmiProcessor* device = nullptr;
|
||||
amdsmi_status_t r = amd::smi::AMDSmiSystem::getInstance()
|
||||
.handle_to_device(device_handle, &device);
|
||||
if (r != AMDSMI_STATUS_SUCCESS) return r;
|
||||
@@ -355,7 +355,7 @@ amdsmi_status_t amdsmi_get_vram_usage(amdsmi_device_handle device_handle,
|
||||
return AMDSMI_STATUS_INVAL;
|
||||
}
|
||||
|
||||
amd::smi::AMDSmiDevice* device = nullptr;
|
||||
amd::smi::AMDSmiProcessor* device = nullptr;
|
||||
amdsmi_status_t ret = amd::smi::AMDSmiSystem::getInstance()
|
||||
.handle_to_device(device_handle, &device);
|
||||
if (ret != AMDSMI_STATUS_SUCCESS) return ret;
|
||||
@@ -397,7 +397,7 @@ amdsmi_status_t amdsmi_get_caps_info(amdsmi_device_handle device_handle,
|
||||
return AMDSMI_STATUS_INVAL;
|
||||
}
|
||||
|
||||
amd::smi::AMDSmiDevice* amd_device = nullptr;
|
||||
amd::smi::AMDSmiProcessor* amd_device = nullptr;
|
||||
amdsmi_status_t ret = amd::smi::AMDSmiSystem::getInstance()
|
||||
.handle_to_device(device_handle, &amd_device);
|
||||
if (ret != AMDSMI_STATUS_SUCCESS) return ret;
|
||||
|
||||
@@ -104,7 +104,7 @@ amdsmi_status_t AMDSmiSystem::populate_amd_gpu_devices() {
|
||||
sockets_.push_back(socket);
|
||||
}
|
||||
|
||||
AMDSmiDevice* device = new AMDSmiGPUDevice(i, drm_);
|
||||
AMDSmiProcessor* device = new AMDSmiGPUDevice(i, drm_);
|
||||
socket->add_device(device);
|
||||
devices_.insert(device);
|
||||
}
|
||||
@@ -166,11 +166,11 @@ amdsmi_status_t AMDSmiSystem::handle_to_socket(
|
||||
|
||||
amdsmi_status_t AMDSmiSystem::handle_to_device(
|
||||
amdsmi_device_handle device_handle,
|
||||
AMDSmiDevice** device) {
|
||||
AMDSmiProcessor** device) {
|
||||
if (device_handle == nullptr || device == nullptr) {
|
||||
return AMDSMI_STATUS_INVAL;
|
||||
}
|
||||
*device = static_cast<AMDSmiDevice*>(device_handle);
|
||||
*device = static_cast<AMDSmiProcessor*>(device_handle);
|
||||
|
||||
// double check handlers is here
|
||||
if (std::find(devices_.begin(), devices_.end(), *device)
|
||||
|
||||
Reference in New Issue
Block a user