Skip to contentSkip to conversation

vgaarb: Add user selectability of the number of GPUS in a system

tip:x86/pci tip-bot for Mike Travis 1 participant 1 message Feb 5, 2010 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw
Commit-ID:  36028f3383872eefb558a4aae4c12ec2b5fa640f
Gitweb:     http://git.kernel.org/tip/36028f3383872eefb558a4aae4c12ec2b5fa640f
Author:     Mike Travis <[email protected]>
AuthorDate: Tue, 2 Feb 2010 17:45:01 -0800
Committer:  H. Peter Anvin <[email protected]>
CommitDate: Fri, 5 Feb 2010 15:02:47 -0800

vgaarb: Add user selectability of the number of GPUS in a system

Update the VGA Arbiter to allow the user to select the number of GPU's supported in a system.

v2: simplify setting of MAX_USER_CARDS, revert back to original default of 16

LKML-Reference: <[email protected]>

Cc Thomas Gleixner <[email protected]>
Cc Robin Holt <[email protected]>
Cc Jack Steiner <[email protected]>
Cc Ingo Molnar <[email protected]>
Cc Jesse Barnes <[email protected]>
Cc David Airlie <[email protected]>
---
 drivers/gpu/vga/Kconfig  |    8 ++++++++
 drivers/gpu/vga/vgaarb.c |    2 +-
 2 files changed, 9 insertions(+), 1 deletions(-)
drivers/gpu/vga/Kconfig +8 -0
index 790e675..0920492 100644
@@ -8,3 +8,11 @@ config VGA_ARB
 	  are accessed at same time they need some kind of coordination. Please
 	  see Documentation/vgaarbiter.txt for more details. Select this to
 	  enable VGA arbiter.
+
+config VGA_ARB_MAX_GPUS
+	int "Maximum number of GPUs"
+	default 16
+	depends on VGA_ARB
+	help
+	  Reserves space in the kernel to maintain resource locking for
+	  multiple GPUS.  The overhead for each GPU is very small.
drivers/gpu/vga/vgaarb.c +1 -1
index ba7fa9e..325a533 100644
@@ -688,7 +688,7 @@ EXPORT_SYMBOL(vga_client_register);
  * the arbiter.
  */
 
-#define MAX_USER_CARDS         16
+#define MAX_USER_CARDS         CONFIG_VGA_ARB_MAX_GPUS
 #define PCI_INVALID_CARD       ((struct pci_dev *)-1UL)
 
 /*