From patchwork Thu Aug 30 21:00:07 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: 10582829 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 179D6175A for ; Thu, 30 Aug 2018 21:06:06 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 09F412C32D for ; Thu, 30 Aug 2018 21:06:06 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id F28BC2C290; Thu, 30 Aug 2018 21:06:05 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 93EC42C290 for ; Thu, 30 Aug 2018 21:06:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727568AbeHaBKI (ORCPT ); Thu, 30 Aug 2018 21:10:08 -0400 Received: from 183.pool-64.klikom.net ([91.227.64.183]:23905 "EHLO rere.qmqm.pl" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1727536AbeHaBKH (ORCPT ); Thu, 30 Aug 2018 21:10:07 -0400 Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 421ZcK46JQzbZ; Thu, 30 Aug 2018 22:59:29 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1535662769; bh=V6edOcizDa5A67hnilRwp0bSN35/WP1foanZNTCSgqQ=; h=Date:In-Reply-To:References:From:Subject:To:Cc:Cc:Cc:Cc:Cc:Cc:Cc: Cc:Cc:Cc:Cc:From; b=lVv33zDqJv/NBqCjzQApi5b35Y1nqQoHPPrtqcc5V/+ESPNsjRPe64Ngsuy1m0ZmZ R4yEQTz+KG0vv6gQhU5Vj8yxrSPZCmHt0AQIL6g+hUHeBOivHfGazIjQFF6fuGLbvK T7rST/2PRnbMgVW+4UHZ/kD4sxRbppMdsfO2ELvzeMcNwgmXVs3dKfZ1gRwgz7qBwW QEZ4hmNvzpgRMhNkYJahg13L2//YRh7z6jGQ7+d989+k+twPv+t5W8G41RWJchoTyy QSrwslxxp9A5SyAWZW4Z7vfdZvMfvIK+CpimjDOp4d8kX/cqSNFzWUDOMhsxdOoCB0 rN37BAqGedBDw== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.100.0 at mail Date: Thu, 30 Aug 2018 23:00:07 +0200 Message-Id: In-Reply-To: References: From: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= Subject: [PATCH v2 05/12] drm/bochs: use simpler remove_conflicting_pci_framebuffers() MIME-Version: 1.0 To: dri-devel@lists.freedesktop.org Cc: Gerd Hoffmann , virtualization@lists.linux-foundation.org Cc: Alex Deucher Cc: Cc: Bartlomiej Zolnierkiewicz Cc: David Airlie Cc: Eric Anholt Cc: Cc: Cc: Cc: Maxime Ripard Cc: Thierry Reding Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Signed-off-by: Michał Mirosław Acked-by: Daniel Vetter --- drivers/gpu/drm/bochs/bochs_drv.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/drivers/gpu/drm/bochs/bochs_drv.c b/drivers/gpu/drm/bochs/bochs_drv.c index 7b20318483e4..c61b40c72b62 100644 --- a/drivers/gpu/drm/bochs/bochs_drv.c +++ b/drivers/gpu/drm/bochs/bochs_drv.c @@ -143,22 +143,6 @@ static const struct dev_pm_ops bochs_pm_ops = { /* ---------------------------------------------------------------------- */ /* pci interface */ -static int bochs_kick_out_firmware_fb(struct pci_dev *pdev) -{ - struct apertures_struct *ap; - - ap = alloc_apertures(1); - if (!ap) - return -ENOMEM; - - ap->ranges[0].base = pci_resource_start(pdev, 0); - ap->ranges[0].size = pci_resource_len(pdev, 0); - drm_fb_helper_remove_conflicting_framebuffers(ap, "bochsdrmfb", false); - kfree(ap); - - return 0; -} - static int bochs_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) { @@ -171,7 +155,7 @@ static int bochs_pci_probe(struct pci_dev *pdev, return -ENOMEM; } - ret = bochs_kick_out_firmware_fb(pdev); + ret = drm_fb_helper_remove_conflicting_pci_framebuffers(pdev, 0, "bochsdrmfb"); if (ret) return ret;