summaryrefslogtreecommitdiff
path: root/src/common_vgaarb.c
Commit message (Collapse)AuthorAgeFilesLines
* Include config.h before any other headers.Emil Velikov2015-02-121-4/+4
| | | | | | | | | The former has a series of defines which in some cases are crusial to be set before including any system headers. Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Add missing guards around config.h inclusionChih-Wei Huang2015-02-121-0/+3
| | | | | | | | | | | In some cases the header may not exist, leading to compilation issues. Add the ifdef HAVE_CONFIG_H, as it is those in other parts of the project. [Emil Velikov: Split out from a larger commit, rework commit message] Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com> Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com> Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
* Use O_CLOEXEC for internal file descriptorsAdam Jackson2012-02-271-1/+1
| | | | | | | | Well, almost all of them. zlib doesn't support "e" in the mode string in gzopen() though it will silently accept and ignore it, and Solaris appears not to support "e" in the mode string at all. Signed-off-by: Adam Jackson <ajax@redhat.com>
* Fix long standing MTRR bug.Thomas Hellstrom2010-07-211-0/+1
| | | | | | | | | | | | | | | | Add an include that makes the file common_vgaarb.c see the same struct pci_system as the file linux_sysfs.c. Without this fix, on a MTRR system, the vgaarb_fd member would overwrite the mtrr_fd member and cause the MTRR_IOC_ADD_ENTRY call to be issued to the incorrect device causing the infamous "Inappropriate ioctl for device (25)" error. This error would cause MTRR setup to fail on all systems relying on it and is severe enough to warrant a new release. Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
* vgaarb: read back vga count when setting new decodingTiago Vignatti2010-06-161-0/+7
| | | | | | | Decode kernel operation can also change vga refcount, so we need to read back the information when calling it. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
* vgaarb: decode should send new information to the kernelTiago Vignatti2010-06-161-1/+1
| | | | | | This was introduced in e360c11c. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
* shutup stupid gcc warning, strtok_r ignores the first parameterlibpciaccess-0.10.9Dave Airlie2009-09-251-1/+1
|
* vgaarb: fix newbie typoTiago Vignatti2009-09-181-3/+0
| | | | | | Eh, we don't need to check for the fd anyway. Kudos jcristau for reporting. Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
* vgaarb: check for fd before close itTiago Vignatti2009-09-181-0/+6
| | | | Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
* vgaarb: check pci_sys exists before initing vga arbDave Airlie2009-09-021-0/+4
|
* Revert "vgaarb: fix pci_device_vgaarb_get_info() return value."vga-arbiterTiago Vignatti2009-08-261-1/+1
| | | | This reverts commit ef8aca5da46155e9ea0d1227215921ad9ce59150.
* vgaarb: fix pci_device_vgaarb_get_info() return value.Tiago Vignatti2009-08-161-1/+1
| | | | Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
* vgaarb: fix indentation and remove trailing white spacesTiago Vignatti2009-08-161-48/+49
| | | | Signed-off-by: Tiago Vignatti <tiago.vignatti@nokia.com>
* vgaarb: add vga count + resource accessorDave Airlie2009-08-031-0/+9
|
* vgaarb: more api changes + cleanupDave Airlie2009-08-031-14/+24
| | | | | | add a comma for ease of parsing, use hex on the interface in both directions instead of hex on one and decimal on the other
* vgaarb: change API to target taking a device + lock/unlock not taking oneDave Airlie2009-07-311-59/+112
| | | | | | | | working on the target device - a target device of NULL reselects the target that existed when we started. this is mainly to allow a udev posting tool to return to the state of what happened before it ran.
* vgaarb: add support for targetting default deviceDave Airlie2009-07-311-3/+9
|
* vgaarb: clean up debug outputDave Airlie2009-07-311-3/+5
|
* vgaarb: fixup api for new count reporting + decodes interface was wrong.Dave Airlie2009-07-201-6/+42
| | | | | decodes is a information setting interface so it takes new decodes and sends them to the kernel
* vgaarb: fixup api and decode rsrc.Dave Airlie2009-06-051-11/+50
| | | | | | | | | This fixes up the API and stores the vga arb fd in the sys_pci structure, instead of hiding it in a random dev struct. It also reads back after setting the target and works out the decodes. Signed-off-by: Dave Airlie <airlied@redhat.com>
* Comment typo.Tiago Vignatti2009-05-141-1/+1
|
* Reorganize the code.Tiago Vignatti2009-05-141-71/+26
|
* Delete vga_arb_rec.Tiago Vignatti2009-05-141-30/+23
|
* vgaarb: a bunch of clean ups to fit in libpciaccess style.Tiago Vignatti2009-05-131-77/+78
|
* vgaarb: make it compile.Tiago Vignatti2009-05-131-55/+1
|
* Import libvgaaccess (VGA Arbiter) implementation from C3SL repository:Tiago Vignatti2009-05-131-0/+273
http://git.c3sl.ufpr.br/