|
|
9ae3a8 |
From 2065c7a1c75f56c8ea23952fd4de4b031a96552c Mon Sep 17 00:00:00 2001
|
|
|
9ae3a8 |
From: Tarun Gupta <tgupta@redhat.com>
|
|
|
9ae3a8 |
Date: Wed, 20 Jun 2018 18:54:21 +0200
|
|
|
9ae3a8 |
Subject: [PATCH 13/17] linux-headers: Update to include region based display
|
|
|
9ae3a8 |
support.
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
RH-Author: Tarun Gupta <tgupta@redhat.com>
|
|
|
9ae3a8 |
Message-id: <1529520865-18127-8-git-send-email-tgupta@redhat.com>
|
|
|
9ae3a8 |
Patchwork-id: 80913
|
|
|
9ae3a8 |
O-Subject: [RHEL7.6 qemu-kvm PATCH v3 07/11] linux-headers: Update to include region based display support.
|
|
|
9ae3a8 |
Bugzilla: 1555246
|
|
|
9ae3a8 |
RH-Acked-by: Alex Williamson <alex.williamson@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Gerd Hoffmann <kraxel@redhat.com>
|
|
|
9ae3a8 |
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
update Linux headers to 4.16-rc5
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Note that VIRTIO_GPU_CAPSET_VIRGL2 was added manually so it has to
|
|
|
9ae3a8 |
be added manually after re-running scripts/update-linux-headers.sh.
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
|
|
|
9ae3a8 |
(cherry picked from 9f2d175db5c29b23bc1a560041043d0b10ee57dc)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Conflict: Only cherry-picking macros for adding region based display
|
|
|
9ae3a8 |
support
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
Signed-off-by: Miroslav Rezanina <mrezanin@redhat.com>
|
|
|
9ae3a8 |
---
|
|
|
9ae3a8 |
linux-headers/linux/vfio.h | 52 ++++++++++++++++++++++++++++++++++++++++++++++
|
|
|
9ae3a8 |
1 file changed, 52 insertions(+)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
diff --git a/linux-headers/linux/vfio.h b/linux-headers/linux/vfio.h
|
|
|
9ae3a8 |
index 8995a34..0dab0cc 100644
|
|
|
9ae3a8 |
--- a/linux-headers/linux/vfio.h
|
|
|
9ae3a8 |
+++ b/linux-headers/linux/vfio.h
|
|
|
9ae3a8 |
@@ -414,6 +414,58 @@ struct vfio_pci_hot_reset {
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
#define VFIO_DEVICE_PCI_HOT_RESET _IO(VFIO_TYPE, VFIO_BASE + 13)
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
+/**
|
|
|
9ae3a8 |
+ * VFIO_DEVICE_QUERY_GFX_PLANE - _IOW(VFIO_TYPE, VFIO_BASE + 14,
|
|
|
9ae3a8 |
+ * struct vfio_device_query_gfx_plane)
|
|
|
9ae3a8 |
+ *
|
|
|
9ae3a8 |
+ * Set the drm_plane_type and flags, then retrieve the gfx plane info.
|
|
|
9ae3a8 |
+ *
|
|
|
9ae3a8 |
+ * flags supported:
|
|
|
9ae3a8 |
+ * - VFIO_GFX_PLANE_TYPE_PROBE and VFIO_GFX_PLANE_TYPE_DMABUF are set
|
|
|
9ae3a8 |
+ * to ask if the mdev supports dma-buf. 0 on support, -EINVAL on no
|
|
|
9ae3a8 |
+ * support for dma-buf.
|
|
|
9ae3a8 |
+ * - VFIO_GFX_PLANE_TYPE_PROBE and VFIO_GFX_PLANE_TYPE_REGION are set
|
|
|
9ae3a8 |
+ * to ask if the mdev supports region. 0 on support, -EINVAL on no
|
|
|
9ae3a8 |
+ * support for region.
|
|
|
9ae3a8 |
+ * - VFIO_GFX_PLANE_TYPE_DMABUF or VFIO_GFX_PLANE_TYPE_REGION is set
|
|
|
9ae3a8 |
+ * with each call to query the plane info.
|
|
|
9ae3a8 |
+ * - Others are invalid and return -EINVAL.
|
|
|
9ae3a8 |
+ *
|
|
|
9ae3a8 |
+ * Note:
|
|
|
9ae3a8 |
+ * 1. Plane could be disabled by guest. In that case, success will be
|
|
|
9ae3a8 |
+ * returned with zero-initialized drm_format, size, width and height
|
|
|
9ae3a8 |
+ * fields.
|
|
|
9ae3a8 |
+ * 2. x_hot/y_hot is set to 0xFFFFFFFF if no hotspot information available
|
|
|
9ae3a8 |
+ *
|
|
|
9ae3a8 |
+ * Return: 0 on success, -errno on other failure.
|
|
|
9ae3a8 |
+ */
|
|
|
9ae3a8 |
+struct vfio_device_gfx_plane_info {
|
|
|
9ae3a8 |
+ __u32 argsz;
|
|
|
9ae3a8 |
+ __u32 flags;
|
|
|
9ae3a8 |
+#define VFIO_GFX_PLANE_TYPE_PROBE (1 << 0)
|
|
|
9ae3a8 |
+#define VFIO_GFX_PLANE_TYPE_DMABUF (1 << 1)
|
|
|
9ae3a8 |
+#define VFIO_GFX_PLANE_TYPE_REGION (1 << 2)
|
|
|
9ae3a8 |
+ /* in */
|
|
|
9ae3a8 |
+ __u32 drm_plane_type; /* type of plane: DRM_PLANE_TYPE_* */
|
|
|
9ae3a8 |
+ /* out */
|
|
|
9ae3a8 |
+ __u32 drm_format; /* drm format of plane */
|
|
|
9ae3a8 |
+ __u64 drm_format_mod; /* tiled mode */
|
|
|
9ae3a8 |
+ __u32 width; /* width of plane */
|
|
|
9ae3a8 |
+ __u32 height; /* height of plane */
|
|
|
9ae3a8 |
+ __u32 stride; /* stride of plane */
|
|
|
9ae3a8 |
+ __u32 size; /* size of plane in bytes, align on page*/
|
|
|
9ae3a8 |
+ __u32 x_pos; /* horizontal position of cursor plane */
|
|
|
9ae3a8 |
+ __u32 y_pos; /* vertical position of cursor plane*/
|
|
|
9ae3a8 |
+ __u32 x_hot; /* horizontal position of cursor hotspot */
|
|
|
9ae3a8 |
+ __u32 y_hot; /* vertical position of cursor hotspot */
|
|
|
9ae3a8 |
+ union {
|
|
|
9ae3a8 |
+ __u32 region_index; /* region index */
|
|
|
9ae3a8 |
+ __u32 dmabuf_id; /* dma-buf id */
|
|
|
9ae3a8 |
+ };
|
|
|
9ae3a8 |
+};
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
+#define VFIO_DEVICE_QUERY_GFX_PLANE _IO(VFIO_TYPE, VFIO_BASE + 14)
|
|
|
9ae3a8 |
+
|
|
|
9ae3a8 |
/* -------- API for Type1 VFIO IOMMU -------- */
|
|
|
9ae3a8 |
|
|
|
9ae3a8 |
/**
|
|
|
9ae3a8 |
--
|
|
|
9ae3a8 |
1.8.3.1
|
|
|
9ae3a8 |
|