i965: Move device info initialization to common code
authorMark Janes <mark.a.janes@intel.com>
Wed, 24 Jul 2019 20:48:03 +0000 (13:48 -0700)
committerMark Janes <mark.a.janes@intel.com>
Thu, 1 Aug 2019 23:39:44 +0000 (16:39 -0700)
commit96e1c945f2bc4047a603753ae10fc4f27754361c
treea930eef68d90d5ab13389d6e2beb5c339294fd7b
parent1186f6ea6947e779b99b87e48b8e5ac6d25b87bf
i965: Move device info initialization to common code

With perf queries, initializing the device info is much more complex
than just getting a PCI ID and calling gen_get_device_info.  This commit
adds a new gen_get_device_info_from_fd helper in common code which does
all of the requisite kernel queries to get device info including all of
the topology information.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
src/intel/dev/gen_device_info.c
src/intel/dev/gen_device_info.h
src/mesa/drivers/dri/i965/brw_performance_query.c
src/mesa/drivers/dri/i965/intel_screen.c