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

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