diff mbox

gfx: update the mmheight/mmwidth again after parsing EDID

Message ID 1256020307-32636-1-git-send-email-yakui.zhao@intel.com (mailing list archive)
State Rejected
Headers show

Commit Message

Zhao, Yakui Oct. 20, 2009, 6:31 a.m. UTC
None
diff mbox

Patch

diff --git a/src/drmmode_display.c b/src/drmmode_display.c
index 3417cab..626ca1d 100644
--- a/src/drmmode_display.c
+++ b/src/drmmode_display.c
@@ -783,7 +783,14 @@  static int drmmode_output_lvds_edid(xf86OutputPtr output,
 	output->MonInfo = edid_mon;
 	return 0;
 }
+static void drmmode_update_output(xf86OutputPtr output)
+{
+	drmmode_output_private_ptr drmmode_output = output->driver_private;
+	drmModeConnectorPtr koutput = drmmode_output->mode_output;
 
+	output->mm_width = koutput->mmWidth;
+	output->mm_height = koutput->mmHeight;
+}
 static DisplayModePtr
 drmmode_output_get_modes(xf86OutputPtr output)
 {
@@ -824,6 +831,7 @@  drmmode_output_get_modes(xf86OutputPtr output)
 				  xf86InterpretEDID(output->scrn->scrnIndex,
 						    NULL));
 
+	drmmode_update_output(output);
 	/* modes should already be available */
 	for (i = 0; i < koutput->count_modes; i++) {
 		Mode = xnfalloc(sizeof(DisplayModeRec));