diff options
author | Lionel Landwerlin <[email protected]> | 2018-02-21 19:15:46 +0000 |
---|---|---|
committer | Lionel Landwerlin <[email protected]> | 2018-03-22 20:14:22 +0000 |
commit | 57a11550bc6195c404496e4278920ea63a343f08 (patch) | |
tree | 86e49b4c8d3677007c85aad8ea98dd762ef81e66 /src/intel/dev/gen_device_info.h | |
parent | c1900f5b0fb7a6f22a13f67e2645f3754b5df245 (diff) |
i965: perf: query topology
With the introduction of asymmetric slices in CNL, we cannot rely on
the previous SUBSLICE_MASK getparam to tell userspace what subslices
are available.
We introduce a new uAPI in the kernel driver to report exactly what
part of the GPU are fused and require this to be available on Gen10+.
Prior generations can continue to rely on GETPARAM on older kernels.
This patch is quite a lot of code because we have to support lots of
different kernel versions, ranging from not providing any information
(for Haswell on 4.13 through 4.17), to being able to query through
GETPARAM (for gen8/9 on 4.13 through 4.17), to finally requiring 4.17
for Gen10+.
This change stores topology information in a unified way on
brw_context.topology from the various kernel APIs. And then generates
the appropriate values for the equations from that unified topology.
v2: Move slice/subslice masks fields to gen_device_info (Rafael)
v3: Add a gen_device_info_subslice_available() helper (Lionel)
Signed-off-by: Lionel Landwerlin <[email protected]>
Acked-by: Rafael Antognolli <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/intel/dev/gen_device_info.h')
-rw-r--r-- | src/intel/dev/gen_device_info.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/intel/dev/gen_device_info.h b/src/intel/dev/gen_device_info.h index 4d08f0dfedd..40b72383420 100644 --- a/src/intel/dev/gen_device_info.h +++ b/src/intel/dev/gen_device_info.h @@ -247,6 +247,14 @@ struct gen_device_info #define gen_device_info_is_9lp(devinfo) \ ((devinfo)->is_broxton || (devinfo)->is_geminilake) +static inline bool +gen_device_info_subslice_available(const struct gen_device_info *devinfo, + int slice, int subslice) +{ + return (devinfo->subslice_masks[slice * devinfo->subslice_slice_stride + + subslice / 8] & (1U << (subslice % 8))) != 0; +} + int gen_get_pci_device_id_override(void); int gen_device_name_to_pci_device_id(const char *name); bool gen_get_device_info(int devid, struct gen_device_info *devinfo); |