nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

Blame SOURCES/0113-Disable-GRUB-video-support-for-IBM-power-machines.patch

f725e3
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
f725e3
From: Paulo Flabiano Smorigo <pfsmorigo@br.ibm.com>
f725e3
Date: Tue, 11 Jun 2013 15:14:05 -0300
f725e3
Subject: [PATCH] Disable GRUB video support for IBM power machines
f725e3
f725e3
Should fix the problem in bugzilla:
f725e3
https://bugzilla.redhat.com/show_bug.cgi?id=973205
f725e3
---
f725e3
 grub-core/kern/ieee1275/cmain.c  | 5 ++++-
f725e3
 grub-core/video/ieee1275.c       | 9 ++++++---
f725e3
 include/grub/ieee1275/ieee1275.h | 2 ++
f725e3
 3 files changed, 12 insertions(+), 4 deletions(-)
f725e3
f725e3
diff --git a/grub-core/kern/ieee1275/cmain.c b/grub-core/kern/ieee1275/cmain.c
f725e3
index 3e12e6b24e1..3e14f539368 100644
f725e3
--- a/grub-core/kern/ieee1275/cmain.c
f725e3
+++ b/grub-core/kern/ieee1275/cmain.c
f725e3
@@ -90,7 +90,10 @@ grub_ieee1275_find_options (void)
f725e3
   }
f725e3
 
f725e3
   if (rc >= 0 && grub_strncmp (tmp, "IBM", 3) == 0)
f725e3
-    grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_NO_TREE_SCANNING_FOR_DISKS);
f725e3
+    {
f725e3
+      grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_NO_TREE_SCANNING_FOR_DISKS);
f725e3
+      grub_ieee1275_set_flag (GRUB_IEEE1275_FLAG_DISABLE_VIDEO_SUPPORT);
f725e3
+    }
f725e3
 
f725e3
   /* Old Macs have no key repeat, newer ones have fully working one.
f725e3
      The ones inbetween when repeated key generates an escaoe sequence
f725e3
diff --git a/grub-core/video/ieee1275.c b/grub-core/video/ieee1275.c
f725e3
index 0b150ec2406..813ab38e1e0 100644
f725e3
--- a/grub-core/video/ieee1275.c
f725e3
+++ b/grub-core/video/ieee1275.c
f725e3
@@ -351,9 +351,12 @@ static struct grub_video_adapter grub_video_ieee1275_adapter =
f725e3
 
f725e3
 GRUB_MOD_INIT(ieee1275_fb)
f725e3
 {
f725e3
-  find_display ();
f725e3
-  if (display)
f725e3
-    grub_video_register (&grub_video_ieee1275_adapter);
f725e3
+  if (! grub_ieee1275_test_flag (GRUB_IEEE1275_FLAG_DISABLE_VIDEO_SUPPORT))
f725e3
+    {
f725e3
+      find_display ();
f725e3
+      if (display)
f725e3
+        grub_video_register (&grub_video_ieee1275_adapter);
f725e3
+    }
f725e3
 }
f725e3
 
f725e3
 GRUB_MOD_FINI(ieee1275_fb)
f725e3
diff --git a/include/grub/ieee1275/ieee1275.h b/include/grub/ieee1275/ieee1275.h
f725e3
index 6a21f5d6de8..663935da7a5 100644
f725e3
--- a/include/grub/ieee1275/ieee1275.h
f725e3
+++ b/include/grub/ieee1275/ieee1275.h
f725e3
@@ -146,6 +146,8 @@ enum grub_ieee1275_flag
f725e3
   GRUB_IEEE1275_FLAG_BROKEN_REPEAT,
f725e3
 
f725e3
   GRUB_IEEE1275_FLAG_CURSORONOFF_ANSI_BROKEN,
f725e3
+
f725e3
+  GRUB_IEEE1275_FLAG_DISABLE_VIDEO_SUPPORT
f725e3
 };
f725e3
 
f725e3
 extern int EXPORT_FUNC(grub_ieee1275_test_flag) (enum grub_ieee1275_flag flag);