[kernel/f17] Skip DMI checks if the bootloader knows what it's doing

Justin M. Forbes jforbes at fedoraproject.org
Fri Apr 27 18:06:39 UTC 2012


commit 918c474fc0ac2d6aedae2f8c86d09c9281007ac8
Author: Justin M. Forbes <jforbes at redhat.com>
Date:   Fri Apr 27 13:07:40 2012 -0500

    Skip DMI checks if the bootloader knows what it's doing

 efifb-skip-DMI-checks-if-bootloader-knows.patch |   45 +++++++++++++++++++++++
 kernel.spec                                     |    7 ++++
 2 files changed, 52 insertions(+), 0 deletions(-)
---
diff --git a/efifb-skip-DMI-checks-if-bootloader-knows.patch b/efifb-skip-DMI-checks-if-bootloader-knows.patch
new file mode 100644
index 0000000..1936d1c
--- /dev/null
+++ b/efifb-skip-DMI-checks-if-bootloader-knows.patch
@@ -0,0 +1,45 @@
+commit 9b989ae8a30f5a430fabbf911e0643bca96c3fd1
+Author: Matthew Garrett <mjg at redhat.com>
+Date:   Thu Apr 26 17:35:58 2012 -0400
+
+    efifb: Skip DMI checks if the bootloader knows what it's doing
+    
+    The majority of the DMI checks in efifb are for cases where the bootloader
+    has provided invalid information. However, on some machines the overrides
+    may do more harm than good due to configuration differences between machines
+    with the same machine identifier. It turns out that it's possible for the
+    bootloader to get the correct information on GOP-based systems, but we
+    can't guarantee that the kernel's being booted with one that's been updated
+    to do so. Add support for a capabilities flag that can be set by the
+    bootloader, and skip the DMI checks in that case.
+    
+    Signed-off-by: Matthew Garrett <mjg at redhat.com>
+
+diff --git a/drivers/video/efifb.c b/drivers/video/efifb.c
+index b4a632a..932abaa 100644
+--- a/drivers/video/efifb.c
++++ b/drivers/video/efifb.c
+@@ -553,7 +553,9 @@ static int __init efifb_init(void)
+ 	int ret;
+ 	char *option = NULL;
+ 
+-	dmi_check_system(dmi_system_table);
++	if (screen_info.orig_video_isVGA != VIDEO_TYPE_EFI ||
++	    !(screen_info.capabilities & VIDEO_CAPABILITY_SKIP_QUIRKS))
++		dmi_check_system(dmi_system_table);
+ 
+ 	if (screen_info.orig_video_isVGA != VIDEO_TYPE_EFI)
+ 		return -ENODEV;
+diff --git a/include/linux/screen_info.h b/include/linux/screen_info.h
+index 899fbb4..fb3c5a8 100644
+--- a/include/linux/screen_info.h
++++ b/include/linux/screen_info.h
+@@ -68,6 +68,8 @@ struct screen_info {
+ 
+ #define VIDEO_FLAGS_NOCURSOR	(1 << 0) /* The video mode has no cursor set */
+ 
++#define VIDEO_CAPABILITY_SKIP_QUIRKS	(1 << 0)
++
+ #ifdef __KERNEL__
+ extern struct screen_info screen_info;
+ 
diff --git a/kernel.spec b/kernel.spec
index 980f151..76be299 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -812,6 +812,8 @@ Patch22012: ipw2200-Fix-race-condition-in-the-command-completion-acknowledge.pat
 
 Patch22013: perf-fix-build-breakage.patch
 
+Patch22014: efifb-skip-DMI-checks-if-bootloader-knows.patch
+
 # END OF PATCH DEFINITIONS
 
 %endif
@@ -1577,6 +1579,8 @@ ApplyPatch ipw2200-Fix-race-condition-in-the-command-completion-acknowledge.patc
 
 ApplyPatch perf-fix-build-breakage.patch
 
+ApplyPatch efifb-skip-DMI-checks-if-bootloader-knows.patch
+
 # END OF PATCH APPLICATIONS
 
 %endif
@@ -2431,6 +2435,9 @@ fi
 #    '-'      |  |
 #              '-'
 %changelog
+* Fri Apr 27 2012 Justin M. Forbes <jforbes at redhat.com> 3.3.3-3
+- Skip DMI checks if the bootloader knows what it's doing
+
 * Tue Apr 24 2012 Josh Boyer <jwboyer at redhat.com>
 - Add patch to fix perf build due to incorrect cherry-pick in 3.3.3
 - Add patch to fix ipw2200 (rhbz 802106)


More information about the scm-commits mailing list