virtgpu: update to new virtio_drm.h

This is an ABI-compatible change and the kernel gets exactly the same
ioctl number and args than before.

BUG=b:177238493
TEST=none

Change-Id: I5797164e48ffd634c1e5c07dd2e0875efa16f1e1
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/minigbm/+/2622849
Reviewed-by: David Riley <davidriley@chromium.org>
Reviewed-by: Gurchetan Singh <gurchetansingh@chromium.org>
Tested-by: Chia-I Wu <olv@google.com>
Commit-Queue: Chia-I Wu <olv@google.com>
This commit is contained in:
Chia-I Wu 2021-01-11 11:08:21 -08:00 committed by Commit Bot
parent 9fe8c20f05
commit 2e41f6332b
2 changed files with 25 additions and 3 deletions

View file

@ -104,10 +104,27 @@ struct drm_virtgpu_resource_info {
__u32 bo_handle;
__u32 res_handle;
__u32 size;
__u32 stride;
};
/* CHROMIUM */
struct drm_virtgpu_resource_info_cros {
__u32 bo_handle;
__u32 res_handle;
__u32 size;
/* Return res_handle and size. Return extended info (strides, num_planes,
* etc.) until chromeos-5.4 and return blob_mem since chromeos-5.10.
*/
#define VIRTGPU_RESOURCE_INFO_TYPE_DEFAULT 0
/* Return res_handle, size, and extended info */
#define VIRTGPU_RESOURCE_INFO_TYPE_EXTENDED 1
union {
__u32 type; /* in, VIRTGPU_RESOURCE_INFO_TYPE_* */
__u32 blob_mem;
__u32 stride;
__u32 strides[4]; /* strides[0] is accessible with stride. */
};
};
__u32 num_planes;
__u32 offsets[4];
__u64 format_modifier;
@ -198,6 +215,11 @@ struct drm_virtgpu_resource_create_blob {
DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_RESOURCE_INFO, \
struct drm_virtgpu_resource_info)
/* same ioctl number as DRM_IOCTL_VIRTGPU_RESOURCE_INFO */
#define DRM_IOCTL_VIRTGPU_RESOURCE_INFO_CROS \
DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_RESOURCE_INFO, \
struct drm_virtgpu_resource_info_cros)
#define DRM_IOCTL_VIRTGPU_TRANSFER_FROM_HOST \
DRM_IOWR(DRM_COMMAND_BASE + DRM_VIRTGPU_TRANSFER_FROM_HOST, \
struct drm_virtgpu_3d_transfer_from_host)