From patchwork Sat Oct 22 07:23:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 7570 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4242:0:0:0:0:0 with SMTP id s2csp1106103wrr; Sat, 22 Oct 2022 01:36:57 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6hXUsRd0tOQ0/eMeMywdyklbJUIDBAwm3WGq7jAql2lssB843mdXPd9yq9BmpZluXoNEci X-Received: by 2002:a17:903:2410:b0:17a:b32:dbec with SMTP id e16-20020a170903241000b0017a0b32dbecmr23165939plo.163.1666427816938; Sat, 22 Oct 2022 01:36:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666427816; cv=none; d=google.com; s=arc-20160816; b=mRe7u6bJw5xv8SHha1AV7fQusgF8vODqh8/akKVzRq/iU+7YRJ476fwPcZxgOQRnZY lleHMHg6gscKiCkECEMqFMJ609MKHDElApnaiWOmxkub3Hv12x8T3IpOU7YWDgpJHfKZ xwkDaVRFCZhhHrcSSALsXRVyNTe7T6pRv9LpP1jOa8I127vwbKXNGBuMYaoXc3YqU9+v REBPz6CMT4TAoz0NKUpdnLsiF00RBoTpbSUj09buU+fYlZSRrfZ0Jc4WPh84y1vGAHet gzy437e2ENB3TnY29OPZmDJWoaqOB20Ehg1IzAr97Ndlvl7skduvLPXvzbyycoKrul9T E3WQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=qu1cWWOpj3G0r4nNHcgZZKGc5gNhe43Ypt9aGttVtpY=; b=vz1HSzcExSAl9vduktp7p8ny9BaX4TRqVjZI66eWDPqZuUtTvBj1Aru8P/SHsl/Z1W 5+b0CSPnH+I74idBpM2VAlhyQJ+NvTZ284h4EoZg0BogDPJ+lqUzXtvrkfwSbpVaETH1 Bt/8lDVhJVfdLFXGKILMmvVXToa8pZK8lAUspMzdR8ByJOgpW/C+HE9B0+5DdgIFLqWA IfvPXt4GghOxgSeRjk3k0xJUnGeXL+7Lj51y0Er3QDvtVXKa6w/YlVo13iWeDqUtdK0u 7BMDhNTtXHu59USrjl/5hOaXk9RhQyAgB8ak5hNv0AhS/z85UQZAkusinb5UwoQZnqtU Eivw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0U6YxJoG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t191-20020a6381c8000000b0043abd68507esi25612410pgd.392.2022.10.22.01.36.41; Sat, 22 Oct 2022 01:36:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=0U6YxJoG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233951AbiJVIb4 (ORCPT + 99 others); Sat, 22 Oct 2022 04:31:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233975AbiJVI3D (ORCPT ); Sat, 22 Oct 2022 04:29:03 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF4452E1B81; Sat, 22 Oct 2022 01:01:23 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 54931B82E22; Sat, 22 Oct 2022 07:50:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AA0D3C433C1; Sat, 22 Oct 2022 07:50:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1666425026; bh=ZW56IyUsCRsziNQEfsWwDsPjl+wsRj6O0UcTVdXwLao=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0U6YxJoGlw648W7/dcFwx4xiTjhrTn1TcMVdPQN/UKIj/9DvXfu1X9DY1ygc1r8Wx Do1zM0io553BIpPX9Eb/uKDXBf1c2nxFXGA3taLktTqZEsyFK8ZPzqLrqfZ99BklEZ auRf78XJt/UkfurhSy+8hstAm7/9Y3XgEhcH2n6Y= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Gerd Hoffmann , Thomas Zimmermann , Sasha Levin Subject: [PATCH 5.19 324/717] drm/bochs: fix blanking Date: Sat, 22 Oct 2022 09:23:23 +0200 Message-Id: <20221022072508.871256734@linuxfoundation.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221022072415.034382448@linuxfoundation.org> References: <20221022072415.034382448@linuxfoundation.org> User-Agent: quilt/0.67 MIME-Version: 1.0 X-Spam-Status: No, score=-7.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747376214481922527?= X-GMAIL-MSGID: =?utf-8?q?1747376214481922527?= From: Gerd Hoffmann [ Upstream commit e740ceb53e4579a7a4063712cebecac3c343b189 ] VGA_IS1_RC is the color mode register (VGA_IS1_RM the one for monochrome mode, note C vs. M at the end). So when using VGA_IS1_RC make sure the vga device is actually in color mode and set the corresponding bit in the misc register. Reproducible when booting VMs in UEFI mode with some edk2 versions (edk2 fix is on the way too). Doesn't happen in BIOS mode because in that case the vgabios already flips the bit. Fixes: 250e743915d4 ("drm/bochs: Add screen blanking support") Signed-off-by: Gerd Hoffmann Acked-by: Thomas Zimmermann Link: http://patchwork.freedesktop.org/patch/msgid/20220906142957.2763577-1-kraxel@redhat.com Signed-off-by: Sasha Levin --- drivers/gpu/drm/tiny/bochs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/tiny/bochs.c b/drivers/gpu/drm/tiny/bochs.c index ed971c8bb446..0cedb6f6f559 100644 --- a/drivers/gpu/drm/tiny/bochs.c +++ b/drivers/gpu/drm/tiny/bochs.c @@ -306,6 +306,8 @@ static void bochs_hw_fini(struct drm_device *dev) static void bochs_hw_blank(struct bochs_device *bochs, bool blank) { DRM_DEBUG_DRIVER("hw_blank %d\n", blank); + /* enable color bit (so VGA_IS1_RC access works) */ + bochs_vga_writeb(bochs, VGA_MIS_W, VGA_MIS_COLOR); /* discard ar_flip_flop */ (void)bochs_vga_readb(bochs, VGA_IS1_RC); /* blank or unblank; we need only update index and set 0x20 */