Update vga_default_device.patch to fix build failures (rhbz 830446)

This commit is contained in:
Josh Boyer 2012-07-20 13:55:24 -04:00
parent e557f0dad8
commit e89b5d878b
2 changed files with 128 additions and 293 deletions

View File

@ -54,7 +54,7 @@ Summary: The Linux kernel
# For non-released -rc kernels, this will be appended after the rcX and
# gitX tags, so a 3 here would become part of release "0.rcX.gitX.3"
#
%global baserelease 2
%global baserelease 3
%global fedora_build %{baserelease}
# base_sublevel is the kernel version we're starting with and patching
@ -2343,6 +2343,9 @@ fi
# '-' | |
# '-'
%changelog
* Fri Jul 20 2012 Josh Boyer <jwboyer@redhat.com>
- Update vga_default_device.patch to fix build failures (rhbz 830446)
* Thu Jul 19 2012 Josh Boyer <jwboyer@redhat.com> - 3.4.6-2
- Linux v3.4.6

View File

@ -1,63 +1,22 @@
Delivered-To: jwboyer@gmail.com
Received: by 10.229.187.201 with SMTP id cx9csp141480qcb;
Mon, 16 Apr 2012 13:27:50 -0700 (PDT)
Received: by 10.60.0.201 with SMTP id 9mr17463209oeg.59.1334608065659;
Mon, 16 Apr 2012 13:27:45 -0700 (PDT)
Return-Path: <linux-kernel-owner@vger.kernel.org>
Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67])
by mx.google.com with ESMTP id 4si12245496oei.14.2012.04.16.13.27.44;
Mon, 16 Apr 2012 13:27:45 -0700 (PDT)
Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67;
Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mail=linux-kernel-owner@vger.kernel.org
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
id S1755065Ab2DPU02 (ORCPT <rfc822;padmanabhlinux@gmail.com>
+ 99 others); Mon, 16 Apr 2012 16:26:28 -0400
Received: from mx1.redhat.com ([209.132.183.28]:1184 "EHLO mx1.redhat.com"
rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
id S1754698Ab2DPU01 (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
Mon, 16 Apr 2012 16:26:27 -0400
Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11])
by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q3GKQPYb007336
(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
Mon, 16 Apr 2012 16:26:25 -0400
Received: from cavan.codon.org.uk (ovpn-113-122.phx2.redhat.com [10.3.113.122])
by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id q3GKQNG5011412
(version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO);
Mon, 16 Apr 2012 16:26:24 -0400
Received: from nat-pool-rdu.redhat.com ([66.187.233.202] helo=x220.boston.devel.redhat.com)
by cavan.codon.org.uk with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
(Exim 4.72)
(envelope-from <mjg@redhat.com>)
id 1SJsVA-0003T4-U8; Mon, 16 Apr 2012 21:26:21 +0100
From: Matthew Garrett <mjg@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: Matthew Garrett <mjg@redhat.com>, benh@kernel.crashing.org,
airlied@redhat.com
Subject: [PATCH V2 1/4] vgaarb: Add support for setting the default video device
Date: Mon, 16 Apr 2012 16:26:02 -0400
Message-Id: <1334607965-9582-1-git-send-email-mjg@redhat.com>
X-SA-Do-Not-Run: Yes
X-SA-Exim-Connect-IP: 66.187.233.202
X-SA-Exim-Mail-From: mjg@redhat.com
X-SA-Exim-Scanned: No (on cavan.codon.org.uk); SAEximRunCond expanded to false
X-Scanned-By: MIMEDefang 2.67 on 10.5.11.11
Sender: linux-kernel-owner@vger.kernel.org
Precedence: bulk
List-ID: <linux-kernel.vger.kernel.org>
X-Mailing-List: linux-kernel@vger.kernel.org
From 1a39b310e920bb7098067d96411b31e459ae8f32 Mon Sep 17 00:00:00 2001
From: Matthew Garrett <mjg@redhat.com>
Date: Mon, 16 Apr 2012 16:26:02 -0400
Subject: [PATCH] vgaarb: Add support for setting the default video device
(v2)
The default VGA device is a somewhat fluid concept on platforms with
multiple GPUs. Add support for setting it so switching code can update
things appropriately, and make sure that the sysfs code returns the right
device if it's changed.
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Cc: benh@kernel.crashing.org
Cc: airlied@redhat.com
---
Updated to fix builds when __ARCH_HAS_VGA_DEFAULT_DEVICE is false.
v2: Updated to fix builds when __ARCH_HAS_VGA_DEFAULT_DEVICE is false.
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Acked-by: benh@kernel.crashing.org
Cc: airlied@redhat.com
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
drivers/gpu/vga/vgaarb.c | 7 +++++++
drivers/pci/pci-sysfs.c | 5 +++++
include/linux/vgaarb.h | 2 ++
@ -93,7 +52,7 @@ index 111d956..e223b96 100644
if (vgadev->decodes & (VGA_RSRC_LEGACY_IO | VGA_RSRC_LEGACY_MEM))
vga_decode_count--;
diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
index a3cd8ca..7dd9f2b 100644
index a55e248..86c63fe 100644
--- a/drivers/pci/pci-sysfs.c
+++ b/drivers/pci/pci-sysfs.c
@@ -27,6 +27,7 @@
@ -104,7 +63,7 @@ index a3cd8ca..7dd9f2b 100644
#include "pci.h"
static int sysfs_initialized; /* = 0 */
@@ -414,6 +415,10 @@ static ssize_t
@@ -417,6 +418,10 @@ static ssize_t
boot_vga_show(struct device *dev, struct device_attribute *attr, char *buf)
{
struct pci_dev *pdev = to_pci_dev(dev);
@ -116,7 +75,7 @@ index a3cd8ca..7dd9f2b 100644
return sprintf(buf, "%u\n",
!!(pdev->resource[PCI_ROM_RESOURCE].flags &
diff --git a/include/linux/vgaarb.h b/include/linux/vgaarb.h
index 9c3120d..759a25b 100644
index 9c3120d..759a25ba 100644
--- a/include/linux/vgaarb.h
+++ b/include/linux/vgaarb.h
@@ -31,6 +31,7 @@
@ -136,62 +95,12 @@ index 9c3120d..759a25b 100644
/**
--
1.7.10
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Delivered-To: jwboyer@gmail.com
Received: by 10.229.187.201 with SMTP id cx9csp141468qcb;
Mon, 16 Apr 2012 13:27:10 -0700 (PDT)
Received: by 10.182.202.69 with SMTP id kg5mr18039202obc.35.1334608025784;
Mon, 16 Apr 2012 13:27:05 -0700 (PDT)
Return-Path: <linux-kernel-owner@vger.kernel.org>
Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67])
by mx.google.com with ESMTP id p9si5895556obv.34.2012.04.16.13.27.01;
Mon, 16 Apr 2012 13:27:05 -0700 (PDT)
Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67;
Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mail=linux-kernel-owner@vger.kernel.org
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
id S1755523Ab2DPU0b (ORCPT <rfc822;padmanabhlinux@gmail.com>
+ 99 others); Mon, 16 Apr 2012 16:26:31 -0400
Received: from mx1.redhat.com ([209.132.183.28]:15578 "EHLO mx1.redhat.com"
rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
id S1752993Ab2DPU00 (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
Mon, 16 Apr 2012 16:26:26 -0400
Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q3GKQPu2015452
(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK)
for <linux-kernel@vger.kernel.org>; Mon, 16 Apr 2012 16:26:25 -0400
Received: from cavan.codon.org.uk (ovpn-113-122.phx2.redhat.com [10.3.113.122])
by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q3GKQOk2005441
(version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO);
Mon, 16 Apr 2012 16:26:25 -0400
Received: from nat-pool-rdu.redhat.com ([66.187.233.202] helo=x220.boston.devel.redhat.com)
by cavan.codon.org.uk with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
(Exim 4.72)
(envelope-from <mjg@redhat.com>)
id 1SJsVC-0003T4-AS; Mon, 16 Apr 2012 21:26:22 +0100
From: Matthew Garrett <mjg@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: Matthew Garrett <mjg@redhat.com>, airlied@redhat.com
Subject: [PATCH V2 2/4] vga-switcheroo: Use vga_default_device()
Date: Mon, 16 Apr 2012 16:26:03 -0400
Message-Id: <1334607965-9582-2-git-send-email-mjg@redhat.com>
In-Reply-To: <1334607965-9582-1-git-send-email-mjg@redhat.com>
References: <1334607965-9582-1-git-send-email-mjg@redhat.com>
X-SA-Do-Not-Run: Yes
X-SA-Exim-Connect-IP: 66.187.233.202
X-SA-Exim-Mail-From: mjg@redhat.com
X-SA-Exim-Scanned: No (on cavan.codon.org.uk); SAEximRunCond expanded to false
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
Sender: linux-kernel-owner@vger.kernel.org
Precedence: bulk
List-ID: <linux-kernel.vger.kernel.org>
X-Mailing-List: linux-kernel@vger.kernel.org
From 2fbe8c7c3ebfed2059a6597322bb0dbc4d96feb5 Mon Sep 17 00:00:00 2001
From: Matthew Garrett <mjg@redhat.com>
Date: Mon, 16 Apr 2012 16:26:03 -0400
Subject: [PATCH] vga-switcheroo: Use vga_default_device()
vga-switcheroo currently changes the default VGA device by fiddling with
the IORESOURCE_ROM_SHADOW flag on the device. This isn't strictly accurate,
@ -199,13 +108,13 @@ since there's no guarantee that switching also changes the ROM decoding.
Switch over to using the vgaarb functions for this.
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Cc: airlied@redhat.com
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
drivers/gpu/vga/vga_switcheroo.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/vga/vga_switcheroo.c b/drivers/gpu/vga/vga_switcheroo.c
index 9a2c805..44c664e 100644
index 58434e8..9d83028 100644
--- a/drivers/gpu/vga/vga_switcheroo.c
+++ b/drivers/gpu/vga/vga_switcheroo.c
@@ -28,6 +28,8 @@
@ -217,7 +126,7 @@ index 9a2c805..44c664e 100644
struct vga_switcheroo_client {
struct pci_dev *pdev;
struct fb_info *fb_info;
@@ -140,7 +142,7 @@ int vga_switcheroo_register_client(struct pci_dev *pdev,
@@ -122,7 +124,7 @@ int vga_switcheroo_register_client(struct pci_dev *pdev,
vgasr_priv.clients[index].reprobe = reprobe;
vgasr_priv.clients[index].can_switch = can_switch;
vgasr_priv.clients[index].id = -1;
@ -226,7 +135,7 @@ index 9a2c805..44c664e 100644
vgasr_priv.clients[index].active = true;
vgasr_priv.registered_clients |= (1 << index);
@@ -248,9 +250,8 @@ static int vga_switchto_stage1(struct vga_switcheroo_client *new_client)
@@ -230,9 +232,8 @@ static int vga_switchto_stage1(struct vga_switcheroo_client *new_client)
if (new_client->pwr_state == VGA_SWITCHEROO_OFF)
vga_switchon(new_client);
@ -239,62 +148,13 @@ index 9a2c805..44c664e 100644
}
--
1.7.10
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Delivered-To: jwboyer@gmail.com
Received: by 10.229.187.201 with SMTP id cx9csp141463qcb;
Mon, 16 Apr 2012 13:27:04 -0700 (PDT)
Received: by 10.60.10.137 with SMTP id i9mr18822682oeb.23.1334608019708;
Mon, 16 Apr 2012 13:26:59 -0700 (PDT)
Return-Path: <linux-kernel-owner@vger.kernel.org>
Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67])
by mx.google.com with ESMTP id h6si5711741obv.22.2012.04.16.13.26.58;
Mon, 16 Apr 2012 13:26:59 -0700 (PDT)
Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67;
Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mail=linux-kernel-owner@vger.kernel.org
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
id S1755396Ab2DPU0a (ORCPT <rfc822;padmanabhlinux@gmail.com>
+ 99 others); Mon, 16 Apr 2012 16:26:30 -0400
Received: from mx1.redhat.com ([209.132.183.28]:4863 "EHLO mx1.redhat.com"
rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
id S1754084Ab2DPU01 (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
Mon, 16 Apr 2012 16:26:27 -0400
Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23])
by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q3GKQQrr007340
(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
Mon, 16 Apr 2012 16:26:26 -0400
Received: from cavan.codon.org.uk (ovpn-113-122.phx2.redhat.com [10.3.113.122])
by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q3GKQPuK005698
(version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO);
Mon, 16 Apr 2012 16:26:26 -0400
Received: from nat-pool-rdu.redhat.com ([66.187.233.202] helo=x220.boston.devel.redhat.com)
by cavan.codon.org.uk with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
(Exim 4.72)
(envelope-from <mjg@redhat.com>)
id 1SJsVD-0003T4-F3; Mon, 16 Apr 2012 21:26:23 +0100
From: Matthew Garrett <mjg@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: Matthew Garrett <mjg@redhat.com>, mingo@redhat.com, hpa@zytor.com
Subject: [PATCH V2 3/4] x86: Use vga_default_device() when determining whether an fb is primary
Date: Mon, 16 Apr 2012 16:26:04 -0400
Message-Id: <1334607965-9582-3-git-send-email-mjg@redhat.com>
In-Reply-To: <1334607965-9582-1-git-send-email-mjg@redhat.com>
References: <1334607965-9582-1-git-send-email-mjg@redhat.com>
X-SA-Do-Not-Run: Yes
X-SA-Exim-Connect-IP: 66.187.233.202
X-SA-Exim-Mail-From: mjg@redhat.com
X-SA-Exim-Scanned: No (on cavan.codon.org.uk); SAEximRunCond expanded to false
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23
Sender: linux-kernel-owner@vger.kernel.org
Precedence: bulk
List-ID: <linux-kernel.vger.kernel.org>
X-Mailing-List: linux-kernel@vger.kernel.org
From 88674088d10ca2538b2efd2559f6620ade8ec373 Mon Sep 17 00:00:00 2001
From: Matthew Garrett <mjg@redhat.com>
Date: Mon, 16 Apr 2012 16:26:04 -0400
Subject: [PATCH] x86: Use vga_default_device() when determining whether an fb
is primary
IORESOURCE_ROM_SHADOW is not necessarily an indication that the hardware
is the primary device. Add support for using the vgaarb functions and
@ -302,7 +162,8 @@ fall back if nothing's set them.
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Cc: mingo@redhat.com
Cc: hpa@zytor.com
Acked-by: hpa@zytor.com
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
arch/x86/video/fbdev.c | 20 +++++++++++++++-----
1 file changed, 15 insertions(+), 5 deletions(-)
@ -352,79 +213,31 @@ index c5ffb6a..d5644bb 100644
EXPORT_SYMBOL(fb_is_primary_device);
MODULE_LICENSE("GPL");
--
1.7.10
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Delivered-To: jwboyer@gmail.com
Received: by 10.229.187.201 with SMTP id cx9csp141467qcb;
Mon, 16 Apr 2012 13:27:10 -0700 (PDT)
Received: by 10.182.183.73 with SMTP id ek9mr17996942obc.15.1334608026429;
Mon, 16 Apr 2012 13:27:06 -0700 (PDT)
Return-Path: <linux-kernel-owner@vger.kernel.org>
Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67])
by mx.google.com with ESMTP id ry6si1466151obc.95.2012.04.16.13.27.02;
Mon, 16 Apr 2012 13:27:06 -0700 (PDT)
Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67;
Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mail=linux-kernel-owner@vger.kernel.org
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
id S1755405Ab2DPU0z (ORCPT <rfc822;padmanabhlinux@gmail.com>
+ 99 others); Mon, 16 Apr 2012 16:26:55 -0400
Received: from mx1.redhat.com ([209.132.183.28]:27749 "EHLO mx1.redhat.com"
rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
id S1755265Ab2DPU03 (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
Mon, 16 Apr 2012 16:26:29 -0400
Received: from int-mx12.intmail.prod.int.phx2.redhat.com (int-mx12.intmail.prod.int.phx2.redhat.com [10.5.11.25])
by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q3GKQShl015458
(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
Mon, 16 Apr 2012 16:26:28 -0400
Received: from cavan.codon.org.uk (ovpn-113-122.phx2.redhat.com [10.3.113.122])
by int-mx12.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q3GKQQwW005450
(version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO);
Mon, 16 Apr 2012 16:26:27 -0400
Received: from nat-pool-rdu.redhat.com ([66.187.233.202] helo=x220.boston.devel.redhat.com)
by cavan.codon.org.uk with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
(Exim 4.72)
(envelope-from <mjg@redhat.com>)
id 1SJsVE-0003T4-Uv; Mon, 16 Apr 2012 21:26:25 +0100
From: Matthew Garrett <mjg@redhat.com>
To: linux-kernel@vger.kernel.org
Cc: Matthew Garrett <mjg@redhat.com>, hpa@zytor.com,
matt.fleming@intel.com
Subject: [PATCH V2 4/4] efifb: Implement vga_default_device()
Date: Mon, 16 Apr 2012 16:26:05 -0400
Message-Id: <1334607965-9582-4-git-send-email-mjg@redhat.com>
In-Reply-To: <1334607965-9582-1-git-send-email-mjg@redhat.com>
References: <1334607965-9582-1-git-send-email-mjg@redhat.com>
X-SA-Do-Not-Run: Yes
X-SA-Exim-Connect-IP: 66.187.233.202
X-SA-Exim-Mail-From: mjg@redhat.com
X-SA-Exim-Scanned: No (on cavan.codon.org.uk); SAEximRunCond expanded to false
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.25
Sender: linux-kernel-owner@vger.kernel.org
Precedence: bulk
List-ID: <linux-kernel.vger.kernel.org>
X-Mailing-List: linux-kernel@vger.kernel.org
From b4aa0163056b6c70029b6e8619ce07c274351f42 Mon Sep 17 00:00:00 2001
From: Matthew Garrett <mjg@redhat.com>
Date: Mon, 16 Apr 2012 16:26:05 -0400
Subject: [PATCH] efifb: Implement vga_default_device() (v2)
EFI doesn't typically make use of the legacy VGA ROM, but it may still be
configured to pass that through to a given video device. This may lead to
an inaccurate choice of default video device. Add support to efifb to pick
out the correct active video device.
v2: fix if->ifdef
Signed-off-by: Matthew Garrett <mjg@redhat.com>
Cc: hpa@zytor.com
Acked-by: hpa@zytor.com
Cc: matt.fleming@intel.com
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
arch/x86/include/asm/vga.h | 6 ++++
drivers/video/efifb.c | 77 ++++++++++++++++++++++++++++++++------------
2 files changed, 63 insertions(+), 20 deletions(-)
diff --git a/arch/x86/include/asm/vga.h b/arch/x86/include/asm/vga.h
index c4b9dc2..2723c07 100644
index c4b9dc2..44282fb 100644
--- a/arch/x86/include/asm/vga.h
+++ b/arch/x86/include/asm/vga.h
@@ -17,4 +17,10 @@
@ -543,62 +356,12 @@ index 784139a..66ed991 100644
}
--
1.7.10
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Path: news.gmane.org!not-for-mail
From: Dave Airlie <airlied@gmail.com>
Newsgroups: gmane.linux.kernel
Subject: [PATCH] x86/vga: set the default device from the fixup.
Date: Mon, 14 May 2012 17:01:20 +0100
Lines: 42
Approved: news@gmane.org
Message-ID: <1337011280-7166-1-git-send-email-airlied@gmail.com>
NNTP-Posting-Host: plane.gmane.org
X-Trace: dough.gmane.org 1337011751 27684 80.91.229.3 (14 May 2012 16:09:11 GMT)
X-Complaints-To: usenet@dough.gmane.org
NNTP-Posting-Date: Mon, 14 May 2012 16:09:11 +0000 (UTC)
Cc: Dave Airlie <airlied@redhat.com>, Matthew Garrett <mjg@redhat.com>,
"H. Peter Anvin" <hpa@zytor.com>
To: linux-kernel@vger.kernel.org
Original-X-From: linux-kernel-owner@vger.kernel.org Mon May 14 18:09:10 2012
Return-path: <linux-kernel-owner@vger.kernel.org>
Envelope-to: glk-linux-kernel-3@plane.gmane.org
Original-Received: from vger.kernel.org ([209.132.180.67])
by plane.gmane.org with esmtp (Exim 4.69)
(envelope-from <linux-kernel-owner@vger.kernel.org>)
id 1STxpW-0007oo-4X
for glk-linux-kernel-3@plane.gmane.org; Mon, 14 May 2012 18:09:02 +0200
Original-Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
id S1756889Ab2ENQIs (ORCPT <rfc822;glk-linux-kernel-3@m.gmane.org>);
Mon, 14 May 2012 12:08:48 -0400
Original-Received: from mx1.redhat.com ([209.132.183.28]:34445 "EHLO mx1.redhat.com"
rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP
id S1756736Ab2ENQIm (ORCPT <rfc822;linux-kernel@vger.kernel.org>);
Mon, 14 May 2012 12:08:42 -0400
Original-Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24])
by mx1.redhat.com (8.14.4/8.14.4) with ESMTP id q4EG8ftT012092
(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK);
Mon, 14 May 2012 12:08:42 -0400
Original-Received: from optimus.redhat.com (vpn1-5-164.ams2.redhat.com [10.36.5.164])
by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id q4EG5Ch0001452;
Mon, 14 May 2012 12:05:12 -0400
X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24
Original-Sender: linux-kernel-owner@vger.kernel.org
Precedence: bulk
List-ID: <linux-kernel.vger.kernel.org>
X-Mailing-List: linux-kernel@vger.kernel.org
Xref: news.gmane.org gmane.linux.kernel:1296685
Archived-At: <http://permalink.gmane.org/gmane.linux.kernel/1296685>
1.7.10.4
From 6cf20beec4b91c240cf759b4db72669e251f1fc4 Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied@redhat.com>
Date: Mon, 14 May 2012 17:00:40 +0100
Subject: [PATCH] x86/vga: set the default device from the fixup.
Since Matthew's efi/vga changes on non-EFI machines we were failing
to tell the vgaarb/switcheroo what the default device was, this
@ -606,18 +369,15 @@ 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>
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
arch/x86/pci/fixup.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
1 file changed, 3 insertions(+)
diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c
index d0e6e40..cf81c02 100644
index d0e6e40..0163553 100644
--- a/arch/x86/pci/fixup.c
+++ b/arch/x86/pci/fixup.c
@@ -7,6 +7,7 @@
@ -632,11 +392,83 @@ index d0e6e40..cf81c02 100644
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)
+ if (!vga_default_device())
+ vga_set_default_device(pdev);
}
}
DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_ANY_ID, PCI_ANY_ID,
--
1.7.6
1.7.10.4
From 1b23170a8e14ef62ad1daa957aa528212a8d0aef Mon Sep 17 00:00:00 2001
From: Matthew Garrett <mjg@redhat.com>
Date: Tue, 24 Apr 2012 09:31:28 +0100
Subject: [PATCH] vga: fix build when fbdev is a module
This fixes the build breakage reported by Stephen in -next
when merging the drm-next tree.
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
drivers/gpu/vga/vgaarb.c | 2 ++
drivers/video/efifb.c | 2 ++
2 files changed, 4 insertions(+)
diff --git a/drivers/gpu/vga/vgaarb.c b/drivers/gpu/vga/vgaarb.c
index e223b96..3df8fc0 100644
--- a/drivers/gpu/vga/vgaarb.c
+++ b/drivers/gpu/vga/vgaarb.c
@@ -137,6 +137,8 @@ struct pci_dev *vga_default_device(void)
return vga_default;
}
+EXPORT_SYMBOL_GPL(vga_default_device);
+
void vga_set_default_device(struct pci_dev *pdev)
{
vga_default = pdev;
diff --git a/drivers/video/efifb.c b/drivers/video/efifb.c
index 66ed991..b4a632a 100644
--- a/drivers/video/efifb.c
+++ b/drivers/video/efifb.c
@@ -305,6 +305,8 @@ struct pci_dev *vga_default_device(void)
return default_vga;
}
+EXPORT_SYMBOL_GPL(vga_default_device);
+
void vga_set_default_device(struct pci_dev *pdev)
{
default_vga = pdev;
--
1.7.10.4
From db2e034d2c55e1f273ed820cc3edcdbc73d0292c Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied@redhat.com>
Date: Thu, 17 May 2012 08:31:29 +0100
Subject: [PATCH] x86/vga: fix build with efi disabled.
Reported by sfr on -next merge.
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
arch/x86/pci/fixup.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/x86/pci/fixup.c b/arch/x86/pci/fixup.c
index 0163553..82487d3 100644
--- a/arch/x86/pci/fixup.c
+++ b/arch/x86/pci/fixup.c
@@ -6,8 +6,8 @@
#include <linux/dmi.h>
#include <linux/pci.h>
#include <linux/init.h>
+#include <linux/vgaarb.h>
#include <asm/pci_x86.h>
-#include <asm/vga.h>
static void __devinit pci_fixup_i450nx(struct pci_dev *d)
{
--
1.7.10.4