nalika / rpms / grub2

Forked from rpms/grub2 2 years ago
Clone

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

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