diff options
author | Jason Ekstrand <[email protected]> | 2020-03-19 16:45:19 -0500 |
---|---|---|
committer | Marge Bot <[email protected]> | 2020-03-24 06:28:29 +0000 |
commit | 67a10ea21596b2dff3ea2dc40713e59784e02ef2 (patch) | |
tree | c48067abef24614258fb1bc0e737f24c3efb7f3b /src/intel | |
parent | 7fd4184378268f50ff737851a88c0e836367199d (diff) |
intel/dump_gpu: Handle a bunch of getparam in the no-HW case
Reviewed-by: Lionel Landwerlin <[email protected]>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4250>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4250>
Diffstat (limited to 'src/intel')
-rw-r--r-- | src/intel/tools/intel_dump_gpu.c | 49 |
1 files changed, 47 insertions, 2 deletions
diff --git a/src/intel/tools/intel_dump_gpu.c b/src/intel/tools/intel_dump_gpu.c index fabbf4f73d8..24dd1dffcaa 100644 --- a/src/intel/tools/intel_dump_gpu.c +++ b/src/intel/tools/intel_dump_gpu.c @@ -481,8 +481,53 @@ ioctl(int fd, unsigned long request, ...) if (getparam->param == I915_PARAM_CHIPSET_ID) return get_pci_id(fd, getparam->value); - if (device_override) - return -1; + if (device_override) { + switch (getparam->param) { + case I915_PARAM_CS_TIMESTAMP_FREQUENCY: + *getparam->value = devinfo.timestamp_frequency; + return 0; + + case I915_PARAM_HAS_WAIT_TIMEOUT: + case I915_PARAM_HAS_EXECBUF2: + case I915_PARAM_MMAP_VERSION: + case I915_PARAM_HAS_EXEC_ASYNC: + case I915_PARAM_HAS_EXEC_FENCE: + case I915_PARAM_HAS_EXEC_FENCE_ARRAY: + *getparam->value = 1; + return 0; + + case I915_PARAM_HAS_EXEC_SOFTPIN: + *getparam->value = devinfo.gen >= 8 && !devinfo.is_cherryview; + return 0; + + default: + return -1; + } + } + + return libc_ioctl(fd, request, argp); + } + + case DRM_IOCTL_I915_GEM_CONTEXT_GETPARAM: { + struct drm_i915_gem_context_param *getparam = argp; + + ensure_device_info(fd); + + if (device_override) { + switch (getparam->param) { + case I915_CONTEXT_PARAM_GTT_SIZE: + if (devinfo.is_elkhartlake) + getparam->value = 1ull << 36; + else if (devinfo.gen >= 8 && !devinfo.is_cherryview) + getparam->value = 1ull << 48; + else + getparam->value = 1ull << 31; + return 0; + + default: + return -1; + } + } return libc_ioctl(fd, request, argp); } |