mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-20 05:40:39 +02:00
intel/stub: plug some gaps in our ioctl faking
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com> Acked-by: Jason Ekstrand <jason@jlekstrand.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8934>
This commit is contained in:
parent
c4c642a7b4
commit
6c489dfefc
1 changed files with 22 additions and 0 deletions
|
|
@ -92,6 +92,22 @@ i915_ioctl_gem_mmap(int fd, unsigned long request, void *arg)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
i915_ioctl_gem_userptr(int fd, unsigned long request, void *arg)
|
||||
{
|
||||
struct shim_fd *shim_fd = drm_shim_fd_lookup(fd);
|
||||
struct drm_i915_gem_userptr *userptr = arg;
|
||||
struct i915_bo *bo = calloc(1, sizeof(*bo));
|
||||
|
||||
drm_shim_bo_init(&bo->base, userptr->user_size);
|
||||
|
||||
userptr->handle = drm_shim_bo_get_handle(shim_fd, &bo->base);
|
||||
|
||||
drm_shim_bo_put(&bo->base);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
i915_ioctl_gem_context_create(int fd, unsigned long request, void *arg)
|
||||
{
|
||||
|
|
@ -172,6 +188,9 @@ i915_ioctl_get_param(int fd, unsigned long request, void *arg)
|
|||
case I915_PARAM_HAS_EXEC_BATCH_FIRST:
|
||||
*gp->value = true;
|
||||
return 0;
|
||||
case I915_PARAM_HAS_EXEC_TIMELINE_FENCES:
|
||||
*gp->value = false;
|
||||
return 0;
|
||||
case I915_PARAM_CMD_PARSER_VERSION:
|
||||
/* Most recent version in drivers/gpu/drm/i915/i915_cmd_parser.c */
|
||||
*gp->value = 10;
|
||||
|
|
@ -327,6 +346,8 @@ static ioctl_fn_t driver_ioctls[] = {
|
|||
[DRM_I915_GEM_EXECBUFFER2] = i915_ioctl_noop,
|
||||
[DRM_I915_GEM_EXECBUFFER2_WR] = i915_ioctl_noop,
|
||||
|
||||
[DRM_I915_GEM_USERPTR] = i915_ioctl_gem_userptr,
|
||||
|
||||
[DRM_I915_GEM_GET_APERTURE] = i915_gem_get_aperture,
|
||||
|
||||
[DRM_I915_REG_READ] = i915_ioctl_noop,
|
||||
|
|
@ -334,6 +355,7 @@ static ioctl_fn_t driver_ioctls[] = {
|
|||
[DRM_I915_GEM_SET_DOMAIN] = i915_ioctl_noop,
|
||||
[DRM_I915_GEM_GET_CACHING] = i915_ioctl_noop,
|
||||
[DRM_I915_GEM_SET_CACHING] = i915_ioctl_noop,
|
||||
[DRM_I915_GEM_GET_TILING] = i915_ioctl_noop,
|
||||
[DRM_I915_GEM_MADVISE] = i915_ioctl_noop,
|
||||
[DRM_I915_GEM_WAIT] = i915_ioctl_noop,
|
||||
[DRM_I915_GEM_BUSY] = i915_ioctl_noop,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue