blob: 961c55ec3ffde242d5dbe57480f3fa763e3783b1 [file] [log] [blame]
Masahiro Yamadadc3bf492019-07-25 16:58:32 +09001/* SPDX-License-Identifier: GPL-2.0 */
Gerd Hoffmannd61fc96f2018-05-11 09:05:03 -06002/*
3 * Simple pci display device.
4 *
5 * Framebuffer memory is pci bar 0.
6 * Configuration (read-only) is in pci config space.
7 * Format field uses drm fourcc codes.
8 * ATM only DRM_FORMAT_XRGB8888 is supported.
9 */
10
11/* pci ids */
Huacai Chen2575b2f2020-07-08 15:59:30 +080012#define MDPY_PCI_VENDOR_ID PCI_VENDOR_ID_REDHAT
Gerd Hoffmannd61fc96f2018-05-11 09:05:03 -060013#define MDPY_PCI_DEVICE_ID 0x000f
14#define MDPY_PCI_SUBVENDOR_ID PCI_SUBVENDOR_ID_REDHAT_QUMRANET
15#define MDPY_PCI_SUBDEVICE_ID PCI_SUBDEVICE_ID_QEMU
16
17/* pci cfg space offsets for fb config (dword) */
18#define MDPY_VENDORCAP_OFFSET 0x40
19#define MDPY_VENDORCAP_SIZE 0x10
20#define MDPY_FORMAT_OFFSET (MDPY_VENDORCAP_OFFSET + 0x04)
21#define MDPY_WIDTH_OFFSET (MDPY_VENDORCAP_OFFSET + 0x08)
22#define MDPY_HEIGHT_OFFSET (MDPY_VENDORCAP_OFFSET + 0x0c)