From patchwork Sat Sep 1 14:08:49 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= X-Patchwork-Id: 10584793 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 7D48013AC for ; Sat, 1 Sep 2018 14:13:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 848E72A3BD for ; Sat, 1 Sep 2018 14:13:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 771CE2A3D1; Sat, 1 Sep 2018 14:13:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.1 required=2.0 tests=BAYES_00,DKIM_ADSP_ALL, DKIM_SIGNED,DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 0087B2A3BD for ; Sat, 1 Sep 2018 14:13:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:To:MIME-Version:Subject:From:References :In-Reply-To:Message-Id:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=FIaczziHRr/LYoOzDjwWHQssxp1pszcDOsHkiMjoUFs=; b=Gm5ltrHyoQ83rr 9JPGls75ti8PLiAQb6GoxjUnF5SI1ezIR9r2ZNVAZP8SKs4D9duEsnZ42QxmI9u2DrtrZcmR73iTz ElL5gbm6VyR50BQrHwBvdon8pN6A7GMAW/IrOjCneuuA0XETQNdwjm0Tnf22id3KjYVnWYs7mH6XU OIYdXxUX/5RIseD97CIHyTm4/7raCaajiUPw/0Vz3JruWGNFJPSD+MjQQZroFaPUNaUCcsGC7Fvwf X6R3rr2TgdxiSpxRytWQcc4NBFSc9/aZQimmXqlGsNLjdwFqnTR1qCQSqtYYnVPCjXlpBDWAYDBCL 54QCM1yz8IggOvkhloIA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fw6eN-0003uU-SD; Sat, 01 Sep 2018 14:13:19 +0000 Received: from rere.qmqm.pl ([91.227.64.183]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fw6aL-0000h6-95 for linux-arm-kernel@lists.infradead.org; Sat, 01 Sep 2018 14:09:11 +0000 Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 422dNq2fVvzrb; Sat, 1 Sep 2018 16:08:11 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1535810891; bh=gmzq5OR1+6P/pJOhCSwW9f0H/rCztuuw8Vr9j0ETzP4=; h=Date:In-Reply-To:References:From:Subject:To:Cc:Cc:From; b=ByksFRBMkDZTeBwRu3qdAzzuZt8JQRaGQ3bKTFH8q7y8IfdD2zU5p1/lUBOUmtpuB ppQGxYBJhgpTttquxWGyu6IUHJLFY5iaI7km5CUHAIiZ+Q3Nb+lXs4TEMtpCfv+iuO QGYnWToq1S80W/UWcn08FdN7VQX0qOxXOSmjGMOOwztx7VagwjvxCLb3fUvCAdIDsj FHQkqGC15DfbP4f3b+wn1c6Io4GP81T7XJQiRxY1PVnOwtsDGHWxkXNn5UrcOD7U11 u5b2uQwGZhldM4m3HkXsOH10rGSupNn3fPp994omu7eFheLr7R2yVESCimIrD9loSg iuzoiyHwzTj5Q== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.100.0 at mail Date: Sat, 01 Sep 2018 16:08:49 +0200 Message-Id: <25f89daf6217da98a52d41c4ad62a78272bb0cf6.1535810304.git.mirq-linux@rere.qmqm.pl> In-Reply-To: References: From: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= Subject: [PATCH v3 10/13] drm/virtio: use simpler remove_conflicting_pci_framebuffers() MIME-Version: 1.0 To: dri-devel@lists.freedesktop.org X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180901_070909_601967_2FA757D9 X-CRM114-Status: UNSURE ( 9.22 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-fbdev@vger.kernel.org, linux-tegra@vger.kernel.org, Bartlomiej Zolnierkiewicz , David Airlie , amd-gfx@lists.freedesktop.org, virtualization@lists.linux-foundation.org, Eric Anholt , Thierry Reding , Gerd Hoffmann , Alex Deucher , Dave Airlie , Maxime Ripard , Jonathan Hunter , linux-arm-kernel@lists.infradead.org Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Michał Mirosław Acked-by: Daniel Vetter --- drivers/gpu/drm/virtio/virtgpu_drm_bus.c | 24 +++--------------------- 1 file changed, 3 insertions(+), 21 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_drm_bus.c b/drivers/gpu/drm/virtio/virtgpu_drm_bus.c index 7df8d0c9026a..115ed546ca4e 100644 --- a/drivers/gpu/drm/virtio/virtgpu_drm_bus.c +++ b/drivers/gpu/drm/virtio/virtgpu_drm_bus.c @@ -28,26 +28,6 @@ #include "virtgpu_drv.h" -static void virtio_pci_kick_out_firmware_fb(struct pci_dev *pci_dev) -{ - struct apertures_struct *ap; - bool primary; - - ap = alloc_apertures(1); - if (!ap) - return; - - ap->ranges[0].base = pci_resource_start(pci_dev, 0); - ap->ranges[0].size = pci_resource_len(pci_dev, 0); - - primary = pci_dev->resource[PCI_ROM_RESOURCE].flags - & IORESOURCE_ROM_SHADOW; - - drm_fb_helper_remove_conflicting_framebuffers(ap, "virtiodrmfb", primary); - - kfree(ap); -} - int drm_virtio_init(struct drm_driver *driver, struct virtio_device *vdev) { struct drm_device *dev; @@ -69,7 +49,9 @@ int drm_virtio_init(struct drm_driver *driver, struct virtio_device *vdev) pname); dev->pdev = pdev; if (vga) - virtio_pci_kick_out_firmware_fb(pdev); + drm_fb_helper_remove_conflicting_pci_framebuffers(pdev, + 0, + "virtiodrmfb"); snprintf(unique, sizeof(unique), "pci:%s", pname); ret = drm_dev_set_unique(dev, unique);