From patchwork Fri Nov 24 17:53:34 2017 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: 10076093 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id DDF1D602BD for ; Mon, 27 Nov 2017 08:35:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CC44F288F6 for ; Mon, 27 Nov 2017 08:35:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BFCDC28CA3; Mon, 27 Nov 2017 08:35:28 +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=-3.3 required=2.0 tests=BAYES_00,DKIM_ADSP_ALL, DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5E318288F6 for ; Mon, 27 Nov 2017 08:35:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4EEC96E23F; Mon, 27 Nov 2017 08:34:27 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from rere.qmqm.pl (78-11-180-123.static.ip.netia.com.pl [78.11.180.123]) by gabe.freedesktop.org (Postfix) with ESMTPS id 059016E0B1 for ; Fri, 24 Nov 2017 18:02:48 +0000 (UTC) Received: from remote.user (localhost [127.0.0.1]) by rere.qmqm.pl (Postfix) with ESMTPSA id 3yk3hZ2GGLz5J; Fri, 24 Nov 2017 18:53:34 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=rere.qmqm.pl; s=1; t=1511546014; bh=pbFuSlm2Ju1K/gw3DHF3MqNlz0qdFBkRt6ccZDDWX+c=; h=Date:In-Reply-To:References:From:Subject:To:Cc:From; b=J9ewsrfSdcb0uSgPMLYPrOOr0yZ7snokbuWjiJdKZyf+RXloQV/vBLH7d8moRWu50 GWs28YCfsoRpmHnBw5Zs7mKwZLfTwNNQDAkUufy2S06iMeKn+Zcoluixbb9ZAld9iq JniBkYZRe1oMYCEr/B9rT9qRVN8yAnl9E2BceXO6bqCBMZdCLZD52zkH1ucszlFhmR PVqdFCIdcMcjJNPevWhY8GhI+EScdZDL/46QKvWYEkyZpQJNMXuSPNSIUAhKirKu8p ii1IxCP9dYWi+QaPMHELf2MziVhEtmQr3JP7/uOMN0dBc1iCnymUOxFuV78WChNZAP AwOYIaeIMyHRQ== X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.99.2 at rere Date: Fri, 24 Nov 2017 18:53:34 +0100 Message-Id: <603b8efa754b488418e2eb285a5e563cdfb985f5.1511544782.git.mirq-linux@rere.qmqm.pl> In-Reply-To: References: From: =?UTF-8?q?Micha=C5=82=20Miros=C5=82aw?= Subject: [PATCH 11/13] drm/vc4: use simpler remove_conflicting_framebuffers(NULL) MIME-Version: 1.0 To: dri-devel@lists.freedesktop.org X-Mailman-Approved-At: Mon, 27 Nov 2017 08:34:15 +0000 Cc: David Airlie X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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 --- 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 e3c29729da2e..b65cddb775bb 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.c +++ b/drivers/gpu/drm/vc4/vc4_drv.c @@ -227,24 +227,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); @@ -277,7 +259,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)