From patchwork Fri Dec 14 20:30:15 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Mostafa X-Patchwork-Id: 1880341 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id 65711DF230 for ; Fri, 14 Dec 2012 20:30:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932260Ab2LNUaS (ORCPT ); Fri, 14 Dec 2012 15:30:18 -0500 Received: from mail-da0-f46.google.com ([209.85.210.46]:32911 "EHLO mail-da0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932241Ab2LNUaR (ORCPT ); Fri, 14 Dec 2012 15:30:17 -0500 Received: by mail-da0-f46.google.com with SMTP id p5so1679471dak.19 for ; Fri, 14 Dec 2012 12:30:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:subject:date:message-id:x-mailer:x-gm-message-state; bh=fXZ0UBrimMv0/94kcUWzv/pVBXW7bg288rZro0/Uj2M=; b=lSYooNN/rrA/Gn/OD5r98finpIC4rBnAA43xEEEAbxp1C3Vo5dQFyAh2lY3y4VS4aj xZcqeD91lkAVr2m6bmRJGX4vvbo2fOk0ME+1qiiT9onzxFAhjBUeqabBP4okb1+KWq0G GPeHLnrT1lJTOaG7E9OZtpenLGjQGTrP/ZwwAV8nHB+s2NMQwl67v0PRuSDL6ePx1aTD psHGhp8KsFWUj09ZEgzAj6XlAcS3L36u1xW2okp8KKdSflnvTcYmBrk8TVtapWHgMrvX KQyT4USlPDazYoTEBDDp2PDSlvopomiCAxzjyEZp8Cyya2Ef5wkqYFTjeb9ING9C9Spg aRnA== Received: by 10.66.73.201 with SMTP id n9mr18889195pav.39.1355517016809; Fri, 14 Dec 2012 12:30:16 -0800 (PST) Received: from fourier (c-67-160-231-42.hsd1.ca.comcast.net. [67.160.231.42]) by mx.google.com with ESMTPS id rk9sm3459156pbc.24.2012.12.14.12.30.15 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 14 Dec 2012 12:30:16 -0800 (PST) Received: from kamal by fourier with local (Exim 4.80) (envelope-from ) id 1Tjbtf-0001Hz-Og; Fri, 14 Dec 2012 12:30:15 -0800 From: Kamal Mostafa To: Florian Tobias Schandinat , linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] fbcon: clear the logo bitmap from the margin area Date: Fri, 14 Dec 2012 12:30:15 -0800 Message-Id: <1355517015-4926-1-git-send-email-kamal@whence.com> X-Mailer: git-send-email 1.7.10.4 X-Gm-Message-State: ALoCoQncTYSwoxedoDAneJogn1ANZwK5ggxq8/V6w7Y9z8o/567wduFDvRmiEWikcwzZ7spt4aJW Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org Explicitly clear_margins when clearing the logo, in case the font dimensions are non-integral to the framebuffer dimensions. Signed-off-by: Kamal Mostafa --- drivers/video/console/fbcon.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/video/console/fbcon.c b/drivers/video/console/fbcon.c index 8745637..b51a4bd 100644 --- a/drivers/video/console/fbcon.c +++ b/drivers/video/console/fbcon.c @@ -1236,8 +1236,16 @@ static void fbcon_clear(struct vc_data *vc, int sy, int sx, int height, if (!height || !width) return; - if (sy < vc->vc_top && vc->vc_top == logo_lines) + if (sy < vc->vc_top && vc->vc_top == logo_lines) { vc->vc_top = 0; + /* + * If the font dimensions are not an integral of the display + * dimensions then the ops->clear below won't end up clearing + * the margins. Call clear_margins here in case the logo + * bitmap stretched into the margin area. + */ + fbcon_clear_margins(vc, 0); + } /* Split blits that cross physical y_wrap boundary */