mirror of
https://github.com/brl/mutter.git
synced 2024-11-26 01:50:42 -05:00
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:
parent
1080d5c20a
commit
a96d524503
@ -44,6 +44,7 @@ decode_edid_descriptors (const struct di_edid *di_edid,
|
|||||||
MetaEdidInfo *info)
|
MetaEdidInfo *info)
|
||||||
{
|
{
|
||||||
enum di_edid_display_descriptor_tag desc_tag;
|
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);
|
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 =
|
info->dsc_product_name =
|
||||||
g_strdup (di_edid_display_descriptor_get_string (desc));
|
g_strdup (di_edid_display_descriptor_get_string (desc));
|
||||||
break;
|
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:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -87,6 +87,8 @@ struct _MetaEdidInfo
|
|||||||
char *dsc_serial_number;
|
char *dsc_serial_number;
|
||||||
char *dsc_product_name;
|
char *dsc_product_name;
|
||||||
|
|
||||||
|
int32_t min_vert_rate_hz;
|
||||||
|
|
||||||
MetaEdidColorimetry colorimetry;
|
MetaEdidColorimetry colorimetry;
|
||||||
MetaEdidHdrStaticMetadata hdr_static_metadata;
|
MetaEdidHdrStaticMetadata hdr_static_metadata;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user