Lines Matching refs:the

7 implemented on PCI will typically have the same "hard-decoded" addresses as
12 The Resource Access Control (RAC) module inside the X server [0] existed for
13 the legacy VGA arbitration task (besides other bus management tasks) when more
14 than one legacy device co-exists on the same machine. But the problem happens
17 ideally, being a userspace application, it is not the role of the X server to
18 control bus resources. Therefore an arbitration scheme outside of the X server
19 is needed to control the sharing of these resources. This document introduces
20 the operation of the VGA arbiter implemented for the Linux kernel.
38 The vgaarb is a module of the Linux Kernel. When it is initially loaded, it
39 scans all PCI devices and adds the VGA ones inside the arbitration. The
40 arbiter then enables/disables the decoding on different devices of the VGA
41 legacy instructions. Devices which do not want/need to use the arbiter may
44 The kernel exports a char device interface (/dev/vga_arbiter) to the clients,
45 which has the following semantics:
47 open : open user instance of the arbiter. By default, it's attached to
48 the default VGA device of the system.
50 close : close user instance. Release locks made by the user
52 read : return a string indicating the status of the target like:
56 An IO state string is of the form {io,mem,io+mem,none}, mc and
58 diagnostic only). "decodes" indicate what the card currently
60 "locks" indicates what is locked by this card. If the card is
65 write : write a command to the arbiter. List of commands:
74 decodes <io_state> : set the legacy decoding attributes for the card
76 poll : event if something changes on any card (not just the
79 card_ID is of the form "PCI:domain:bus:dev.fn". It can be set to "default"
80 to go back to the system default card (TODO: not implemented yet). Currently,
81 only PCI is supported as a prefix, but the userland API may support other bus
82 types in the future, even if the current kernel implementation doesn't.
87 supports stacking, like the kernel one. This complexifies the implementation
88 a bit, but makes the arbiter more tolerant to user space problems and able
91 user space for a given user (file descriptor instance) of the arbiter.
93 In the case of devices hot-{un,}plugged, there is a hook - pci_notify() - to
94 notify them being added/removed in the system and automatically added/removed
95 in the arbiter.
97 There is also an in-kernel API of the arbiter in case DRM, vgacon, or other
104 To use the vga arbiter char device it was implemented an API inside the
106 on the system):
108 /* the type of resource decoded by the device */
123 These functions below acquire VGA resources for the given card and mark those
124 resources as locked. If the resources requested are "normal" (and not legacy)
125 resources, the arbiter will first check whether the card is doing legacy
126 decoding for that type of resource. If yes, the lock is "converted" into a
129 forwarding on P2P bridges if necessary, so that the requested resources can
130 be used. Then, the card is marked as locking these resources and the IO and/or
131 Memory access is enabled on the card (including VGA forwarding on parent
132 P2P bridges if any). In the case of vga_arb_lock(), the function will block
133 if some conflicting card is already locking one of the required resources (or
135 VGA memory and IO afaik). If the card already owns the resources, the function
140 Set the target device of this client.
144 For instance, in x86 if two devices on the same bus want to lock different
146 trying to lock different resources, only the first who tried succeeds.
153 Indicates to the arbiter if the card decodes legacy VGA IOs, legacy VGA
154 Memory, both, or none. All cards default to both, the card driver (fbdev for
155 example) should tell the arbiter if it has disabled legacy decoding, so the
156 card can be left out of the arbitration process (and can be safe to take
160 Connects to the arbiter device, allocates the struct
163 Close the connection
172 X server basically wraps all the functions that touch VGA registers somehow.
179 with the Xorg community in 2005 [1, 2]. In the end of 2007, Paulo Zanoni and
181 enhancing the kernel code to adapt as a kernel module and also did the
182 implementation of the user space side [3]. Now (2009) Tiago Vignatti and Dave