Replace libpci with new parser.
libpci was only used to find a marketing string for a device.
This patch looks for a pci.ids on disk and parses it to extract the
same string, using 'Device xxxx' as the fallback on file i/o error
or missing data from the text file. Tested by checking every vendor/
device pair against the values returned from libpci.
Change-Id: I21af3157472c1824d57fcee31393c6ee8ce07330
Signed-off-by: Jon Chesterfield <Jonathan.Chesterfield@amd.com>
[ROCm/ROCR-Runtime commit: 0a1718b753]
This commit is contained in:
@@ -27,10 +27,10 @@
|
||||
#define LIBHSAKMT_H_INCLUDED
|
||||
|
||||
#include "hsakmt.h"
|
||||
#include "pci_ids.h"
|
||||
#include <pthread.h>
|
||||
#include <stdint.h>
|
||||
#include <limits.h>
|
||||
#include <pci/pci.h>
|
||||
|
||||
extern int kfd_fd;
|
||||
extern unsigned long kfd_open_count;
|
||||
@@ -155,7 +155,7 @@ HSAKMT_STATUS validate_nodeid_array(uint32_t **gpu_id_array,
|
||||
uint32_t NumberOfNodes, uint32_t *NodeArray);
|
||||
|
||||
HSAKMT_STATUS topology_sysfs_get_node_props(uint32_t node_id, HsaNodeProperties *props,
|
||||
uint32_t *gpu_id, struct pci_access* pacc);
|
||||
uint32_t *gpu_id, struct pci_ids pacc);
|
||||
HSAKMT_STATUS topology_sysfs_get_system_props(HsaSystemProperties *props);
|
||||
bool topology_is_dgpu(uint16_t device_id);
|
||||
bool topology_is_svm_needed(uint16_t device_id);
|
||||
|
||||
Reference in New Issue
Block a user