XenevaOS
Loading...
Searching...
No Matches
vgaarb.h
Go to the documentation of this file.
1/*
2 * DCL <linux/vgaarb.h> -- the VGA-arbiter surface virtio-gpu's init reads.
3 *
4 * mainline's header is the arbiter's client API behind CONFIG_VGA_ARB. There
5 * is no arbiter here, and nothing on this platform's display path wants one:
6 * the device the port runs against (virtio-gpu-pci) reports class 0x0380, so
7 * pci_is_vga() is false and both call sites -- vga_get_interruptible() and
8 * vga_put(), virtgpu_drv.c:190-204 -- sit in a branch that is never taken.
9 *
10 * The two functions are therefore mainline's own !CONFIG_VGA_ARB answers:
11 * the resource bits are unconditional in upstream's header, and with the
12 * arbiter compiled out the get/put calls become calls that succeed and do
13 * nothing. That is not a placeholder for a future arbiter; it is the honest
14 * description of a bus with one display function whose legacy decode
15 * nothing else shares or routes.
16 */
17#ifndef _LINUX_VGAARB_H
18#define _LINUX_VGAARB_H
19
20struct pci_dev;
21
22/* Legacy VGA regions; mainline's names and values. */
23#define VGA_RSRC_NONE 0x00
24#define VGA_RSRC_LEGACY_IO 0x01
25#define VGA_RSRC_LEGACY_MEM 0x02
26#define VGA_RSRC_LEGACY_MASK (VGA_RSRC_LEGACY_IO | VGA_RSRC_LEGACY_MEM)
27/* Non-legacy access */
28#define VGA_RSRC_NORMAL_IO 0x04
29#define VGA_RSRC_NORMAL_MEM 0x08
30
31static inline int vga_get_interruptible(struct pci_dev* pdev,
32 unsigned int rsrc)
33{
34 (void)pdev;
35 (void)rsrc;
36 return 0; /* mainline's no-arbiter answer: acquired */
37}
38
39static inline void vga_put(struct pci_dev* pdev, unsigned int rsrc)
40{
41 (void)pdev;
42 (void)rsrc;
43}
44
45#endif /* _LINUX_VGAARB_H */
Definition pci.h:102