diff options
author | Ayaz A Siddiqui <ayaz.siddiqui@intel.com> | 2020-06-02 14:13:29 +0300 |
---|---|---|
committer | Arkadiusz Hiler <arkadiusz.hiler@intel.com> | 2020-06-08 10:34:08 +0300 |
commit | ef908f4abea03c5440d88e1961e75ce07fa4e9bf (patch) | |
tree | 05e0dcfc6ead40327b4edcc0d8bcade1673e2984 /lib/igt_device_scan.h | |
parent | 5f6835e361ba650cb216cb4fdeefec95aa67889c (diff) |
lib/igt_device_scan: Add extra helpers for intel_gpu_top
Will be used in the next patch.
1. set_pci_slot_name(): stores PCI_SLOT_NAME from prop to device
2. igt_device_find_first_discrete_card(): try to find first discrete GPU
3. igt_devices_free(): Free device buffers created during scan
Signed-off-by: Ayaz A Siddiqui <ayaz.siddiqui@intel.com>
Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Petri Latvala <petri.latvala@intel.com>
Diffstat (limited to 'lib/igt_device_scan.h')
-rw-r--r-- | lib/igt_device_scan.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/igt_device_scan.h b/lib/igt_device_scan.h index 3526f1da..9ed73958 100644 --- a/lib/igt_device_scan.h +++ b/lib/igt_device_scan.h @@ -39,10 +39,13 @@ enum igt_devices_print_type { IGT_PRINT_DETAIL, }; +#define INTEGRATED_I915_GPU_PCI_ID "0000:00:02.0" +#define PCI_SLOT_NAME_SIZE 12 struct igt_device_card { char subsystem[NAME_MAX]; char card[NAME_MAX]; char render[NAME_MAX]; + char pci_slot_name[PCI_SLOT_NAME_SIZE+1]; }; void igt_devices_scan(bool force); @@ -51,6 +54,8 @@ void igt_devices_print(enum igt_devices_print_type printtype); void igt_devices_print_vendors(void); void igt_device_print_filter_types(void); +void igt_devices_free(void); + /* * Handle device filter collection array. * IGT can store/retrieve filters passed by user using '--device' args. @@ -63,7 +68,7 @@ const char *igt_device_filter_get(int num); /* Use filter to match the device and fill card structure */ bool igt_device_card_match(const char *filter, struct igt_device_card *card); - +void igt_device_find_first_i915_discrete_card(struct igt_device_card *card); int igt_open_card(struct igt_device_card *card); int igt_open_render(struct igt_device_card *card); |