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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 92BDDC433F5 for ; Wed, 17 Nov 2021 14:51:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7959661B4C for ; Wed, 17 Nov 2021 14:51:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231953AbhKQOx7 (ORCPT ); Wed, 17 Nov 2021 09:53:59 -0500 Received: from new1-smtp.messagingengine.com ([66.111.4.221]:44609 "EHLO new1-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235831AbhKQOxw (ORCPT ); Wed, 17 Nov 2021 09:53:52 -0500 Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.nyi.internal (Postfix) with ESMTP id E9A0F580874; Wed, 17 Nov 2021 09:50:49 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 17 Nov 2021 09:50:49 -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=qzonQ7o9ZUVo8 KUbjrot/21pyteCYG+CTBgNW3fAN9E=; b=ATM+7D/krNYW4HVDb1QG53YCR1Run P1/yGlc7N2g06NiZBX+cVpBHVNzN4bHFDDxCyGzT0e/ZrqtxqWPfyEihIovf2OZm lNJPR1NEe/juvh+RbGD3s/Rj+7bCbEWj3EYGUQivmSgIikSQjYlKfJKN7DDOGmUJ nRf7jhUr0kAp8X6/J40983x8Gwmxs9qL9t6+P7/Xa7smKdR68bNPI0PwYXi5hnak FN3KTju4iArMD5HvxF5uGN5VjOcnYlqZWu6cLSOVN7OxZ2HXdMWLPSKPwNGnZGSV Qdbarz9LwK04Mb9WhtO/OmfUWriVOEaxLCXCf7M7dqdVW5Htk6LwLrGlA== 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=qzonQ7o9ZUVo8KUbjrot/21pyteCYG+CTBgNW3fAN9E=; b=gweAVR6U 0fi/f4CPRy4xUsCFgy9tsEawncK/81xV6AgLwUOv0xzn1r+FSI04m07JGwWW/Jwm DK12x2ywVZZWj4al8OE7ko1wDahLt2E+Y/7aDhw+4Xlf1Jwrb1TRSzSfYfT6xHu8 Z6URqx9WpX1E6k309xFqP4kDGOaDUuRxj9nN3Of6vRVn2AjOQDiCrDloR7Wx552o B2kieFRVCqxIp4N9YLS+Xt/sZKP8KZPuxjJhUVIQ525z32NC3oqPR37UFAAMlI8u u3NVFqamfVkFWUOrQu9yatyxmLv1Pz/0Qocl+yfnV4LTa/YzjysaVivQw3cKLl2k BnH8p0pDripenA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvuddrfeeggdeifecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepofgrgihimhgv ucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrghtth gvrhhnpedvkeelveefffekjefhffeuleetleefudeifeehuddugffghffhffehveevheeh vdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrg igihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 17 Nov 2021 09:50:48 -0500 (EST) From: Maxime Ripard To: Scott Branden , Nicolas Saenz Julienne , Rob Herring , Frank Rowand , Ray Jui , Florian Fainelli , Daniel Vetter , David Airlie , Maarten Lankhorst , Thomas Zimmermann , Maxime Ripard Cc: linux-rpi-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, Dave Stevenson , Phil Elwell , Tim Gover , Dom Cobley , devicetree@vger.kernel.org, bcm-kernel-feedback-list@broadcom.com Subject: [PATCH 3/5] drm/vc4: Remove conflicting framebuffers before callind bind_all Date: Wed, 17 Nov 2021 15:50:38 +0100 Message-Id: <20211117145040.334827-4-maxime@cerno.tech> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211117145040.334827-1-maxime@cerno.tech> References: <20211117145040.334827-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. 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 16abc3a3d601..8ab89f805826 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