From patchwork Wed May 4 22:18:13 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Isely X-Patchwork-Id: 755482 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by demeter1.kernel.org (8.14.4/8.14.3) with ESMTP id p44MJZSG008435 for ; Wed, 4 May 2011 22:19:56 GMT Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BA39E9F6D3 for ; Wed, 4 May 2011 15:19:35 -0700 (PDT) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from cnc.isely.net (cnc.isely.net [75.149.91.89]) by gabe.freedesktop.org (Postfix) with ESMTP id 302A89F64B for ; Wed, 4 May 2011 15:18:13 -0700 (PDT) Received: from cnc.isely.net (cnc.isely.net [::ffff:192.168.23.2]) (IDENT: isely, TLS: TLSv1/SSLv3,256bits,AES256-SHA) by cnc.isely.net with esmtp; Wed, 04 May 2011 17:18:13 -0500 id 000000000013202E.000000004DC1D0A5.000040E6 Date: Wed, 4 May 2011 17:18:13 -0500 (CDT) From: Mike Isely To: Chris Wilson In-Reply-To: Message-ID: References: <1303022613-18414-1-git-send-email-chris@chris-wilson.co.uk> <1303022613-18414-2-git-send-email-chris@chris-wilson.co.uk> User-Agent: Alpine 1.10 (DEB 962 2008-03-14) Mime-Version: 1.0 Cc: Dave Airlied , intel-gfx@lists.freedesktop.org, Mike Isely at pobox Subject: [Intel-gfx] [PATCH] drm/i915: Fix unset margins flag in drm_mode_parse_command_line_for_connector X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.11 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org Errors-To: intel-gfx-bounces+patchwork-intel-gfx=patchwork.kernel.org@lists.freedesktop.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter1.kernel.org [140.211.167.41]); Wed, 04 May 2011 22:19:56 +0000 (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 --- 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;