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

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