limine: Add EDID to framebuffer response

This commit is contained in:
mintsuki 2022-03-18 02:45:37 +01:00
parent 9f44fe6c4e
commit 5b6c4ffc34
3 changed files with 10 additions and 0 deletions

View File

@ -66,6 +66,8 @@ struct limine_framebuffer {
uint8_t blue_mask_size;
uint8_t blue_mask_shift;
uint8_t unused;
uint64_t edid_size;
LIMINE_PTR(void *) edid;
uint8_t reserved[256];
};

View File

@ -391,6 +391,12 @@ FEAT_START
framebuffer_response->fbs = reported_addr(fbp);
framebuffer_response->fbs_count = 1;
struct edid_info_struct *edid_info = get_edid_info();
if (edid_info != NULL) {
fbp->edid_size = sizeof(struct edid_info_struct);
fbp->edid = reported_addr(edid_info);
}
fbp->memory_model = LIMINE_FRAMEBUFFER_RGB;
fbp->address = reported_addr((void *)(uintptr_t)fb.framebuffer_addr);
fbp->width = fb.framebuffer_width;

View File

@ -153,6 +153,8 @@ FEAT_START
e9_printf("Green mask shift: %d", fb->green_mask_shift);
e9_printf("Blue mask size: %d", fb->blue_mask_size);
e9_printf("Blue mask shift: %d", fb->blue_mask_shift);
e9_printf("EDID size: %d", fb->edid_size);
e9_printf("EDID at: %x", fb->edid);
}
FEAT_END