From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,T_DKIMWL_WL_HIGH,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2E09EC282DD for ; Thu, 23 May 2019 19:09:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 02DA2217D7 for ; Thu, 23 May 2019 19:09:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558638560; bh=vrLRgix2Gpnic3HQAbtiht8hnM0L5AnoI/kek7a8G74=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=rqmq0QoQ1aF98SWpdXo3QJYTF7U2W+PsY+Fb1lWlxV/CDPJSJ58mLnJVnPkfsZieA iNmpqORRf2W0KdyOUSRxh2DDvRnHENRMnS/BCByfqhg/UlKOMGLRVv9JbheyNieonJ zTVNen0QVbfXu+0G6KbufNE/ycOX0YavbevOms2k= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732128AbfEWTJT (ORCPT ); Thu, 23 May 2019 15:09:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:42320 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731604AbfEWTJS (ORCPT ); Thu, 23 May 2019 15:09:18 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id F187721851; Thu, 23 May 2019 19:09:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558638557; bh=vrLRgix2Gpnic3HQAbtiht8hnM0L5AnoI/kek7a8G74=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TUEZzc+iae5lIbBK1A2P+CHQyVmTg0U6lLtthvmwnw4OeBBYLk3gtViz5Rj72Orl4 3o4s2IG5AIdGD/m23b+fI4q5Hg/d1k5rwK2JGoRnV88aEoWzB844LAA/UnO5CA/gJ7 SYk+IcfwUUKwHn0KfxeshiQDsbxqCBLtNIPOJOlU= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Yifeng Li , Sudip Mukherjee , Teddy Wang , Bartlomiej Zolnierkiewicz Subject: [PATCH 4.9 33/53] fbdev: sm712fb: fix boot screen glitch when sm712fb replaces VGA Date: Thu, 23 May 2019 21:05:57 +0200 Message-Id: <20190523181716.096652285@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190523181710.981455400@linuxfoundation.org> References: <20190523181710.981455400@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Yifeng Li commit ec1587d5073f29820e358f3a383850d61601d981 upstream. When the machine is booted in VGA mode, loading sm712fb would cause a glitch of random pixels shown on the screen. To prevent it from happening, we first clear the entire framebuffer, and we also need to stop calling smtcfb_setmode() during initialization, the fbdev layer will call it for us later when it's ready. Signed-off-by: Yifeng Li Tested-by: Sudip Mukherjee Cc: Teddy Wang Cc: # v4.4+ Signed-off-by: Bartlomiej Zolnierkiewicz Signed-off-by: Greg Kroah-Hartman --- drivers/video/fbdev/sm712fb.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) --- a/drivers/video/fbdev/sm712fb.c +++ b/drivers/video/fbdev/sm712fb.c @@ -1492,7 +1492,11 @@ static int smtcfb_pci_probe(struct pci_d if (err) goto failed; - smtcfb_setmode(sfb); + /* + * The screen would be temporarily garbled when sm712fb takes over + * vesafb or VGA text mode. Zero the framebuffer. + */ + memset_io(sfb->lfb, 0, sfb->fb->fix.smem_len); err = register_framebuffer(info); if (err < 0)