diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2018-05-11 09:05:03 -0600 |
---|---|---|
committer | Alex Williamson <alex.williamson@redhat.com> | 2018-06-08 10:24:09 -0600 |
commit | d61fc96f47fdac1f031ed4eafa9106fe10cdaa37 (patch) | |
tree | 08b7ef5d11978851ada2d64d7e68d87a85de59a6 /samples/vfio-mdev/mdpy-defs.h | |
parent | 48d8476b41eed63567dd2f0ad125c895b9ac648a (diff) |
sample: vfio mdev display - host device
Simple framebuffer display, demo-ing the vfio region display interface
(VFIO_GFX_PLANE_TYPE_REGION).
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Alex Williamson <alex.williamson@redhat.com>
Diffstat (limited to 'samples/vfio-mdev/mdpy-defs.h')
-rw-r--r-- | samples/vfio-mdev/mdpy-defs.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/samples/vfio-mdev/mdpy-defs.h b/samples/vfio-mdev/mdpy-defs.h new file mode 100644 index 000000000000..96b3b1b49d34 --- /dev/null +++ b/samples/vfio-mdev/mdpy-defs.h @@ -0,0 +1,22 @@ +/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */ +/* + * Simple pci display device. + * + * Framebuffer memory is pci bar 0. + * Configuration (read-only) is in pci config space. + * Format field uses drm fourcc codes. + * ATM only DRM_FORMAT_XRGB8888 is supported. + */ + +/* pci ids */ +#define MDPY_PCI_VENDOR_ID 0x1b36 /* redhat */ +#define MDPY_PCI_DEVICE_ID 0x000f +#define MDPY_PCI_SUBVENDOR_ID PCI_SUBVENDOR_ID_REDHAT_QUMRANET +#define MDPY_PCI_SUBDEVICE_ID PCI_SUBDEVICE_ID_QEMU + +/* pci cfg space offsets for fb config (dword) */ +#define MDPY_VENDORCAP_OFFSET 0x40 +#define MDPY_VENDORCAP_SIZE 0x10 +#define MDPY_FORMAT_OFFSET (MDPY_VENDORCAP_OFFSET + 0x04) +#define MDPY_WIDTH_OFFSET (MDPY_VENDORCAP_OFFSET + 0x08) +#define MDPY_HEIGHT_OFFSET (MDPY_VENDORCAP_OFFSET + 0x0c) |