nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

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

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