From patchwork Thu Aug 30 21:00:08 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: 10582841 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 D61AF175A for ; Thu, 30 Aug 2018 21:06:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C6DD42C290 for ; Thu, 30 Aug 2018 21:06:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BB7B92C31C; Thu, 30 Aug 2018 21:06:39 +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 3255B2C290 for ; Thu, 30 Aug 2018 21:06:35 +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=Ip2EWZfTDu854APjhxd3AATDsqfIEit4A1e5ay8Bmzk=; b=FulOootJsn9rH1 /cDG5QfHjBXlF2ftZ6Y84DI5sLiqwJMWQFpM4kmFGpicTzi333rDnD8LnXK4SR31ej4aXvdRo98o/ y5kt5u7N/Wd0IsGAzw1SVRxiO08tuNPMnorffvv6pZb/R7tj80eZOEzvD7lJb02EUqzYAomaHXs+V 9Ks+hTMKwCZmCarW568IHxOylLo1TuDYChK+IpEHAHshxZITiUnuWFitr6QFDuzc3+W2YukWSqucF Ddv1VK5rs2YREyv6OmFPco2vjVW1PvPK6TXltR0il/y5tNm7iih4z1d8KQQ+3YnyBSdB4sMuMpota 8bTZcbswtll0T3cyk7cA==; 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 1fvU8z-0001I1-Pd; Thu, 30 Aug 2018 21:06:21 +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 1fvU3R-00065W-Al for linux-arm-kernel@lists.infradead.org; Thu, 30 Aug 2018 21:00:42 +0000 Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 421ZcM1H2hzrb; Thu, 30 Aug 2018 22:59:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1535662771; bh=QC4nPiVVu1nX7KIKaPqDLZDEqgZQhHs8ZZ5p04+3mq0=; h=Date:In-Reply-To:References:From:Subject:To:Cc:Cc:Cc:Cc:Cc:Cc:Cc: Cc:Cc:Cc:Cc:From; b=B72vgY5yUlDMLcde3GpW4uK7p86vRFmrmba5G6E4HRQkVNAlvnoGmK4seY5RZnjWq X0g58txwMx9Lx21qWkw6skAq59aQ3yDC0VH48byj3AlUgyP1sC5sJqp/lwThJyQ1kR PdcK9tzbx2mqo5kcnjQAKouFNaMe7oukN4aBohtjqpA8Y83HFSOuA9FZLQqJucFXS+ BTxmNuUDzZYtA0evCI+YPWy+dKR6fCpT4AzHeKhW7kWNWkLKfy6Y5T3j/tZrhto2sr QDtypJ8aNsC581sib4/s0kNf0CT+oWxqB/SO5VfG3PQH1AP5yoEVmj/fR6ziaXC6Zj 7HGOLR+Cecolg== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.100.0 at mail Date: Thu, 30 Aug 2018 23:00:08 +0200 Message-Id: <3b6a06b61458471bdecb40fa0af052a75d5a8222.1535656077.git.mirq-linux@rere.qmqm.pl> In-Reply-To: References: From: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= Subject: [PATCH v2 08/12] drm/radeon: 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-20180830_140037_649208_12D9DF24 X-CRM114-Status: GOOD ( 10.04 ) 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 , Maxime Ripard , 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: Alex Deucher Acked-by: Daniel Vetter --- drivers/gpu/drm/radeon/radeon_drv.c | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/drivers/gpu/drm/radeon/radeon_drv.c b/drivers/gpu/drm/radeon/radeon_drv.c index b28288a781ef..36c98a0ec991 100644 --- a/drivers/gpu/drm/radeon/radeon_drv.c +++ b/drivers/gpu/drm/radeon/radeon_drv.c @@ -311,27 +311,6 @@ static struct drm_driver kms_driver; bool radeon_device_is_virtual(void); -static int radeon_kick_out_firmware_fb(struct pci_dev *pdev) -{ - struct apertures_struct *ap; - bool primary = false; - - 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); - -#ifdef CONFIG_X86 - primary = pdev->resource[PCI_ROM_RESOURCE].flags & IORESOURCE_ROM_SHADOW; -#endif - drm_fb_helper_remove_conflicting_framebuffers(ap, "radeondrmfb", primary); - kfree(ap); - - return 0; -} - static int radeon_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) { @@ -341,7 +320,7 @@ static int radeon_pci_probe(struct pci_dev *pdev, return -EPROBE_DEFER; /* Get rid of things like offb */ - ret = radeon_kick_out_firmware_fb(pdev); + ret = drm_fb_helper_remove_conflicting_pci_framebuffers(pdev, 0, "radeondrmfb"); if (ret) return ret;