Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions
vgaarb.c File Reference
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/pci.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/list.h>
#include <linux/sched.h>
#include <linux/wait.h>
#include <linux/spinlock.h>
#include <linux/poll.h>
#include <linux/miscdevice.h>
#include <linux/slab.h>
#include <linux/uaccess.h>
#include <linux/vgaarb.h>

Go to the source code of this file.

Data Structures

struct  vga_device
 
struct  vga_arb_user_card
 
struct  vga_arb_private
 

Macros

#define MAX_USER_CARDS   CONFIG_VGA_ARB_MAX_GPUS
 
#define PCI_INVALID_CARD   ((struct pci_dev *)-1UL)
 

Functions

struct pci_devvga_default_device (void)
 
 EXPORT_SYMBOL_GPL (vga_default_device)
 
void vga_set_default_device (struct pci_dev *pdev)
 
int vga_get (struct pci_dev *pdev, unsigned int rsrc, int interruptible)
 
 EXPORT_SYMBOL (vga_get)
 
int vga_tryget (struct pci_dev *pdev, unsigned int rsrc)
 
 EXPORT_SYMBOL (vga_tryget)
 
void vga_put (struct pci_dev *pdev, unsigned int rsrc)
 
 EXPORT_SYMBOL (vga_put)
 
void vga_set_legacy_decoding (struct pci_dev *pdev, unsigned int decodes)
 
 EXPORT_SYMBOL (vga_set_legacy_decoding)
 
int vga_client_register (struct pci_dev *pdev, void *cookie, void(*irq_set_state)(void *cookie, bool state), unsigned int(*set_vga_decode)(void *cookie, bool decode))
 
 EXPORT_SYMBOL (vga_client_register)
 
 subsys_initcall (vga_arb_device_init)
 

Macro Definition Documentation

#define MAX_USER_CARDS   CONFIG_VGA_ARB_MAX_GPUS

Definition at line 799 of file vgaarb.c.

#define PCI_INVALID_CARD   ((struct pci_dev *)-1UL)

Definition at line 800 of file vgaarb.c.

Function Documentation

EXPORT_SYMBOL ( vga_get  )
EXPORT_SYMBOL ( vga_tryget  )
EXPORT_SYMBOL ( vga_put  )
EXPORT_SYMBOL ( vga_set_legacy_decoding  )
EXPORT_SYMBOL ( vga_client_register  )
EXPORT_SYMBOL_GPL ( vga_default_device  )
subsys_initcall ( vga_arb_device_init  )
int vga_client_register ( struct pci_dev pdev,
void cookie,
void(*)(void *cookie, bool state irq_set_state,
unsigned int(*)(void *cookie, bool decode)  set_vga_decode 
)

Definition at line 721 of file vgaarb.c.

struct pci_dev* vga_default_device ( void  )
read

Definition at line 135 of file vgaarb.c.

int vga_get ( struct pci_dev pdev,
unsigned int  rsrc,
int  interruptible 
)

Definition at line 356 of file vgaarb.c.

void vga_put ( struct pci_dev pdev,
unsigned int  rsrc 
)

Definition at line 434 of file vgaarb.c.

void vga_set_default_device ( struct pci_dev pdev)

Definition at line 142 of file vgaarb.c.

void vga_set_legacy_decoding ( struct pci_dev pdev,
unsigned int  decodes 
)

vga_set_legacy_decoding

: pci device of the VGA card : bit mask of what legacy regions the card decodes

Indicates to the arbiter if the card decodes legacy VGA IOs, legacy VGA Memory, both, or none. All cards default to both, the card driver (fbdev for example) should tell the arbiter if it has disabled legacy decoding, so the card can be left out of the arbitration process (and can be safe to take interrupts at any time.

Definition at line 714 of file vgaarb.c.

int vga_tryget ( struct pci_dev pdev,
unsigned int  rsrc 
)

Definition at line 407 of file vgaarb.c.