From patchwork Thu Aug 30 21:00:10 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: 10582827 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 7C414174C for ; Thu, 30 Aug 2018 21:06:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6BF302C290 for ; Thu, 30 Aug 2018 21:06:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5F4182C31D; 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 0D0F12C318 for ; Thu, 30 Aug 2018 21:06:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727555AbeHaBKH (ORCPT ); Thu, 30 Aug 2018 21:10:07 -0400 Received: from 183.pool-64.klikom.net ([91.227.64.183]:62421 "EHLO rere.qmqm.pl" rhost-flags-OK-FAIL-OK-OK) by vger.kernel.org with ESMTP id S1727524AbeHaBKH (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 421ZcN57BLzs7; Thu, 30 Aug 2018 22:59:32 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1535662772; bh=eePa/t7j5CstRGk6pBFuC4znb/qaSIMvWgJG9klZ6aY=; h=Date:In-Reply-To:References:From:Subject:To:Cc:Cc:Cc:Cc:Cc:Cc:Cc: Cc:Cc:Cc:Cc:Cc:From; b=jNjr0sltZdaTe5m1hvn+3OshVRzcmj33u9mxH7AlmARiPDk/6mESHstLv/k/ym12k ZxzHuOWkbxa2tSF2SpxBaJhj4rL5OnRt0PhClXf9cDvN/mqoeUZ1JX+tOs3EqQzOv0 NSb6L/k/vU2R+mKwrwGjomwnlyE17GSYkEJYNkKZLDu6wqpYD1tObRFAEeTCRtjY44 2qPCtZ0KENuPwOdSIvXlMEntKuGVsUu2U7Eewbp+7ircuwRnY0RMA5Cpqd0NxD7lMB 3QgkQh7LXqJOKdahItu1cyjSGXZ2gFFLJZ8B8SlR3+TFGwgdvxul8IrqW+j2vdvemq 8e0aN/7uPBE+g== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.100.0 at mail Date: Thu, 30 Aug 2018 23:00:10 +0200 Message-Id: <6bf2ab274713156b245e897154219055396aa017.1535656077.git.mirq-linux@rere.qmqm.pl> In-Reply-To: References: From: =?utf-8?b?TWljaGHFgiBNaXJvc8WCYXc=?= Subject: [PATCH v2 10/12] drm/vc4: use simpler remove_conflicting_framebuffers(NULL) MIME-Version: 1.0 To: dri-devel@lists.freedesktop.org Cc: Eric Anholt Cc: Alex Deucher Cc: Cc: Bartlomiej Zolnierkiewicz Cc: David Airlie Cc: Gerd Hoffmann Cc: Cc: Cc: Cc: Maxime Ripard Cc: Thierry Reding Cc: 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 Use remove_conflicting_framebuffers(NULL) instead of open-coding it. Signed-off-by: Michał Mirosław Acked-by: Eric Anholt Acked-by: Daniel Vetter --- drivers/gpu/drm/vc4/vc4_drv.c | 20 +------------------- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c index 94b99c90425a..96bb90325995 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.c +++ b/drivers/gpu/drm/vc4/vc4_drv.c @@ -246,24 +246,6 @@ static void vc4_match_add_drivers(struct device *dev, } } -static void vc4_kick_out_firmware_fb(void) -{ - struct apertures_struct *ap; - - ap = alloc_apertures(1); - if (!ap) - return; - - /* Since VC4 is a UMA device, the simplefb node may have been - * located anywhere in memory. - */ - ap->ranges[0].base = 0; - ap->ranges[0].size = ~0; - - drm_fb_helper_remove_conflicting_framebuffers(ap, "vc4drmfb", false); - kfree(ap); -} - static int vc4_drm_bind(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); @@ -296,7 +278,7 @@ static int vc4_drm_bind(struct device *dev) if (ret) goto gem_destroy; - vc4_kick_out_firmware_fb(); + drm_fb_helper_remove_conflicting_framebuffers(NULL, "vc4drmfb", false); ret = drm_dev_register(drm, 0); if (ret < 0)