From 00f6af2c8ec899258ffab60dc2d9d80c4d9daec8 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 4 Sep 2010 18:45:11 +0100 Subject: [PATCH] display: Set MONITOR_EDID_COMPLETE_RAWDATA for large EDIDs Quoting Adam Jackson: "But the X driver looks like it never sets MONITOR_EDID_COMPLETE_RAWDATA, which means the X core doesn't know that any sections beyond the first are present, so it won't ever hand back more than 128 bytes to clients. Boo." This patch is based on his. Signed-off-by: Chris Wilson --- src/intel_display.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/intel_display.c b/src/intel_display.c index 4da27906..b3c8a7ce 100644 --- a/src/intel_display.c +++ b/src/intel_display.c @@ -708,6 +708,7 @@ intel_output_attach_edid(xf86OutputPtr output) drmModeConnectorPtr koutput = intel_output->mode_output; struct intel_mode *mode = intel_output->mode; drmModePropertyBlobPtr edid_blob = NULL; + xf86MonPtr mon = NULL; int i; /* look for an EDID property */ @@ -733,15 +734,16 @@ intel_output_attach_edid(xf86OutputPtr output) } if (edid_blob) { - xf86OutputSetEDID(output, - xf86InterpretEDID(output->scrn->scrnIndex, - edid_blob->data)); + mon = xf86InterpretEDID(output->scrn->scrnIndex, + edid_blob->data); + + if (mon && edid_blob->length > 128) + mon->flags |= MONITOR_EDID_COMPLETE_RAWDATA; + drmModeFreePropertyBlob(edid_blob); - } else { - xf86OutputSetEDID(output, - xf86InterpretEDID(output->scrn->scrnIndex, - NULL)); } + + xf86OutputSetEDID(output, mon); } static DisplayModePtr