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: 964187 Return-Path: X-Original-To: incoming-imx@patchwork.ozlabs.org Delivered-To: patchwork-incoming-imx@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=linux-arm-kernel-bounces+incoming-imx=patchwork.ozlabs.org@lists.infradead.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=rere.qmqm.pl Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="NPvy/YGZ"; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=rere.qmqm.pl header.i=@rere.qmqm.pl header.b="m7rkBfeG"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 421Zk372gFz9s1c for ; Fri, 31 Aug 2018 07:04:27 +1000 (AEST) 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=lTUcI/tR671YEb/0oQsnAIMea8zac9AcZSY9hvXNW68=; b=NPvy/YGZQaM25y QNcB6an9VAfgiKQDmJa7CvU6u3xj6JQluCMdzPuzp48Cq28xWJ9aDbIli9R7oTBJyJeEOcCHkCh+N sZQs55K918UiWZp/B51i/pCAnC03AIS+UGBB5ZfUa3o11Ngm4g4iVHGE9YWcXoHlrOSMgvxODbwsp PduALlBF2C6/0JiG8d3C467afSstiqAZO14Pzd7UvUPFVG6+SqCs2oatPRAu6NNwpJgT5vFojNhj6 YK6XccLH/lK7ffcyebqdBc5nkQD0Zux7ez2XW/WTbkS37brhkm9yp7+b6LO5RaH/m/rpwVnMjGIO/ nan9MQbEeV/natxombqg==; 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 1fvU6z-0007d0-IB; Thu, 30 Aug 2018 21:04:17 +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-00065U-Ap for linux-arm-kernel@lists.infradead.org; Thu, 30 Aug 2018 21:00:39 +0000 Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 421ZcL0ygXzqG; Thu, 30 Aug 2018 22:59:30 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1535662770; bh=E/+OXL9niT/BrhS47b3a25GCXCnfcejVEExRlRSVV1E=; h=Date:In-Reply-To:References:From:Subject:To:Cc:Cc:Cc:Cc:Cc:Cc:Cc: Cc:Cc:Cc:Cc:Cc:From; b=m7rkBfeGt7mDDff7iR1kGAlWjXUc9crNA+Sp1VNyc5sdgeyZiTy3I0EJm0S/MG02E FOrhcJuyWUszfcrDeOLTeIS4LmAc0rLsqNu+3l9eaXVbQCjsCHWPgW4Ul3PGHFXHHA 4U60KRuR8Hwg3AvOhswk/b3sxQBrDAg+wPsR8aJmU61m25/F1cCYm3KnM6dX2gDYCP 4JzMlez/0woZpMVev2lU4izT2ybQ/te+QE12/GH6dxVeErqL+zvKj4ySfdKcHM+igM HvXDq0blu6VSbzGNt+DM4v44P5trAm2XsIXl/kUdplkrC/oIem1qW9fMKVxpCiuEqI fmZHFM4zwt+eA== 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: <8a330a00dad89889550ff9fb7d7309d58d64181c.1535656077.git.mirq-linux@rere.qmqm.pl> In-Reply-To: References: From: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= Subject: [PATCH v2 06/12] drm/cirrus: 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_632816_FC12BC5D X-CRM114-Status: GOOD ( 10.16 ) X-Spam-Score: -0.1 (/) X-Spam-Report: SpamAssassin version 3.4.1 on bombadil.infradead.org summary: Content analysis details: (-0.1 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record -0.0 SPF_HELO_PASS SPF: HELO matches SPF record -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list 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+incoming-imx=patchwork.ozlabs.org@lists.infradead.org List-Id: linux-imx-kernel.lists.patchwork.ozlabs.org Signed-off-by: Michał Mirosław Acked-by: Daniel Vetter --- drivers/gpu/drm/cirrus/cirrus_drv.c | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) diff --git a/drivers/gpu/drm/cirrus/cirrus_drv.c b/drivers/gpu/drm/cirrus/cirrus_drv.c index 69c4e352dd78..85ed8657c862 100644 --- a/drivers/gpu/drm/cirrus/cirrus_drv.c +++ b/drivers/gpu/drm/cirrus/cirrus_drv.c @@ -42,33 +42,12 @@ static const struct pci_device_id pciidlist[] = { }; -static int cirrus_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, "cirrusdrmfb", primary); - kfree(ap); - - return 0; -} - static int cirrus_pci_probe(struct pci_dev *pdev, const struct pci_device_id *ent) { int ret; - ret = cirrus_kick_out_firmware_fb(pdev); + ret = drm_fb_helper_remove_conflicting_pci_framebuffers(pdev, 0, "cirrusdrmfb"); if (ret) return ret;