rpms/kernel/devel kernel.spec, 1.1696, 1.1697 linux-2.6-vga-arb.patch, 1.6, 1.7
Dave Airlie
airlied at fedoraproject.org
Thu Aug 6 05:33:44 UTC 2009
- Previous message (by thread): rpms/midori/devel .cvsignore, 1.12, 1.13 midori.spec, 1.24, 1.25 sources, 1.12, 1.13
- Next message (by thread): rpms/midori/F-11 .cvsignore, 1.12, 1.13 midori.spec, 1.24, 1.25 sources, 1.12, 1.13
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: airlied
Update of /cvs/pkgs/rpms/kernel/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv1287
Modified Files:
kernel.spec linux-2.6-vga-arb.patch
Log Message:
* Thu Aug 06 2009 Dave Airlie <airlied at redhat.com> 2.6.31.0.134.rc5.git3
- fixup vga arb warning at startup and handover between gpus
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/kernel.spec,v
retrieving revision 1.1696
retrieving revision 1.1697
diff -u -p -r1.1696 -r1.1697
--- kernel.spec 6 Aug 2009 04:05:38 -0000 1.1696
+++ kernel.spec 6 Aug 2009 05:33:43 -0000 1.1697
@@ -1951,6 +1951,9 @@ fi
# and build.
%changelog
+* Thu Aug 06 2009 Dave Airlie <airlied at redhat.com> 2.6.31.0.134.rc5.git3
+- fixup vga arb warning at startup and handover between gpus
+
* Thu Aug 06 2009 Kyle McMartin <kyle at redhat.com> 2.6.31.0.133.rc5.git3
- die-floppy-die.patch: it's the 21st century, let's not rely on
steam powered technology.
linux-2.6-vga-arb.patch:
drivers/gpu/Makefile | 2
drivers/gpu/vga/Kconfig | 10
drivers/gpu/vga/Makefile | 1
drivers/gpu/vga/vgaarb.c | 1206 +++++++++++++++++++++++++++++++++++++++++++++++
drivers/pci/pci.c | 44 +
drivers/video/Kconfig | 2
include/linux/pci.h | 2
include/linux/vgaarb.h | 196 +++++++
8 files changed, 1461 insertions(+), 2 deletions(-)
Index: linux-2.6-vga-arb.patch
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/devel/linux-2.6-vga-arb.patch,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -p -r1.6 -r1.7
--- linux-2.6-vga-arb.patch 4 Aug 2009 01:47:32 -0000 1.6
+++ linux-2.6-vga-arb.patch 6 Aug 2009 05:33:44 -0000 1.7
@@ -1,4 +1,4 @@
-From a00c47b3e783fe9ebb871071d2472387451d9225 Mon Sep 17 00:00:00 2001
+From 83ec7b4c9fecfcffe396290f6e96ea5a60a59598 Mon Sep 17 00:00:00 2001
From: Tiago Vignatti <tiago.vignatti at nokia.com>
Date: Tue, 14 Jul 2009 15:57:29 +0300
Subject: [PATCH] vga: implements VGA arbitration on Linux
@@ -15,18 +15,20 @@ balance pci get/put
use the decodes count for userspace to get card
count also if a gpu disables decodes move it to
the next card
+do handover properly to next card
+optimise notify to only be done when something happens
Signed-off-by: Tiago Vignatti <tiago.vignatti at nokia.com>
---
drivers/gpu/Makefile | 2 +-
drivers/gpu/vga/Kconfig | 10 +
drivers/gpu/vga/Makefile | 1 +
- drivers/gpu/vga/vgaarb.c | 1195 ++++++++++++++++++++++++++++++++++++++++++++++
+ drivers/gpu/vga/vgaarb.c | 1206 ++++++++++++++++++++++++++++++++++++++++++++++
drivers/pci/pci.c | 44 ++
drivers/video/Kconfig | 2 +
include/linux/pci.h | 2 +
include/linux/vgaarb.h | 195 ++++++++
- 8 files changed, 1450 insertions(+), 1 deletions(-)
+ 8 files changed, 1461 insertions(+), 1 deletions(-)
create mode 100644 drivers/gpu/vga/Kconfig
create mode 100644 drivers/gpu/vga/Makefile
create mode 100644 drivers/gpu/vga/vgaarb.c
@@ -64,10 +66,10 @@ index 0000000..7cc8c1e
+obj-$(CONFIG_VGA_ARB) += vgaarb.o
diff --git a/drivers/gpu/vga/vgaarb.c b/drivers/gpu/vga/vgaarb.c
new file mode 100644
-index 0000000..08ba44d
+index 0000000..199138f
--- /dev/null
+++ b/drivers/gpu/vga/vgaarb.c
-@@ -0,0 +1,1195 @@
+@@ -0,0 +1,1206 @@
+/*
+ * vgaarb.c
+ *
@@ -476,7 +478,7 @@ index 0000000..08ba44d
+ * the arbiter's client decides if devices decodes or not legacy
+ * things.
+ */
-+static void vga_arbiter_add_pci_device(struct pci_dev *pdev)
++static bool vga_arbiter_add_pci_device(struct pci_dev *pdev)
+{
+ struct vga_device *vgadev;
+ unsigned long flags;
@@ -486,7 +488,7 @@ index 0000000..08ba44d
+
+ /* Only deal with VGA class devices */
+ if ((pdev->class >> 8) != PCI_CLASS_DISPLAY_VGA)
-+ return;
++ return false;
+
+ /* Allocate structure */
+ vgadev = kmalloc(sizeof(struct vga_device), GFP_KERNEL);
@@ -496,7 +498,7 @@ index 0000000..08ba44d
+ * just do nothing, I'm not sure there is anything saner
+ * to be done
+ */
-+ return;
++ return false;
+ }
+
+ memset(vgadev, 0, sizeof(*vgadev));
@@ -559,21 +561,25 @@ index 0000000..08ba44d
+ vga_iostate_to_str(vgadev->locks));
+
+ spin_unlock_irqrestore(&vga_lock, flags);
-+ return;
++ return true;
+fail:
+ spin_unlock_irqrestore(&vga_lock, flags);
+ kfree(vgadev);
++ return false;
+}
+
-+static void vga_arbiter_del_pci_device(struct pci_dev *pdev)
++static bool vga_arbiter_del_pci_device(struct pci_dev *pdev)
+{
+ struct vga_device *vgadev;
+ unsigned long flags;
++ bool ret = true;
+
+ spin_lock_irqsave(&vga_lock, flags);
+ vgadev = vgadev_find(pdev);
-+ if (vgadev == NULL)
++ if (vgadev == NULL) {
++ ret = false;
+ goto bail;
++ }
+
+ if (vga_default == pdev) {
+ pci_dev_put(vga_default);
@@ -596,6 +602,7 @@ index 0000000..08ba44d
+bail:
+ spin_unlock_irqrestore(&vga_lock, flags);
+ kfree(vgadev);
++ return ret;
+}
+
+/* this is called with the lock */
@@ -608,18 +615,22 @@ index 0000000..08ba44d
+ old_decodes = vgadev->decodes;
+ vgadev->decodes = new_decodes;
+
-+ pr_info("vgaarb: device changed decodes: PCI:%s,olddecodes=%s,decodes=%s\n",
++ pr_info("vgaarb: device changed decodes: PCI:%s,olddecodes=%s,decodes=%s:owns=%s\n",
+ pci_name(vgadev->pdev),
+ vga_iostate_to_str(old_decodes),
-+ vga_iostate_to_str(vgadev->decodes));
++ vga_iostate_to_str(vgadev->decodes),
++ vga_iostate_to_str(vgadev->owns));
++
+
+ /* if we own the decodes we should move them along to
+ another card */
-+ if ((vgadev->owns & new_decodes) && (vga_count > 1)) {
-+ vgadev->owns &= new_decodes;
++ if ((vgadev->owns & old_decodes) && (vga_count > 1)) {
++ /* set us to own nothing */
++ vgadev->owns &= ~old_decodes;
+ list_for_each_entry(new_vgadev, &vga_list, list) {
+ if ((new_vgadev != vgadev) &&
+ (new_vgadev->decodes & VGA_RSRC_LEGACY_MASK)) {
++ pr_info("vgaarb: transferring owner from PCI:%s to PCI:%s\n", pci_name(vgadev->pdev), pci_name(new_vgadev->pdev));
+ conflict = __vga_tryget(new_vgadev, VGA_RSRC_LEGACY_MASK);
+ if (!conflict)
+ __vga_put(new_vgadev, VGA_RSRC_LEGACY_MASK);
@@ -1209,6 +1220,7 @@ index 0000000..08ba44d
+{
+ struct device *dev = data;
+ struct pci_dev *pdev = to_pci_dev(dev);
++ bool notify = false;
+
+ pr_devel("%s\n", __func__);
+
@@ -1216,11 +1228,12 @@ index 0000000..08ba44d
+ * test this thing here, so someone needs to double check for the
+ * cases of hotplugable vga cards. */
+ if (action == BUS_NOTIFY_ADD_DEVICE)
-+ vga_arbiter_add_pci_device(pdev);
++ notify = vga_arbiter_add_pci_device(pdev);
+ else if (action == BUS_NOTIFY_DEL_DEVICE)
-+ vga_arbiter_del_pci_device(pdev);
++ notify = vga_arbiter_del_pci_device(pdev);
+
-+ vga_arbiter_notify_clients();
++ if (notify)
++ vga_arbiter_notify_clients();
+ return 0;
+}
+
@@ -1319,7 +1332,7 @@ index dbd0f94..d837606 100644
static char resource_alignment_param[RESOURCE_ALIGNMENT_PARAM_SIZE] = {0};
spinlock_t resource_alignment_lock = SPIN_LOCK_UNLOCKED;
diff --git a/drivers/video/Kconfig b/drivers/video/Kconfig
-index 8afcf08..f4ed145 100644
+index 3b54b39..a0d9ee1 100644
--- a/drivers/video/Kconfig
+++ b/drivers/video/Kconfig
@@ -7,6 +7,8 @@ menu "Graphics support"
@@ -1546,5 +1559,5 @@ index 0000000..68229ce
+
+#endif /* LINUX_VGA_H */
--
-1.5.4.1
+1.6.4
- Previous message (by thread): rpms/midori/devel .cvsignore, 1.12, 1.13 midori.spec, 1.24, 1.25 sources, 1.12, 1.13
- Next message (by thread): rpms/midori/F-11 .cvsignore, 1.12, 1.13 midori.spec, 1.24, 1.25 sources, 1.12, 1.13
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list