From patchwork Thu Apr 16 13:24:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 227873 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.8 required=3.0 tests=DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,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 05D47C2BB55 for ; Thu, 16 Apr 2020 13:40:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id C482B2076D for ; Thu, 16 Apr 2020 13:40:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587044434; bh=5Ty25x7/siPUKilRYHMcLb7XfHJHNLiTxo6srGlszyA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=FVd+5tL0f1Sz6bmJzUz1Gp7t+JcElyxSIAp4fcUGoIumCJuhpjEUlxR55GraixIk5 8OTefFvpzKmGQSPJk5sPC04dJQt89ZKTbW6MFyMsLZRHJto9+ytUDLtoxbvTAhqDV1 PtGjJIjpLPLSOlvqZ3+tBTm3k1qL/zx/sp77xUwA= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2898127AbgDPNkd (ORCPT ); Thu, 16 Apr 2020 09:40:33 -0400 Received: from mail.kernel.org ([198.145.29.99]:53124 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2898117AbgDPNka (ORCPT ); Thu, 16 Apr 2020 09:40:30 -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 6A8CA2076D; Thu, 16 Apr 2020 13:40:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1587044429; bh=5Ty25x7/siPUKilRYHMcLb7XfHJHNLiTxo6srGlszyA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hSTSxxJXVaeM4438vLQs9f822KEbHhGWGMNqHNjft082pO+269pi9ZAPH5mtZuKNV Y8tsIORMdZa1ukllD+le+cR6Syu4tncCgk8RvaAHOAw87xRKppPdPPWWUODejFZs1W +/qZXgS2UyobRspkOgNxr7ojKdY1J6Z0A3Zvs7S0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Hans de Goede , Daniel Vetter Subject: [PATCH 5.5 215/257] drm/vboxvideo: Add missing remove_conflicting_pci_framebuffers call, v2 Date: Thu, 16 Apr 2020 15:24:26 +0200 Message-Id: <20200416131352.888156549@linuxfoundation.org> X-Mailer: git-send-email 2.26.1 In-Reply-To: <20200416131325.891903893@linuxfoundation.org> References: <20200416131325.891903893@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Hans de Goede commit a65a97b48694d34248195eb89bf3687403261056 upstream. The vboxvideo driver is missing a call to remove conflicting framebuffers. Surprisingly, when using legacy BIOS booting this does not really cause any issues. But when using UEFI to boot the VM then plymouth will draw on both the efifb /dev/fb0 and /dev/drm/card0 (which has registered /dev/fb1 as fbdev emulation). VirtualBox will actual display the output of both devices (I guess it is showing whatever was drawn last), this causes weird artifacts because of pitch issues in the efifb when the VM window is not sized at 1024x768 (the window will resize to its last size once the vboxvideo driver loads, changing the pitch). Adding the missing drm_fb_helper_remove_conflicting_pci_framebuffers() call fixes this. Changes in v2: -Make the drm_fb_helper_remove_conflicting_pci_framebuffers() call one of the first things we do in our probe() method Cc: stable@vger.kernel.org Fixes: 2695eae1f6d3 ("drm/vboxvideo: Switch to generic fbdev emulation") Signed-off-by: Hans de Goede Reviewed-by: Daniel Vetter Link: https://patchwork.freedesktop.org/patch/msgid/20200325144310.36779-1-hdegoede@redhat.com Signed-off-by: Greg Kroah-Hartman --- drivers/gpu/drm/vboxvideo/vbox_drv.c | 4 ++++ 1 file changed, 4 insertions(+) --- a/drivers/gpu/drm/vboxvideo/vbox_drv.c +++ b/drivers/gpu/drm/vboxvideo/vbox_drv.c @@ -41,6 +41,10 @@ static int vbox_pci_probe(struct pci_dev if (!vbox_check_supported(VBE_DISPI_ID_HGSMI)) return -ENODEV; + ret = drm_fb_helper_remove_conflicting_pci_framebuffers(pdev, "vboxvideodrmfb"); + if (ret) + return ret; + vbox = kzalloc(sizeof(*vbox), GFP_KERNEL); if (!vbox) return -ENOMEM;