Don't depend on vbios_version sysfs file
On APU's vbios_version string might not be exposed. Relying on vendor ID to detect AMDGPU is sufficient Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com> Change-Id: I08ef4b4bc7491a40f318791803aeaf261f7fac25
This commit is contained in:
@@ -543,15 +543,10 @@ static const uint32_t kAmdGpuId = 0x1002;
|
||||
|
||||
static bool isAMDGPU(std::string dev_path) {
|
||||
std::string vend_path = dev_path + "/device/vendor";
|
||||
std::string vbios_v_path = dev_path + "/device/vbios_version";
|
||||
if (!FileExists(vend_path.c_str())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!FileExists(vbios_v_path.c_str())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
std::ifstream fs;
|
||||
fs.open(vend_path);
|
||||
|
||||
|
||||
Verwijs in nieuw issue
Block a user