aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pci.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2010-06-01 01:32:24 -0400
committerDave Airlie <airlied@redhat.com>2011-05-03 23:38:46 -0400
commit3448a19da479b6bd1e28e2a2be9fa16c6a6feb39 (patch)
treeb69bfa9e71e46c8c7470cbdf49de8530227d6687 /include/linux/pci.h
parent8116188fdef5946bcbb2d73e41d7412a57ffb034 (diff)
vgaarb: use bridges to control VGA routing where possible.
So in a lot of modern systems, a GPU will always be below a parent bridge that won't share with any other GPUs. This means VGA arbitration on those GPUs can be controlled by using the bridge routing instead of io/mem decodes. The problem is locating which GPUs share which upstream bridges. This patch attempts to identify all the GPUs which can be controlled via bridges, and ones that can't. This patch endeavours to work out the bridge sharing semantics. When disabling GPUs via a bridge, it doesn't do irq callbacks or touch the io/mem decodes for the gpu. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'include/linux/pci.h')
-rw-r--r--include/linux/pci.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 96f70d7e058d..f2e57b2e6a81 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -915,8 +915,11 @@ int pci_cfg_space_size_ext(struct pci_dev *dev);
915int pci_cfg_space_size(struct pci_dev *dev); 915int pci_cfg_space_size(struct pci_dev *dev);
916unsigned char pci_bus_max_busnr(struct pci_bus *bus); 916unsigned char pci_bus_max_busnr(struct pci_bus *bus);
917 917
918#define PCI_VGA_STATE_CHANGE_BRIDGE (1 << 0)
919#define PCI_VGA_STATE_CHANGE_DECODES (1 << 1)
920
918int pci_set_vga_state(struct pci_dev *pdev, bool decode, 921int pci_set_vga_state(struct pci_dev *pdev, bool decode,
919 unsigned int command_bits, bool change_bridge); 922 unsigned int command_bits, u32 flags);
920/* kmem_cache style wrapper around pci_alloc_consistent() */ 923/* kmem_cache style wrapper around pci_alloc_consistent() */
921 924
922#include <linux/pci-dma.h> 925#include <linux/pci-dma.h>
@@ -1061,7 +1064,7 @@ static inline int pci_proc_domain(struct pci_bus *bus)
1061 1064
1062/* some architectures require additional setup to direct VGA traffic */ 1065/* some architectures require additional setup to direct VGA traffic */
1063typedef int (*arch_set_vga_state_t)(struct pci_dev *pdev, bool decode, 1066typedef int (*arch_set_vga_state_t)(struct pci_dev *pdev, bool decode,
1064 unsigned int command_bits, bool change_bridge); 1067 unsigned int command_bits, u32 flags);
1065extern void pci_register_set_vga_state(arch_set_vga_state_t func); 1068extern void pci_register_set_vga_state(arch_set_vga_state_t func);
1066 1069
1067#else /* CONFIG_PCI is not enabled */ 1070#else /* CONFIG_PCI is not enabled */