fix(uefi): parse Tag 8 framebuffer & request native 1080p FHD panel for Acer Nitro
This commit is contained in:
1 parent
243e40a339
commit
97acc141f0
2 files changed
+5
-4
No files matched your search
+3
-3
@@ -37,10 +37,10 @@ multiboot2_header:
|
||||
/* Framebuffer Request Tag (Type 5) - Requests UEFI GOP / VBE native @ 32bpp */
|
||||
.align 8
|
||||
.short 5 /* type = 5 (Framebuffer) */
|
||||
.short 0 /* flags = 0 (Required graphics mode) */
|
||||
.short 0 /* flags = 0 */
|
||||
.long 20 /* size = 20 bytes */
|
||||
.long 0 /* width = 0 (no preference / native panel) */
|
||||
.long 0 /* height = 0 (no preference / native panel) */
|
||||
.long 1920 /* width = 1920 (FHD Native for Acer Nitro V 15) */
|
||||
.long 1080 /* height = 1080 (FHD Native for Acer Nitro V 15) */
|
||||
.long 32 /* depth = 32bpp */
|
||||
|
||||
/* End tag */
|
||||
|
||||
+2
-1
@@ -60,7 +60,7 @@ void kernel_main(uint64_t magic, uint64_t addr) {
|
||||
|
||||
if (tag_type == 0 || tag_size == 0) break;
|
||||
|
||||
if (tag_type == 16) { /* Tag 16: Framebuffer tag */
|
||||
if (tag_type == 8 || tag_type == 16) { /* Tag 8: Multiboot2 Framebuffer Info Tag */
|
||||
uint64_t fb_phys = *(volatile uint64_t*)(tag_ptr + 8);
|
||||
uint32_t pitch = *(volatile uint32_t*)(tag_ptr + 16);
|
||||
uint32_t w = *(volatile uint32_t*)(tag_ptr + 20);
|
||||
@@ -70,6 +70,7 @@ void kernel_main(uint64_t magic, uint64_t addr) {
|
||||
if (fb_phys != 0 && fb_phys < (128ULL * 1024 * 1024 * 1024) && w >= 320 && h >= 200) {
|
||||
vbe_set_physical_framebuffer(fb_phys, w, h, pitch, (uint32_t)bpp);
|
||||
vbe_early_boot_splash();
|
||||
serial_puts("[AIRLYS] UEFI GOP Framebuffer bound to physical display!\n");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user