summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnuj Phogat <anuj.phogat@gmail.com>2021-04-13 21:50:42 -0700
committerMarge Bot <eric+marge@anholt.net>2021-04-20 20:06:34 +0000
commit6b4767d0839e8ae78ea107809d451adc4fc071ad (patch)
tree42fd57b900d53adc05e3fcddc4b306e053ec0a44
parent4f42b28cc331e1fd0b7bd86542b481b924c5e680 (diff)
intel: Remove devinfo_to_gen() helper function
This changes behavior. Now Baytrail will be decoded with the gen7.xml instead of the gen75.xml. Haswell is the only graphics hardware generation 75 and Baytrail is closer to Ivybridge in most ways. (Kenneth Graunke) Signed-off-by: Anuj Phogat <anuj.phogat@gmail.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10241>
-rw-r--r--src/intel/common/intel_decoder.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/src/intel/common/intel_decoder.c b/src/intel/common/intel_decoder.c
index 7e31065bdaf..bead0f502c2 100644
--- a/src/intel/common/intel_decoder.c
+++ b/src/intel/common/intel_decoder.c
@@ -507,16 +507,6 @@ character_data(void *data, const XML_Char *s, int len)
{
}
-static int
-devinfo_to_gen(const struct intel_device_info *devinfo, bool x10)
-{
- if (devinfo->is_baytrail || devinfo->is_haswell) {
- return devinfo->ver * 10 + 5;
- }
-
- return x10 ? devinfo->ver * 10 : devinfo->ver;
-}
-
static uint32_t zlib_inflate(const void *compressed_data,
uint32_t compressed_len,
void **out_ptr)
@@ -602,7 +592,7 @@ intel_spec_load(const struct intel_device_info *devinfo)
uint8_t *text_data = NULL;
uint32_t text_offset = 0, text_length = 0;
ASSERTED uint32_t total_length;
- uint32_t gen_10 = devinfo_to_gen(devinfo, true);
+ uint32_t gen_10 = devinfo->verx10;
for (int i = 0; i < ARRAY_SIZE(genxml_files_table); i++) {
if (genxml_files_table[i].gen_10 == gen_10) {
@@ -742,7 +732,7 @@ intel_spec_load_from_path(const struct intel_device_info *devinfo,
char *filename = malloc(filename_len);
ASSERTED size_t len = snprintf(filename, filename_len, "%s/gen%i.xml",
- path, devinfo_to_gen(devinfo, false));
+ path, devinfo->ver);
assert(len < filename_len);
struct intel_spec *spec = intel_spec_load_filename(filename);