aboutsummaryrefslogtreecommitdiff
path: root/backend/drm/util.c
diff options
context:
space:
mode:
authorTony Crisci <tony@dubstepdish.com>2017-12-08 09:22:44 -0500
committerTony Crisci <tony@dubstepdish.com>2017-12-08 09:22:44 -0500
commit35188834db182db43b407b58db167950fab05477 (patch)
tree4ce63cc7f7f01f1e7cf7fb0f6994c4306ae4cad2 /backend/drm/util.c
parente3542d879d50d6239ad4ca24b4d30520fef40a87 (diff)
parent381a646d2fbcb1b488e1551438444ac267f39138 (diff)
Merge branch 'master' into feature/xwm-selection
Diffstat (limited to 'backend/drm/util.c')
-rw-r--r--backend/drm/util.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/backend/drm/util.c b/backend/drm/util.c
index c27d7b67..25256343 100644
--- a/backend/drm/util.c
+++ b/backend/drm/util.c
@@ -93,6 +93,12 @@ void parse_edid(struct wlr_output *restrict output, size_t len, const uint8_t *d
uint16_t id = (data[8] << 8) | data[9];
snprintf(output->make, sizeof(output->make), "%s", get_manufacturer(id));
+ uint16_t model = data[10] | (data[11] << 8);
+ snprintf(output->model, sizeof(output->model), "0x%04X", model);
+
+ uint32_t serial = data[12] | (data[13] << 8) | (data[14] << 8) | (data[15] << 8);
+ snprintf(output->serial, sizeof(output->serial), "0x%08X", serial);
+
output->phys_width = ((data[68] & 0xf0) << 4) | data[66];
output->phys_height = ((data[68] & 0x0f) << 8) | data[67];