aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pci.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2010-06-01 15:32:24 +1000
committerDave Airlie <airlied@redhat.com>2011-05-04 13:38:46 +1000
commit3448a19da479b6bd1e28e2a2be9fa16c6a6feb39 (patch)
treeb69bfa9e71e46c8c7470cbdf49de8530227d6687 /include/linux/pci.h
parent8116188fdef5946bcbb2d73e41d7412a57ffb034 (diff)
downloadkernel_samsung_smdk4412-3448a19da479b6bd1e28e2a2be9fa16c6a6feb39.zip
kernel_samsung_smdk4412-3448a19da479b6bd1e28e2a2be9fa16c6a6feb39.tar.gz
kernel_samsung_smdk4412-3448a19da479b6bd1e28e2a2be9fa16c6a6feb39.tar.bz2
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 96f70d7..f2e57b2 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);
int pci_cfg_space_size(struct pci_dev *dev);
unsigned char pci_bus_max_busnr(struct pci_bus *bus);
+#define PCI_VGA_STATE_CHANGE_BRIDGE (1 << 0)
+#define PCI_VGA_STATE_CHANGE_DECODES (1 << 1)
+
int pci_set_vga_state(struct pci_dev *pdev, bool decode,
- unsigned int command_bits, bool change_bridge);
+ unsigned int command_bits, u32 flags);
/* kmem_cache style wrapper around pci_alloc_consistent() */
#include <linux/pci-dma.h>
@@ -1061,7 +1064,7 @@ static inline int pci_proc_domain(struct pci_bus *bus)
/* some architectures require additional setup to direct VGA traffic */
typedef int (*arch_set_vga_state_t)(struct pci_dev *pdev, bool decode,
- unsigned int command_bits, bool change_bridge);
+ unsigned int command_bits, u32 flags);
extern void pci_register_set_vga_state(arch_set_vga_state_t func);
#else /* CONFIG_PCI is not enabled */