diff mbox

drm/i915: Fix unset margins flag in drm_mode_parse_command_line_for_connector

Message ID alpine.DEB.1.10.1105041714320.8641@cnc.isely.net (mailing list archive)
State New, archived
Headers show

Commit Message

Mike Isely May 4, 2011, 10:18 p.m. UTC
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@pobox.com>
---
 drivers/gpu/drm/drm_modes.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

Comments

Robert Lowery May 5, 2011, 2:40 a.m. UTC | #1
>
> 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.

Is this to fix Bug 25430 - [GM965 KMS] TV margins ignored in xorg.conf
(https://bugs.freedesktop.org/show_bug.cgi?id=25430) or am I completely
off base here?


> Signed-off-by: Mike Isely <isely@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
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-gfx
>
diff mbox

Patch

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;