371309b
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
371309b
From: Peter Jones <pjones@redhat.com>
371309b
Date: Mon, 10 Sep 2018 13:01:24 -0400
371309b
Subject: [PATCH] EFI: more debug output on GOP and UGA probing.
371309b
371309b
Signed-off-by: Peter Jones <pjones@redhat.com>
371309b
---
371309b
 grub-core/video/efi_gop.c | 8 +++++++-
371309b
 grub-core/video/efi_uga.c | 4 ++--
371309b
 2 files changed, 9 insertions(+), 3 deletions(-)
371309b
371309b
diff --git a/grub-core/video/efi_gop.c b/grub-core/video/efi_gop.c
371309b
index c9e40e8d4e9..be446f8d291 100644
371309b
--- a/grub-core/video/efi_gop.c
371309b
+++ b/grub-core/video/efi_gop.c
371309b
@@ -71,7 +71,10 @@ check_protocol (void)
371309b
   handles = grub_efi_locate_handle (GRUB_EFI_BY_PROTOCOL,
371309b
 				    &graphics_output_guid, NULL, &num_handles);
371309b
   if (!handles || num_handles == 0)
371309b
-    return 0;
371309b
+    {
371309b
+      grub_dprintf ("video", "GOP: no handles\n");
371309b
+      return 0;
371309b
+    }
371309b
 
371309b
   for (i = 0; i < num_handles; i++)
371309b
     {
371309b
@@ -81,6 +84,7 @@ check_protocol (void)
371309b
       grub_video_gop_iterate (check_protocol_hook, &have_usable_mode);
371309b
       if (have_usable_mode)
371309b
 	{
371309b
+	  grub_dprintf ("video", "GOP: found usable mode\n");
371309b
 	  grub_free (handles);
371309b
 	  return 1;
371309b
 	}
371309b
@@ -89,6 +93,8 @@ check_protocol (void)
371309b
   gop = 0;
371309b
   gop_handle = 0;
371309b
 
371309b
+  grub_dprintf ("video", "GOP: no usable mode\n");
371309b
+
371309b
   return 0;
371309b
 }
371309b
 
371309b
diff --git a/grub-core/video/efi_uga.c b/grub-core/video/efi_uga.c
371309b
index 97a607c01a5..e74d6c23500 100644
371309b
--- a/grub-core/video/efi_uga.c
371309b
+++ b/grub-core/video/efi_uga.c
371309b
@@ -110,7 +110,7 @@ find_card (grub_pci_device_t dev, grub_pci_id_t pciid, void *data)
371309b
     {
371309b
       int i;
371309b
 
371309b
-      grub_dprintf ("fb", "Display controller: %d:%d.%d\nDevice id: %x\n",
371309b
+      grub_dprintf ("video", "Display controller: %d:%d.%d\nDevice id: %x\n",
371309b
 		    grub_pci_get_bus (dev), grub_pci_get_device (dev),
371309b
 		    grub_pci_get_function (dev), pciid);
371309b
       addr += 8;
371309b
@@ -140,7 +140,7 @@ find_card (grub_pci_device_t dev, grub_pci_id_t pciid, void *data)
371309b
 	  base64 <<= 32;
371309b
 	  base64 |= (old_bar1 & GRUB_PCI_ADDR_MEM_MASK);
371309b
 
371309b
-	  grub_dprintf ("fb", "%s(%d): 0x%" PRIxGRUB_UINT64_T "\n",
371309b
+	  grub_dprintf ("video", "%s(%d): 0x%" PRIxGRUB_UINT64_T "\n",
371309b
 			((old_bar1 & GRUB_PCI_ADDR_MEM_PREFETCH) ?
371309b
 			"VMEM" : "MMIO"), type == GRUB_PCI_ADDR_MEM_TYPE_64 ? i - 1 : i,
371309b
 			base64);