edid: Fix up libdisplay-info support

* The code did not compile before.
* Change the MetaEdidInfo struct to be more friendly to libdisplay-info
* Change to nit based luminance from encoded values

Closes: https://gitlab.gnome.org/GNOME/mutter/-/issues/2896
Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3116>
This commit is contained in:
Sebastian Wick
2023-07-11 16:27:55 +02:00
parent 4749c073eb
commit d382d55eae
4 changed files with 102 additions and 46 deletions

View File

@ -69,7 +69,7 @@ struct _MetaEdidHdrStaticMetadata
struct _MetaEdidInfo
{
char manufacturer_code[4];
char *manufacturer_code;
int product_code;
unsigned int serial_number;
@ -85,9 +85,8 @@ struct _MetaEdidInfo
double white_y;
/* Optional product description */
char dsc_serial_number[14];
char dsc_product_name[14];
char dsc_string[14]; /* Unspecified ASCII data */
char *dsc_serial_number;
char *dsc_product_name;
MetaEdidColorimetry colorimetry;
MetaEdidHdrStaticMetadata hdr_static_metadata;