framebuffer: report display EDID data

This allows to see the display in Screen preferences, and know its DPI
and physical size (as much as EDID data can be trusted). This
information could be used to compute the default font size, for example,
so it's important that all drivers provide it whenever possible.

Change-Id: Ic3d04e53cf5fcb24e22d35661d2b364a257947da
Reviewed-on: https://review.haiku-os.org/c/haiku/+/6576
Tested-by: Commit checker robot <[email protected]>
Reviewed-by: Adrien Destugues <[email protected]>
This commit is contained in:
PulkoMandy
2023-06-11 11:23:01 +00:00
committed by Adrien Destugues
parent 29f8da76d7
commit 37e1b12911
8 changed files with 84 additions and 7 deletions
+2 -2
View File
@@ -150,10 +150,10 @@ typedef struct displayid_info {
} displayid_info;
// EDID data block
typedef struct edid1_info {
typedef struct edid1_info {
edid1_vendor vendor;
edid1_version version;
edid1_display display;
edid1_display display;
edid1_established_timing established_timing;
edid1_std_timing std_timing[EDID1_NUM_STD_TIMING];
@@ -0,0 +1,31 @@
/*
* Copyright 2023 Adrien Destugues <[email protected]>
* Distributed under terms of the MIT license.
*/
#pragma once
#include <efi/types.h>
#define EFI_EDID_DISCOVERED_PROTOCOL_GUID \
{0x1c0c34f6, 0xd380, 0x41fa, {0xa0, 0x49, 0x8a, 0xd0, 0x6c, 0x1a, 0x66, 0xaa}}
#define EFI_EDID_ACTIVE_PROTOCOL_GUID \
{0xbd8c1056, 0x9f36, 0x44ec, {0x92, 0xa8, 0xa6, 0x33, 0x7f, 0x81, 0x79, 0x86}}
#define EFI_EDID_OVERRIDE_PROTOCOL_GUID \
{0x48ecb431, 0xfb72, 0x45c0, {0xa9, 0x22, 0xf4, 0x58, 0xfe, 0x04, 0x0b, 0xd5}}
struct efi_edid_protocol {
uint32_t SizeOfEdid;
uint8_t* Edid;
};
struct efi_edid_override_protocol {
efi_status (*GetEdid) (struct efi_edid_override_protocol* self, efi_handle* child,
uint32_t* attributes, size_t* edidSize, uint8_t** edid) EFIAPI;
};