Skip to contentSkip to conversation

efi: gop: use screen_base directly instead of shadow buffer

PATCH Applied Ahmad Fatoum 2 participants 2 messages Apr 13 – Apr 15

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 efi: gop: use screen_base directly instead of shadow buffer

The EFI GOP protocol operates on the hardware framebuffer and calls fb_damage() to notify the driver of updates. Using fb_get_screen_base() would return the shadow buffer when enabled, causing GOP writes to go into the shadow instead of the actual framebuffer.

Do as the simplefb fixup does and use the screen_base.

Fixes d040f49ad0b3 ("efi: loader: protocol: add graphical output protocol support")
---
 efi/loader/protocols/gop.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
efi/loader/protocols/gop.c +1 -1
index 2d87acc9bcc7..5bceb3f68f0f 100644
@@ -558,7 +558,7 @@ static efi_status_t efi_gop_register(void *data)
 		pixel_information->blue_mask = 0x001f;
 	}
 	gopobj->info.pixels_per_scan_line = col;
-	gopobj->fb = fb_get_screen_base(fbi);
+	gopobj->fb = fbi->screen_base;
 	gopobj->fbi = fbi;
 
 	return EFI_SUCCESS;
Signature · 1 line
2.47.3
Applied
#1 lore raw
Quoted 8 lines · Ahmad Fatoum

The EFI GOP protocol operates on the hardware framebuffer and calls fb_damage() to notify the driver of updates. Using fb_get_screen_base() would return the shadow buffer when enabled, causing GOP writes to go into the shadow instead of the actual framebuffer.

Do as the simplefb fixup does and use the screen_base.

[...]

Applied, thanks!

[1/1] efi: gop: use screen_base directly instead of shadow buffer
https://git.pengutronix.de/cgit/barebox/commit/?id=0a0f91d20cd6 (link may not be stable)

Best regards,

Signature · 1 line
Sascha Hauer <[email protected]>