Received: by 2002:ac0:950e:0:0:0:0:0 with SMTP id f14csp764397imc; Sat, 16 Mar 2019 15:26:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqwI9iSCarqKKE/vs4R/luR6fGmCxgHHklvpPKhgSqrvde87lujNlkWe77p/iVJtJVobFwjl X-Received: by 2002:a17:902:8348:: with SMTP id z8mr12082083pln.151.1552775205345; Sat, 16 Mar 2019 15:26:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552775205; cv=none; d=google.com; s=arc-20160816; b=FSkF5ZKemT/yZnveZQl4Y5X+BizRL7LYgdNr7PF3Lsu/aQeI0sC61tdCef1ka6hLUQ 1lEdJxwHAplDEEN6qwjiK9irovwNebO/oLU0BV97TZOazf4XMLm8ca3raayE/z5i8hnX VDf5dkvKzj8dxkPjUWB055/SAeXTH2gRDMLyOKEa7B7uEE84kttpKGf/cMsQOjsGCFg0 BOa7l91/0SGQwKpNBERmT2mE8BLGu4UFJXB23SxGWDSoeux1eMMYna9+wmVIP25QiXi9 GJJbVNkTFkgdwxGF+hVVmsbbF7AJhkgamzxdnhooXyMrn7tQNnujLwAWRU5n6odv0XDV 2+JQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=P4oDCpiFS6nJck3fCh8cxK/DsooY0eopO1pAKrf142A=; b=sAa1jbK+5k0doRvAYiwKGu7cGQoXcXt0cw55GdbZa8fr5X1YO0QKiqwao1vLbfyUI6 z5LIfI6z/0f0T6CcWy70ojCPLI1G0ZZirt6pYM3iYJg5AwLwa6Lp8OvfmFdGZ/xQ4r7H 7lVgU6pojnQcaX5ebAh4ot8V02RubuD9Rf7WJiWN2ARmpQvubxzJUw+fjNOX/iVkyEZM OaslhtfQRjVVq0PqM6QAi7lwkhqr8HeiQ7cWdfF3rI854t8q/RAgriXbByPLx2yiVHbq 5diyzI4T/efY8sqmgsZsw60FuYuYlESJheht3BxJ8gLSZY9V6luRWZULZSIlLg8sNc0R jduw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@tomli.me header.s=1490979754 header.b=lSlmxo1F; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=tomli.me Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 193si5195226pgc.365.2019.03.16.15.26.30; Sat, 16 Mar 2019 15:26:45 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@tomli.me header.s=1490979754 header.b=lSlmxo1F; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=tomli.me Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727251AbfCPWZj (ORCPT + 99 others); Sat, 16 Mar 2019 18:25:39 -0400 Received: from tomli.me ([153.92.126.73]:56126 "EHLO tomli.me" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726418AbfCPWZh (ORCPT ); Sat, 16 Mar 2019 18:25:37 -0400 Received: from tomli.me (localhost [127.0.0.1]) by tomli.me (OpenSMTPD) with ESMTP id c24c834c; Sat, 16 Mar 2019 22:25:34 +0000 (UTC) X-HELO: localhost.lan Authentication-Results: tomli.me; auth=pass (login) smtp.auth=tomli Received: from Unknown (HELO localhost.lan) (2402:f000:1:1501:200:5efe:6fc7:8b2c) by tomli.me (qpsmtpd/0.95) with ESMTPSA (DHE-RSA-CHACHA20-POLY1305 encrypted); Sat, 16 Mar 2019 22:25:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed; d=tomli.me; h=from:to:cc:subject:date:message-id:in-reply-to:references:mime-version:content-transfer-encoding; s=1490979754; bh=a+rMub2vZtwc96/4+FBQHgZRTvW7Soc2ak2NjAW/PSs=; b=lSlmxo1FqbI+njadjF/NB8Tbtd3LWiIE+F8ldjDURTNZyAX/DrXPmCHSJuP438FCAJvQyhJBWbkUWr8okxWghwqs9vHz1AT0lNbovLdSR54IjH5HghofXSL+E4EDTiHueGpqczstxTtSkbgOmQY+ruwZUnPIvfCiTdE/m3PXvb7zlJthzHQaNJhUPWaXWiyDWpaSn1EDNrulFqFOCdSPNxq4A/WG4E3JU+yC4jR/8Gi3ga0fJgaqXe3e/9clB+JWyVslPsLL4+XZFngkLJyo3me6nXTgurZYp7COpddaAyH77GsdxCI8AGpxeYljEW+h5yCNgvioPHJOQP12ydo5Vw== From: Yifeng Li To: Sudip Mukherjee , Teddy Wang Cc: Bartlomiej Zolnierkiewicz , linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Yifeng Li , stable@vger.kernel.org Subject: [PATCH 4/8] fbdev: sm712fb: fix boot screen glitch when sm712fb replaces VGA. Date: Sun, 17 Mar 2019 06:25:00 +0800 Message-Id: <20190316222504.27170-5-tomli@tomli.me> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190316222504.27170-1-tomli@tomli.me> References: <20190316222504.27170-1-tomli@tomli.me> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Cc: stable@vger.kernel.org # v4.4+ --- drivers/video/fbdev/sm712fb.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/video/fbdev/sm712fb.c b/drivers/video/fbdev/sm712fb.c index 1a3d232c2916..e8149f0f47d5 100644 --- a/drivers/video/fbdev/sm712fb.c +++ b/drivers/video/fbdev/sm712fb.c @@ -1493,7 +1493,11 @@ static int smtcfb_pci_probe(struct pci_dev *pdev, 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) -- 2.20.1