summaryrefslogtreecommitdiffstats
path: root/src/intel/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/intel/common')
-rw-r--r--src/intel/common/gen_device_info.c11
-rw-r--r--src/intel/common/gen_device_info.h2
2 files changed, 6 insertions, 7 deletions
diff --git a/src/intel/common/gen_device_info.c b/src/intel/common/gen_device_info.c
index 7f1af19f98c..615605c18ba 100644
--- a/src/intel/common/gen_device_info.c
+++ b/src/intel/common/gen_device_info.c
@@ -487,21 +487,20 @@ static const struct gen_device_info gen_device_info_kbl_gt4 = {
.num_slices = 3,
};
-const struct gen_device_info *
-gen_get_device_info(int devid)
+const bool
+gen_get_device_info(int devid, struct gen_device_info *devinfo)
{
- const struct gen_device_info *devinfo;
switch (devid) {
#undef CHIPSET
#define CHIPSET(id, family, name) \
- case id: devinfo = &gen_device_info_##family; break;
+ case id: *devinfo = gen_device_info_##family; break;
#include "pci_ids/i965_pci_ids.h"
default:
fprintf(stderr, "i965_dri.so does not support the 0x%x PCI ID.\n", devid);
- return NULL;
+ return false;
}
- return devinfo;
+ return true;
}
const char *
diff --git a/src/intel/common/gen_device_info.h b/src/intel/common/gen_device_info.h
index 6b639d397a0..8b68a011ea4 100644
--- a/src/intel/common/gen_device_info.h
+++ b/src/intel/common/gen_device_info.h
@@ -143,5 +143,5 @@ struct gen_device_info
/** @} */
};
-const struct gen_device_info *gen_get_device_info(int devid);
+const bool gen_get_device_info(int devid, struct gen_device_info *devinfo);
const char *gen_get_device_name(int devid);