backends: Make KMS EDID information equal to X11's
EDID parsing has been refactored to a common meta_output_parse_edid() function, which ensures the extracted information is the same on both KMS and X11 backend, so it can be used consistently on eg. settings values. https://bugzilla.gnome.org/show_bug.cgi?id=742882
This commit is contained in:
@ -39,7 +39,6 @@
|
||||
|
||||
#include <meta/main.h>
|
||||
#include <meta/errors.h>
|
||||
#include "edid.h"
|
||||
|
||||
#include <gudev/gudev.h>
|
||||
|
||||
@ -515,27 +514,9 @@ meta_monitor_manager_kms_read_current (MetaMonitorManager *manager)
|
||||
edid = read_output_edid (manager_kms, meta_output);
|
||||
if (edid)
|
||||
{
|
||||
MonitorInfo *parsed_edid;
|
||||
gsize len;
|
||||
|
||||
parsed_edid = decode_edid (g_bytes_get_data (edid, &len));
|
||||
if (parsed_edid)
|
||||
{
|
||||
meta_output->vendor = g_strndup (parsed_edid->manufacturer_code, 4);
|
||||
meta_output->product = g_strndup (parsed_edid->dsc_product_name, 14);
|
||||
meta_output->serial = g_strndup (parsed_edid->dsc_serial_number, 14);
|
||||
|
||||
g_free (parsed_edid);
|
||||
}
|
||||
|
||||
meta_output_parse_edid (meta_output, edid);
|
||||
g_bytes_unref (edid);
|
||||
}
|
||||
if (!meta_output->vendor)
|
||||
{
|
||||
meta_output->vendor = g_strdup ("unknown");
|
||||
meta_output->product = g_strdup ("unknown");
|
||||
meta_output->serial = g_strdup ("unknown");
|
||||
}
|
||||
|
||||
/* MetaConnectorType matches DRM's connector types */
|
||||
meta_output->connector_type = (MetaConnectorType) connector->connector_type;
|
||||
|
Reference in New Issue
Block a user