File 0012-efigraph-stick-with-default-GOP-mode-unless-resoluti.patch of Package grub

From 49662a38020f44f8a29bbc847a1eb2e3610a2131 Mon Sep 17 00:00:00 2001
From: Laszlo Ersek <lersek@redhat.com>
Date: Thu, 14 Aug 2014 17:03:12 +0200
Subject: [PATCH] efigraph: stick with default GOP mode unless resolution is
 absurdly small

640x480 could be accepted as lower limit too, but 640x480 is not
sufficient to display the "rotating light" animation during RHEL-6
graphical boot: the image is clipped. Therefore accept any default GOP
resolution greater than or equal to 800x600, and if the default is smaller
than that, fall back to the traditional maximum search.

Signed-off-by: Laszlo Ersek <lersek@redhat.com>
---
 efi/efigraph.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/efi/efigraph.c b/efi/efigraph.c
index c1b8e31..a53502c 100644
--- a/efi/efigraph.c
+++ b/efi/efigraph.c
@@ -1293,6 +1293,18 @@ try_enable(struct graphics_backend *backend)
 
         grub_efi_set_text_mode(0);
         eg->graphics_mode = eg->output_intf->mode->mode;
+
+        /* stick with current graphics mode unless its resolution is absurdly
+         * small
+         */
+        info = eg->output_intf->mode->info;
+        if (info != NULL && info->horizontal_resolution >= 800 &&
+                        info->vertical_resolution >= 600) {
+            fill_pixel_info(&eg->pixel_info, info);
+            eg->current_mode = GRAPHICS;
+            return 1;
+        }
+
         grub_efi_set_text_mode(1);
 #if 0
 	dprintf("graphics mode is %d\n", eg->graphics_mode);
-- 
1.8.3.1

openSUSE Build Service is sponsored by