From patchwork Sat Sep 1 14:08:51 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: 10584807 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 6386714E1 for ; Sat, 1 Sep 2018 14:18:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 69A7B2A6B4 for ; Sat, 1 Sep 2018 14:18:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5A78C2A6C6; Sat, 1 Sep 2018 14:18: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 BFAC02A6B4 for ; Sat, 1 Sep 2018 14:18:38 +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=CrmpvF0wOWompCIiCi8FPlSZljnOIwb9uJ3nU942Rmw=; b=b57jeRlrIObHk9 xoRGFP1q8oTFylD4crXRqYe7Z7TkwgyaGzWdiN1LiiAEvxNE9OFsR60e6O1fHqpeR08kH0XKbkLNf 0A7RCDNf2A3DSpQdcydWoSC4svxj+LDWXj4dVyM5Wws7fG/jLBUC7P4CQPciK0o/iWEuhi3RKtXnH +fMf1pi5YE1+EHHuvSnxgkJRVX30DnYKCuEbPt/HRrt/MuT8yInvedUaY7hG21CA34bvL4ug+fCUr MfWrS+dti1vlZJEDeMlzKjQFf2k+RzzviyEKzc4SLAEhmDhPm9Uo9LWWh6FtTdtd2pc38Dna06WWM byufKmcCE5EqKgzRd01w==; 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 1fw6jJ-0007at-CJ; Sat, 01 Sep 2018 14:18:25 +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-0000hD-99 for linux-arm-kernel@lists.infradead.org; Sat, 01 Sep 2018 14:09:16 +0000 Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 422dNs1B7Wzs8; Sat, 1 Sep 2018 16:08:13 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1535810893; bh=WGaZ3CjyVt7Sh/UtYrEXH/3jMbfSxhu26rb+dqQOntQ=; h=Date:In-Reply-To:References:From:Subject:To:Cc:Cc:From; b=PBRYsQx/jXwDzqOfTsym+dmaEPSfzTl6lS2an5REbIWIhZUxq4YPOIelYjR42TO/n poD5njayfRMCSCw+7fjsnN8MlIZFXLgSlSkOt0Ldnen/hFhiMut7ICM4m6MTe3Of1M Qh35MxpYUwBk1r/IDEgSDXA3rj1ttIlCiLkraXj8mdM8Y45KCnj6ir5PSCJbX+g5eE z+VDHSFcIJe5DTHTF4ghUYVE5j/o1D9PaC5OPQaX5oIk+H7RK38chLfLnlnZNSs3z4 RkKQkLBqNH8mSFMrcx8XJjd7NWznEYGtkqe/BVlKMJajYRKeGtqJoFnbVXuX+GaLZ2 jpTuKKGbFtSfA== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.100.0 at mail Date: Sat, 01 Sep 2018 16:08:51 +0200 Message-Id: <7d6d5bc4deac322b1351533c989cb3583e91be49.1535810304.git.mirq-linux@rere.qmqm.pl> In-Reply-To: References: From: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= Subject: [PATCH v3 12/13] drm/sun4i: use simpler remove_conflicting_framebuffers(NULL) 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_799880_4C070C8C X-CRM114-Status: GOOD ( 13.16 ) 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 , Maxime Ripard , Eric Anholt , amd-gfx@lists.freedesktop.org, Jonathan Hunter , David Airlie , Thierry Reding , Gerd Hoffmann , Alex Deucher , Dave Airlie , virtualization@lists.linux-foundation.org, 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 Use remove_conflicting_framebuffers(NULL) instead of duplicating it. Signed-off-by: Michał Mirosław Acked-by: Maxime Ripard Acked-by: Daniel Vetter --- drivers/gpu/drm/sun4i/sun4i_drv.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/drivers/gpu/drm/sun4i/sun4i_drv.c b/drivers/gpu/drm/sun4i/sun4i_drv.c index 50d19605c38f..555b5db8036f 100644 --- a/drivers/gpu/drm/sun4i/sun4i_drv.c +++ b/drivers/gpu/drm/sun4i/sun4i_drv.c @@ -60,22 +60,6 @@ static struct drm_driver sun4i_drv_driver = { /* Frame Buffer Operations */ }; -static void sun4i_remove_framebuffers(void) -{ - struct apertures_struct *ap; - - ap = alloc_apertures(1); - if (!ap) - return; - - /* The framebuffer can be located anywhere in RAM */ - ap->ranges[0].base = 0; - ap->ranges[0].size = ~0; - - drm_fb_helper_remove_conflicting_framebuffers(ap, "sun4i-drm-fb", false); - kfree(ap); -} - static int sun4i_drv_bind(struct device *dev) { struct drm_device *drm; @@ -118,7 +102,7 @@ static int sun4i_drv_bind(struct device *dev) drm->irq_enabled = true; /* Remove early framebuffers (ie. simplefb) */ - sun4i_remove_framebuffers(); + drm_fb_helper_remove_conflicting_framebuffers(NULL, "sun4i-drm-fb", false); /* Create our framebuffer */ ret = sun4i_framebuffer_init(drm);