From 9fa9428decb484e905070bc87394e9a3d36b7124 Mon Sep 17 00:00:00 2001 From: Chris Ruffin Date: Tue, 14 Jul 2026 12:55:44 -0400 Subject: [PATCH] MsGraphicsPkg: use GOP from ConsoleOut When multiple GOP protocol instances are installed in the system, different components of MsGraphicsPkg can connect to different GOP instances leading to inconsistent graphics rendering or failures. Always use the one that is connected to ConsoleOut. --- MsGraphicsPkg/Library/SimpleUIToolKit/SimpleUIToolKit.c | 4 ++-- MsGraphicsPkg/SimpleWindowManagerDxe/WindowManager.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/MsGraphicsPkg/Library/SimpleUIToolKit/SimpleUIToolKit.c b/MsGraphicsPkg/Library/SimpleUIToolKit/SimpleUIToolKit.c index 9fcd3ffc44..843b3682f2 100644 --- a/MsGraphicsPkg/Library/SimpleUIToolKit/SimpleUIToolKit.c +++ b/MsGraphicsPkg/Library/SimpleUIToolKit/SimpleUIToolKit.c @@ -42,9 +42,9 @@ InitializeUIToolKit ( // Determine if the GOP is available. // - Status = gBS->LocateProtocol ( + Status = gBS->HandleProtocol ( + gST->ConsoleOutHandle, &gEfiGraphicsOutputProtocolGuid, - NULL, (VOID **)&mUITGop ); diff --git a/MsGraphicsPkg/SimpleWindowManagerDxe/WindowManager.c b/MsGraphicsPkg/SimpleWindowManagerDxe/WindowManager.c index 5603306524..f241013a7b 100644 --- a/MsGraphicsPkg/SimpleWindowManagerDxe/WindowManager.c +++ b/MsGraphicsPkg/SimpleWindowManagerDxe/WindowManager.c @@ -1507,9 +1507,9 @@ GopRegisteredCallback ( // Determine if the Graphics Output Protocol is available on the Console Out handle. // - Status = gBS->LocateProtocol ( + Status = gBS->HandleProtocol ( + gST->ConsoleOutHandle, &gEfiGraphicsOutputProtocolGuid, - NULL, (VOID **)&mGop );