summaryrefslogtreecommitdiff
path: root/tests/kms_chamelium.c
diff options
context:
space:
mode:
authorSimon Ser <simon.ser@intel.com>2019-06-19 14:33:31 +0300
committerSimon Ser <simon.ser@intel.com>2019-07-02 13:59:32 +0300
commit4009375fd4e7153f21507046f97ee145c751cef9 (patch)
tree3344bd20a455fbecc9acdf87eb9eeda6a04f1778 /tests/kms_chamelium.c
parent44af059741593587f1c500b00e7b07c5d7240c61 (diff)
lib/igt_edid: add edid_get_mfg
This returns the 3-letter manufacturer identifier of an EDID. Signed-off-by: Simon Ser <simon.ser@intel.com> Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Diffstat (limited to 'tests/kms_chamelium.c')
-rw-r--r--tests/kms_chamelium.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/tests/kms_chamelium.c b/tests/kms_chamelium.c
index 378024d8..50ac0db6 100644
--- a/tests/kms_chamelium.c
+++ b/tests/kms_chamelium.c
@@ -184,7 +184,7 @@ check_analog_bridge(data_t *data, struct chamelium_port *port)
drmModeConnector *connector = chamelium_port_get_connector(
data->chamelium, port, false);
uint64_t edid_blob_id;
- unsigned char *edid;
+ const struct edid *edid;
char edid_vendor[3];
if (chamelium_port_get_type(port) != DRM_MODE_CONNECTOR_VGA) {
@@ -198,12 +198,8 @@ check_analog_bridge(data_t *data, struct chamelium_port *port)
igt_assert(edid_blob = drmModeGetPropertyBlob(data->drm_fd,
edid_blob_id));
- edid = (unsigned char *) edid_blob->data;
-
- edid_vendor[0] = ((edid[8] & 0x7c) >> 2) + '@';
- edid_vendor[1] = (((edid[8] & 0x03) << 3) |
- ((edid[9] & 0xe0) >> 5)) + '@';
- edid_vendor[2] = (edid[9] & 0x1f) + '@';
+ edid = (const struct edid *) edid_blob->data;
+ edid_get_mfg(edid, edid_vendor);
drmModeFreePropertyBlob(edid_blob);
drmModeFreeConnector(connector);