mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 19:00:13 +01:00
intel/dump_gpu: Handle a bunch of getparam in the no-HW case
Reviewed-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4250> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4250>
This commit is contained in:
parent
7fd4184378
commit
67a10ea215
1 changed files with 47 additions and 2 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue