Skip to content

Commit 36028f3

Browse files
Mike TravisH. Peter Anvin
authored andcommitted
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 Signed-off-by: Mike Travis <travis@sgi.com> LKML-Reference: <4B68D51D.6090401@sgi.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Robin Holt <holt@sgi.com> Cc: Jack Steiner <steiner@sgi.com> Cc: Ingo Molnar <mingo@elte.hu> Cc: Jesse Barnes <jbarnes@virtuousgeek.org> Cc: David Airlie <airlied@linux.ie> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
1 parent 773a38d commit 36028f3

2 files changed

Lines changed: 9 additions & 1 deletion

File tree

‎drivers/gpu/vga/Kconfig‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,11 @@ config VGA_ARB
88
are accessed at same time they need some kind of coordination. Please
99
see Documentation/vgaarbiter.txt for more details. Select this to
1010
enable VGA arbiter.
11+
12+
config VGA_ARB_MAX_GPUS
13+
int "Maximum number of GPUs"
14+
default 16
15+
depends on VGA_ARB
16+
help
17+
Reserves space in the kernel to maintain resource locking for
18+
multiple GPUS. The overhead for each GPU is very small.

‎drivers/gpu/vga/vgaarb.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@ EXPORT_SYMBOL(vga_client_register);
688688
* the arbiter.
689689
*/
690690

691-
#define MAX_USER_CARDS 16
691+
#define MAX_USER_CARDS CONFIG_VGA_ARB_MAX_GPUS
692692
#define PCI_INVALID_CARD ((struct pci_dev *)-1UL)
693693

694694
/*

0 commit comments

Comments
 (0)