* [PATCH] x86/vga: set the default device from the fixup.
@ 2012-05-14 16:01 Dave Airlie
2012-05-14 16:51 ` H. Peter Anvin
0 siblings, 1 reply; 2+ messages in thread
From: Dave Airlie @ 2012-05-14 16:01 UTC (permalink / raw)
To: linux-kernel; +Cc: Dave Airlie, Matthew Garrett, H. Peter Anvin
From: Dave Airlie <airlied@redhat.com>
Since Matthew's efi/vga changes on non-EFI machines we were failing
to tell the vgaarb/switcheroo what the default device was, this
sets the default device in the quirk if none has been set before.
This fixes the switcheroo on my T410s.
[hpa: please ack to put this on top of the other patches in my -next tree].
Signed-off-by: Dave Airlie <airlied@redhat.com>
Cc: Matthew Garrett <mjg@redhat.com>
Cc: H. Peter Anvin <hpa@zytor.com>
---
arch/x86/pci/fixup.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c
index d0e6e40..cf81c02 100644
--- a/arch/x86/pci/fixup.c
+++ b/arch/x86/pci/fixup.c
@@ -7,6 +7,7 @@
#include <linux/pci.h>
#include <linux/init.h>
#include <asm/pci_x86.h>
+#include <asm/vga.h>
static void __devinit pci_fixup_i450nx(struct pci_dev *d)
{
@@ -348,6 +349,8 @@ static void __devinit pci_fixup_video(struct pci_dev *pdev)
if (config & (PCI_COMMAND_IO | PCI_COMMAND_MEMORY)) {
pdev->resource[PCI_ROM_RESOURCE].flags |= IORESOURCE_ROM_SHADOW;
dev_printk(KERN_DEBUG, &pdev->dev, "Boot video device\n");
+ if (vga_default_device() == NULL)
+ vga_set_default_device(pdev);
}
}
DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_ANY_ID, PCI_ANY_ID,
--
1.7.6
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] x86/vga: set the default device from the fixup.
2012-05-14 16:01 [PATCH] x86/vga: set the default device from the fixup Dave Airlie
@ 2012-05-14 16:51 ` H. Peter Anvin
0 siblings, 0 replies; 2+ messages in thread
From: H. Peter Anvin @ 2012-05-14 16:51 UTC (permalink / raw)
To: Dave Airlie; +Cc: linux-kernel, Dave Airlie, Matthew Garrett
On 05/14/2012 09:01 AM, Dave Airlie wrote:
> From: Dave Airlie <airlied@redhat.com>
>
> Since Matthew's efi/vga changes on non-EFI machines we were failing
> to tell the vgaarb/switcheroo what the default device was, this
> sets the default device in the quirk if none has been set before.
>
> This fixes the switcheroo on my T410s.
>
> [hpa: please ack to put this on top of the other patches in my -next tree].
>
> Signed-off-by: Dave Airlie <airlied@redhat.com>
> Cc: Matthew Garrett <mjg@redhat.com>
> Cc: H. Peter Anvin <hpa@zytor.com>
Acked-by: H. Peter Anvin <hpa@zytor.com>
... although I would prefer the
if (!vga_default_device())
syntax as a matter of style.
-hpa
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-05-14 16:51 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-14 16:01 [PATCH] x86/vga: set the default device from the fixup Dave Airlie
2012-05-14 16:51 ` H. Peter Anvin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).