From 09a2a56120e50a155e885335a534a907385be626 Mon Sep 17 00:00:00 2001 From: Armando Ferreira Date: Mon, 11 May 2026 13:04:57 -0700 Subject: [PATCH 1/2] MsGraphicsPkg/SimpleWindowManagerDxe: Fix SWM init retry when SRE is not ready GopRegisteredCallback sets mGop when it finds GOP but exits early if SRE is not available yet. Because mGop remains set, the callback never retries on subsequent GOP notifications, so SWM never initializes. Reset mGop to NULL when SRE is not found so the callback can retry. --- MsGraphicsPkg/SimpleWindowManagerDxe/WindowManager.c | 1 + 1 file changed, 1 insertion(+) diff --git a/MsGraphicsPkg/SimpleWindowManagerDxe/WindowManager.c b/MsGraphicsPkg/SimpleWindowManagerDxe/WindowManager.c index 84fbabd909..ab31822bd1 100644 --- a/MsGraphicsPkg/SimpleWindowManagerDxe/WindowManager.c +++ b/MsGraphicsPkg/SimpleWindowManagerDxe/WindowManager.c @@ -1531,6 +1531,7 @@ GopRegisteredCallback ( ); if (EFI_ERROR (Status)) { + mGop = NULL; goto Exit; } From 3a492efbd4a6b2bdf317cb4ee614a43facce45de Mon Sep 17 00:00:00 2001 From: Armando Ferreira Date: Tue, 12 May 2026 08:58:02 -0700 Subject: [PATCH 2/2] Address PR Comments --- MsGraphicsPkg/SimpleWindowManagerDxe/WindowManager.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/MsGraphicsPkg/SimpleWindowManagerDxe/WindowManager.c b/MsGraphicsPkg/SimpleWindowManagerDxe/WindowManager.c index ab31822bd1..5603306524 100644 --- a/MsGraphicsPkg/SimpleWindowManagerDxe/WindowManager.c +++ b/MsGraphicsPkg/SimpleWindowManagerDxe/WindowManager.c @@ -1518,9 +1518,6 @@ GopRegisteredCallback ( goto Exit; } - mAbsPointerMode.AbsoluteMaxX = mGop->Mode->Info->HorizontalResolution; - mAbsPointerMode.AbsoluteMaxY = mGop->Mode->Info->VerticalResolution; - // Determine if the Simple Rendering Engine Protocol is available on the same Console Out handle. The // Rendering Engine driver provides both Graphics Output and Rendering Engine protocols. // @@ -1535,6 +1532,9 @@ GopRegisteredCallback ( goto Exit; } + mAbsPointerMode.AbsoluteMaxX = mGop->Mode->Info->HorizontalResolution; + mAbsPointerMode.AbsoluteMaxY = mGop->Mode->Info->VerticalResolution; + // Now that we found the Graphics Output Protocol, complete the second half of driver initialization. // Status = DriverInitStage2 (mImageHandle);