mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-01 11:50:09 +01:00
This environment variable allows some Intel devices that are unsupported to be forced to run. These devices have incomplete support, and therefore might not work at all. Reworks: * José: Simplify scan_for_force_probe() with strtok() Signed-off-by: Jordan Justen <jordan.l.justen@intel.com> Reviewed-by: José Roberto de Souza <jose.souza@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/29273>
37 lines
915 B
C
37 lines
915 B
C
#undef NDEBUG
|
|
|
|
#include <stdint.h>
|
|
#include <stdlib.h>
|
|
#include <assert.h>
|
|
|
|
#include "intel_device_info.h"
|
|
#include "intel_device_info_test.h"
|
|
|
|
int
|
|
main(int argc, char *argv[])
|
|
{
|
|
struct {
|
|
uint32_t pci_id;
|
|
const char *name;
|
|
} chipsets[] = {
|
|
#undef CHIPSET
|
|
#define CHIPSET(id, family, family_str, str_name, ...) { .pci_id = id, .name = str_name, },
|
|
#include "pci_ids/iris_pci_ids.h"
|
|
#include "pci_ids/crocus_pci_ids.h"
|
|
};
|
|
|
|
for (uint32_t i = 0; i < ARRAY_SIZE(chipsets); i++) {
|
|
struct intel_device_info devinfo = { 0, };
|
|
char force_probe[10];
|
|
int len = snprintf(force_probe, sizeof force_probe, "%x",
|
|
chipsets[i].pci_id);
|
|
assert(len < sizeof force_probe);
|
|
|
|
setenv("INTEL_FORCE_PROBE", force_probe, 1);
|
|
assert(intel_get_device_info_from_pci_id(chipsets[i].pci_id, &devinfo));
|
|
|
|
verify_device_info(&devinfo);
|
|
}
|
|
|
|
return 0;
|
|
}
|