diff options
author | Lingfeng Yang <lfy@google.com> | 2020-04-16 11:35:40 -0700 |
---|---|---|
committer | Alistair Delva <adelva@google.com> | 2020-04-22 16:26:40 -0700 |
commit | b0d1df782a3d09a4d0e18e89fea0d2b7b6fc4a0f (patch) | |
tree | c85dc5c6a72591929b4e5b34a54d89a512bf5934 | |
parent | 96fa682236fb27ec6989e7a33a1a248314eee7ec (diff) | |
download | cuttlefish-modules-b0d1df782a3d09a4d0e18e89fea0d2b7b6fc4a0f.tar.gz |
CHROMIUM: drm/virtgpu: add stub ioctl implementation
Add plumbing for new ioctls.
BUG=chromium:924405
TEST=compile
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/1629911
Reviewed-by: Robert Tarasov <tutankhamen@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Gurchetan Singh <gurchetansingh@chromium.org>
[rebase54(groeck): Context conflicts]
Signed-off-by: Guenter Roeck <groeck@chromium.org>
Bug: 153580313
Signed-off-by: Lingfeng Yang <lfy@google.com>
Change-Id: I3c4a27e4f656d0884ef9e1f056a89aa875ec6d2a
-rw-r--r-- | virtio_gpu/virtgpu_drv.h | 2 | ||||
-rw-r--r-- | virtio_gpu/virtgpu_ioctl.c | 30 |
2 files changed, 31 insertions, 1 deletions
diff --git a/virtio_gpu/virtgpu_drv.h b/virtio_gpu/virtgpu_drv.h index 4d8bf14..7405914 100644 --- a/virtio_gpu/virtgpu_drv.h +++ b/virtio_gpu/virtgpu_drv.h @@ -242,7 +242,7 @@ struct virtio_gpu_fpriv { }; /* virtio_ioctl.c */ -#define DRM_VIRTIO_NUM_IOCTLS 10 +#define DRM_VIRTIO_NUM_IOCTLS 13 extern struct drm_ioctl_desc virtio_gpu_ioctls[DRM_VIRTIO_NUM_IOCTLS]; int virtio_gpu_object_list_validate(struct ww_acquire_ctx *ticket, struct list_head *head); diff --git a/virtio_gpu/virtgpu_ioctl.c b/virtio_gpu/virtgpu_ioctl.c index 29ea338..e3b1a00 100644 --- a/virtio_gpu/virtgpu_ioctl.c +++ b/virtio_gpu/virtgpu_ioctl.c @@ -573,6 +573,24 @@ copy_exit: return 0; } +static int virtio_gpu_resource_create_v2_ioctl(struct drm_device *dev, + void *data, struct drm_file *file) +{ + return 0; +} + +static int virtio_gpu_allocation_metadata_request_ioctl(struct drm_device *dev, + void *data, struct drm_file *file) +{ + return 0; +} + +static int virtio_gpu_allocation_metadata_response_ioctl(struct drm_device *dev, + void *data, struct drm_file *file) +{ + return 0; +} + struct drm_ioctl_desc virtio_gpu_ioctls[DRM_VIRTIO_NUM_IOCTLS] = { DRM_IOCTL_DEF_DRV(VIRTGPU_MAP, virtio_gpu_map_ioctl, DRM_AUTH | DRM_RENDER_ALLOW), @@ -605,4 +623,16 @@ struct drm_ioctl_desc virtio_gpu_ioctls[DRM_VIRTIO_NUM_IOCTLS] = { DRM_IOCTL_DEF_DRV(VIRTGPU_GET_CAPS, virtio_gpu_get_caps_ioctl, DRM_AUTH | DRM_RENDER_ALLOW), + + DRM_IOCTL_DEF_DRV(VIRTGPU_RESOURCE_CREATE_V2, + virtio_gpu_resource_create_v2_ioctl, + DRM_AUTH | DRM_RENDER_ALLOW), + + DRM_IOCTL_DEF_DRV(VIRTGPU_ALLOCATION_METADATA_REQUEST, + virtio_gpu_allocation_metadata_request_ioctl, + DRM_AUTH | DRM_RENDER_ALLOW), + + DRM_IOCTL_DEF_DRV(VIRTGPU_ALLOCATION_METADATA_RESPONSE, + virtio_gpu_allocation_metadata_response_ioctl, + DRM_AUTH | DRM_RENDER_ALLOW), }; |