Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 73738bea authored by Lingfeng Yang's avatar Lingfeng Yang Committed by Alistair Delva
Browse files

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: default avatarRobert Tarasov <tutankhamen@chromium.org>
Commit-Queue: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: default avatarGurchetan Singh <gurchetansingh@chromium.org>
[rebase54(groeck): Context conflicts]
Signed-off-by: default avatarGuenter Roeck <groeck@chromium.org>
Bug: 153580313
Signed-off-by: default avatarLingfeng Yang <lfy@google.com>
Change-Id: I3c4a27e4f656d0884ef9e1f056a89aa875ec6d2a
parent e9855d59
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -255,7 +255,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);
+30 −0
Original line number Diff line number Diff line
@@ -572,6 +572,24 @@ static int virtio_gpu_get_caps_ioctl(struct drm_device *dev,
	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),
@@ -604,4 +622,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),
};