[Intel-gfx] [PATCH] drm/i915: Fix unset margins flag in drm_mode_parse_command_line_for_connector

Mike Isely isely at isely.net
Thu May 5 00:18:13 CEST 2011


The drm function which parses a mode into a standard mode line is
computing the "margins" flag but then failing to copy that parameter
into the parsed structure output.  This seems to leave the field in a
random state, which unfortunately influences the results when the
parsed results are then subsequently used to calculate a mode line.
The fix here is obvious: ensure the the margins flag is properly
initialized in the result structure at the end of the parse operation.

Signed-off-by: Mike Isely <isely at pobox.com>
---
 drivers/gpu/drm/drm_modes.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/drm_modes.c b/drivers/gpu/drm/drm_modes.c
index 207b7eb..3697c56 100644
--- a/drivers/gpu/drm/drm_modes.c
+++ b/drivers/gpu/drm/drm_modes.c
@@ -1094,6 +1094,7 @@ done:
 		mode->bpp_specified = true;
 		mode->bpp = bpp;
 	}
+	mode->margins = margins ? true : false;
 	mode->rb = rb ? true : false;
 	mode->cvt = cvt  ? true : false;
 	mode->interlace = interlace ? true : false;
-- 
1.7.2.5


-- 

Mike Isely
isely @ isely (dot) net
PGP: 03 54 43 4D 75 E5 CC 92 71 16 01 E2 B5 F5 C1 E8



More information about the Intel-gfx mailing list