mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-06 11:00:11 +01:00
intel/dump_gpu: add support for MMAP_OFFSET ioctl
Our driver started using this method to mmap the BOs and we need to hook it to track the dirtiness of the BO. Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com> Tested-by: Marcin Ślusarz <marcin.slusarz@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7528>
This commit is contained in:
parent
44f2de5286
commit
e3893ee204
1 changed files with 11 additions and 0 deletions
|
|
@ -708,6 +708,17 @@ ioctl(int fd, unsigned long request, ...)
|
|||
return ret;
|
||||
}
|
||||
|
||||
case DRM_IOCTL_I915_GEM_MMAP_OFFSET: {
|
||||
ret = libc_ioctl(fd, request, argp);
|
||||
if (ret == 0) {
|
||||
struct drm_i915_gem_mmap_offset *mmap = argp;
|
||||
struct bo *bo = get_bo(fd, mmap->handle);
|
||||
bo->user_mapped = true;
|
||||
bo->dirty = true;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
default:
|
||||
return libc_ioctl(fd, request, argp);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue