edid: Decode the minimum vertical rate from the display range limits

This is used as the minimum refresh rate in the variable refresh rate
range.

This value is expected to be found in the DisplayPort and eDP EDID of
every monitor that supports variable refresh rate.

It is also found in the HDMI EDID of some monitors that support
variable (FreeSync), but most likely not all of them. The rest require
parsing the AMD vendor extension which libdisplay-info doesn't
support.

No fallback is implemented for cases where libdisplay-info support is
disabled.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3576>
This commit is contained in:
Dor Askayo 2024-02-11 02:10:31 +02:00 committed by Marge Bot
parent 1080d5c20a
commit a96d524503
2 changed files with 8 additions and 0 deletions

View File

@ -44,6 +44,7 @@ decode_edid_descriptors (const struct di_edid *di_edid,
MetaEdidInfo *info)
{
enum di_edid_display_descriptor_tag desc_tag;
const struct di_edid_display_range_limits *range_limits;
desc_tag = di_edid_display_descriptor_get_tag (desc);
@ -57,6 +58,11 @@ decode_edid_descriptors (const struct di_edid *di_edid,
info->dsc_product_name =
g_strdup (di_edid_display_descriptor_get_string (desc));
break;
case DI_EDID_DISPLAY_DESCRIPTOR_RANGE_LIMITS:
range_limits = di_edid_display_descriptor_get_range_limits (desc);
g_assert (range_limits != NULL);
info->min_vert_rate_hz = range_limits->min_vert_rate_hz;
break;
default:
break;
}

View File

@ -87,6 +87,8 @@ struct _MetaEdidInfo
char *dsc_serial_number;
char *dsc_product_name;
int32_t min_vert_rate_hz;
MetaEdidColorimetry colorimetry;
MetaEdidHdrStaticMetadata hdr_static_metadata;
};