[Intel-gfx] [PATCH 3/3] Add the default modes for LVDS

yakui_zhao yakui.zhao at intel.com
Thu May 21 08:39:10 CEST 2009


In UMS mode the default modes will always be added for the LVDS output device 
regardless whether the EDID is returned.
Add the defaults mode for LVDS so that in KMS mode we can get the same modelines
as that in UMS mode . Otherwise the number of modelines in KMS will be less than
that in UMS mode.

Signed-off-by: Zhao Yakui <yakui.zhao at intel.com>
---
 src/drmmode_display.c |    5 +++++
 1 file changed, 5 insertions(+)

Index: xf86_video_intel/src/drmmode_display.c
===================================================================
--- xf86_video_intel.orig/src/drmmode_display.c	2009-05-21 11:39:45.000000000 +0800
+++ xf86_video_intel/src/drmmode_display.c	2009-05-21 11:39:52.000000000 +0800
@@ -500,6 +500,7 @@
 	drmModePropertyPtr props;
 	struct fixed_panel_lvds *p_lvds;
 	drmModeModeInfo *mode_ptr;
+	DisplayModePtr default_modes = NULL;
 
 	/* look for an EDID property */
 	for (i = 0; i < koutput->count_props; i++) {
@@ -555,6 +556,10 @@
 		if (!p_lvds->hdisplay || !p_lvds->vdisplay)
 			xf86DrvMsg(output->scrn->scrnIndex, X_ERROR,
 				"Incorrect KMS mode.\n");
+
+		/* For the LVDS device we will add the default mode. */
+		default_modes = xf86GetDefaultModes();
+		Modes = xf86ModesAdd(Modes, default_modes);
 	}
 	return Modes;
 }





More information about the Intel-gfx mailing list