From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2B502C433FE for ; Wed, 15 Dec 2021 09:51:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241311AbhLOJv3 (ORCPT ); Wed, 15 Dec 2021 04:51:29 -0500 Received: from new2-smtp.messagingengine.com ([66.111.4.224]:60425 "EHLO new2-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241314AbhLOJv1 (ORCPT ); Wed, 15 Dec 2021 04:51:27 -0500 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailnew.nyi.internal (Postfix) with ESMTP id 256F6580189; Wed, 15 Dec 2021 04:51:27 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Wed, 15 Dec 2021 04:51:27 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; s=fm1; bh=DWisH74FtOO6D ZDcdH7fo1vJbnYXx33V9C3uMX9AN78=; b=ENqrJGi/DV9k310RNLr4UDCw96Svf 3f/OOVZ4aA6QCkIOPQcZjM55v4m6vRDoYm64Cz+vs6yrCwNcTvs23asnzcD5C54U keFiPE4qvdqWRxvS0dnRzOCpZcEpFyENnrMAh3725cZAC95GJjy5wMOHCXjl/9+E KrYG/xx9drtMTeqnDEoriXT+KHZ5hKSoa34yvHP81akhehQsEDPH91wezjg97aip wMK/WroWEic4ofygehBRUCXPoGIab/2FgOjA49CvYiobn4aU670ihDJwvEStun7U W3FZU1KYQ21K6b2SE2QhXeO8sW7BEUC2pWVL7nvkjvdyRCSkIS1ruc8gw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:date:from :in-reply-to:message-id:mime-version:references:subject:to :x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=DWisH74FtOO6DZDcdH7fo1vJbnYXx33V9C3uMX9AN78=; b=UXz82kFk Q6gE0JeKtxUrcGpKnnLDeBMbCNWBx3Ju51i1mxzj8GcmslViYNZ/1HnbJqB54H1L SIWomJHPNEJ9A6j3yDiZdwuUB4G/isIJfHJNL06siuzfJ3wZmfrMtHkNoAIYJKKG xXyYwtPznrtMEX3Jm/1v/YUVjvkAjsddP69LtJN6qiGoPQezlM+9xwULEGF/0sbh ECT8lFaKjubzrN3LidimAhDLc8cKk0CRWaR4e9QX07iljGRJFSOiFUG4zvwmoEy2 GXVBKHlEijeoFVaph6+Srz8awJDzWq8jKcO/gjVH1ymnG9BK/TGNhK02ePyXl5DI ysbTcatvMPAa1A== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrledvgddtlecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepofgrgihimhgv ucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrghtth gvrhhnpedvkeelveefffekjefhffeuleetleefudeifeehuddugffghffhffehveevheeh vdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrg igihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 15 Dec 2021 04:51:26 -0500 (EST) From: Maxime Ripard To: Florian Fainelli , Ray Jui , Nicolas Saenz Julienne , Daniel Vetter , David Airlie , Maarten Lankhorst , Thomas Zimmermann , Maxime Ripard , Scott Branden , Rob Herring , Frank Rowand Cc: bcm-kernel-feedback-list@broadcom.com, Dave Stevenson , Phil Elwell , Tim Gover , Dom Cobley , devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-rpi-kernel@lists.infradead.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH RESEND v4 v5 3/4] drm/vc4: Remove conflicting framebuffers before callind bind_all Date: Wed, 15 Dec 2021 10:51:16 +0100 Message-Id: <20211215095117.176435-4-maxime@cerno.tech> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211215095117.176435-1-maxime@cerno.tech> References: <20211215095117.176435-1-maxime@cerno.tech> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The bind hooks will modify their controller registers, so simplefb is going to be unusable anyway. Let's avoid any transient state where it could still be in the system but no longer functionnal. Acked-by: Nicolas Saenz Julienne Signed-off-by: Maxime Ripard --- drivers/gpu/drm/vc4/vc4_drv.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_drv.c b/drivers/gpu/drm/vc4/vc4_drv.c index d3cae84a4c4e..86c61ee120b7 100644 --- a/drivers/gpu/drm/vc4/vc4_drv.c +++ b/drivers/gpu/drm/vc4/vc4_drv.c @@ -251,6 +251,10 @@ static int vc4_drm_bind(struct device *dev) if (ret) return ret; + ret = drm_aperture_remove_framebuffers(false, &vc4_drm_driver); + if (ret) + return ret; + ret = component_bind_all(dev, drm); if (ret) return ret; @@ -259,10 +263,6 @@ static int vc4_drm_bind(struct device *dev) if (ret) goto unbind_all; - ret = drm_aperture_remove_framebuffers(false, &vc4_drm_driver); - if (ret) - goto unbind_all; - ret = vc4_kms_load(drm); if (ret < 0) goto unbind_all; -- 2.33.1