Mesa (master): intel/dev: add warning on missing kernel uAPI for Gen8+
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Mar 12 18:59:56 UTC 2021
Module: Mesa
Branch: master
Commit: fa17bbe00cc9ec54f5bb348f302be01d352a2a1b
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=fa17bbe00cc9ec54f5bb348f302be01d352a2a1b
Author: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Date: Wed Feb 3 11:41:58 2021 +0200
intel/dev: add warning on missing kernel uAPI for Gen8+
We carry those warnings in i965/anv. Let's have them here. Next commit
we remove some code from the drivers.
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
Reviewed-by: Jordan Justen <jordan.l.justen at intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9052>
---
src/intel/dev/gen_device_info.c | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
diff --git a/src/intel/dev/gen_device_info.c b/src/intel/dev/gen_device_info.c
index f7caf4bfc3b..234754ba5bf 100644
--- a/src/intel/dev/gen_device_info.c
+++ b/src/intel/dev/gen_device_info.c
@@ -1296,17 +1296,26 @@ getparam_topology(struct gen_device_info *devinfo, int fd)
{
int slice_mask = 0;
if (!getparam(fd, I915_PARAM_SLICE_MASK, &slice_mask))
- return false;
+ goto maybe_warn;
int n_eus;
if (!getparam(fd, I915_PARAM_EU_TOTAL, &n_eus))
- return false;
+ goto maybe_warn;
int subslice_mask = 0;
if (!getparam(fd, I915_PARAM_SUBSLICE_MASK, &subslice_mask))
- return false;
+ goto maybe_warn;
return update_from_masks(devinfo, slice_mask, subslice_mask, n_eus);
+
+ maybe_warn:
+ /* Only with Gen8+ are we starting to see devices with fusing that can only
+ * be detected at runtime.
+ */
+ if (devinfo->gen >= 8)
+ fprintf(stderr, "Kernel 4.1 required to properly query GPU properties.\n");
+
+ return false;
}
/**
@@ -1437,9 +1446,10 @@ gen_get_device_info_from_fd(int fd, struct gen_device_info *devinfo)
if (getparam(fd, I915_PARAM_CS_TIMESTAMP_FREQUENCY,
×tamp_frequency))
devinfo->timestamp_frequency = timestamp_frequency;
- else if (devinfo->gen >= 10)
- /* gen10 and later requires the timestamp_frequency to be updated */
+ else if (devinfo->gen >= 10) {
+ fprintf(stderr, "Kernel 4.15 required to read the CS timestamp frequency.\n");
return false;
+ }
if (!getparam(fd, I915_PARAM_REVISION, &devinfo->revision))
devinfo->revision = 0;
More information about the mesa-commit
mailing list