From patchwork Wed Nov 23 15:25:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 13053861 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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 352ECC4332F for ; Wed, 23 Nov 2022 15:31:16 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F3ACA10E592; Wed, 23 Nov 2022 15:31:14 +0000 (UTC) Received: from wnew2-smtp.messagingengine.com (wnew2-smtp.messagingengine.com [64.147.123.27]) by gabe.freedesktop.org (Postfix) with ESMTPS id 22A4510E58E for ; Wed, 23 Nov 2022 15:29:59 +0000 (UTC) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.west.internal (Postfix) with ESMTP id F3FA12B06A7A; Wed, 23 Nov 2022 10:29:55 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute4.internal (MEProxy); Wed, 23 Nov 2022 10:29:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1669217395; x= 1669224595; bh=xa2Xr2XPoRVUUkfnytxj0Crl7ldzQeXde8zWUWNPEc8=; b=I oIxyIj72uCvm/XjjJENT3wqIDO6NxuUF4Fz81i2dPW1PJLibP2AdgKufei1FMdpu 5gcyFC/q9+abuEkgOn/AfrjsEN1nJf8JpSuxTeBQ+eAa+HCiJkJY72z8MhadfDHn nzUzM+EGqYEzeHjDxqtMdJVxr5VzBKd6A8pI7+hD3OJDJCnuPbeM4PGm130pBW9T I7Xt31qTJ/ias/KN37RxkLRz3epuXEmGjR/tk+LEFQ2qDvps1WoOTmJf3lWZJ+55 /iCPQ0qNqIx510B+xgpa1lgbg7Xfqx3UbTGoQ8fsl792+T7p/m6T/DH0SGyfTJuH 5lobAtvOfJ2XiKuXUDcwA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t=1669217395; x= 1669224595; bh=xa2Xr2XPoRVUUkfnytxj0Crl7ldzQeXde8zWUWNPEc8=; b=t OXWuwrUE36xuza4nA/00BWxCwgo7A0skuCWcP5x7iNQerc0WhfihX3C9MvY54fc+ Kfyv2bszolIZ5Wcbhg8HYPkLE2myzbXIJ1PgAHIV1bVJ4zVn+jhmqMFf6gzAVi1Q t4NFJgsjhgz+RQXsFiXCuxaNZPdb7ZixBRIBE6WgFVvMCHtlxofyXpU0/jYLk8bZ 1I37nmtb6YXt4VxA4e0Q6sel4AC/L6daN1QYo82NETae+bjzkLrEg0KCP61dpxcB ycllPU9srbacvrxh/nTIOnl/c2afnpAeH4XazK6N7q2c3SI8f9C5Sq6gitNWq0LK KZplW40hF8VLzrGyq+kZw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvgedriedugdejgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhfffugggtgffkfhgjvfevofesthekredtredtjeenucfhrhhomhepofgrgihi mhgvucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrg htthgvrhhnpeduudduhfevjeetfeegvdffvdevvdejudegudekjeehtdelhfffveethfej ledtveenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpe hmrgigihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Feedback-ID: i8771445c:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 23 Nov 2022 10:29:54 -0500 (EST) From: Maxime Ripard Date: Wed, 23 Nov 2022 16:25:58 +0100 Subject: [PATCH 16/24] drm/vc4: txp: Initialise the CRTC before the encoder and connector MIME-Version: 1.0 Message-Id: <20221123-rpi-kunit-tests-v1-16-051a0bb60a16@cerno.tech> References: <20221123-rpi-kunit-tests-v1-0-051a0bb60a16@cerno.tech> In-Reply-To: <20221123-rpi-kunit-tests-v1-0-051a0bb60a16@cerno.tech> To: Maxime Ripard , Maarten Lankhorst , Daniel Vetter , David Airlie , Thomas Zimmermann X-Mailer: b4 0.11.0-dev-d416f X-Developer-Signature: v=1; a=openpgp-sha256; l=1254; i=maxime@cerno.tech; h=from:subject:message-id; bh=aR4vqMsUMqYTxLScBcRnhlhUq2A/EuG6aDorDcg05no=; b=owGbwMvMwCX2+D1vfrpE4FHG02pJDMl11tU63QpH/qj+5+FbXf2IYUnBZ5MOxpM/Fee/usTrN/VR hZFRRykLgxgXg6yYIkuMsPmSuFOzXney8c2DmcPKBDKEgYtTACZygpOR4WLw/1nOmtv67GcvZEtzXP 5wyXrNbPelz18+3WgtcFBL4yojw7RvWb35hwvml97aspj35jPfU//91fd3mjRYZ4kLHV6gxQUA X-Developer-Key: i=maxime@cerno.tech; a=openpgp; fpr=BE5675C37E818C8B5764241C254BCFC56BF6CE8D X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?unknown-8bit?q?David_Gow_=3Cdavidgow=40google=2Ecom=3E=2C_Brendan_Higg?= =?unknown-8bit?q?ins_=3Cbrendan=2Ehiggins=40linux=2Edev=3E=2C_Greg_Kroah-Ha?= =?unknown-8bit?q?rtman_=3Cgregkh=40linuxfoundation=2Eorg=3E=2C_Dave_Stevens?= =?unknown-8bit?q?on_=3Cdave=2Estevenson=40raspberrypi=2Ecom=3E=2C_Javier_Ma?= =?unknown-8bit?q?rtinez_Canillas_=3Cjavierm=40redhat=2Ecom=3E=2C_dri-devel?= =?unknown-8bit?q?=40lists=2Efreedesktop=2Eorg=2C_linux-kernel=40vger=2Ekern?= =?unknown-8bit?q?el=2Eorg=2C_linaro-mm-sig=40lists=2Elinaro=2Eorg=2C_Ma=C3?= =?unknown-8bit?q?=ADra_Canal_=3Cmairacanal=40riseup=2Enet=3E=2C_Maxime_Ripa?= =?unknown-8bit?q?rd_=3Cmaxime=40cerno=2Etech=3E=2C_linux-kselftest=40vger?= =?unknown-8bit?q?=2Ekernel=2Eorg=2C_kunit-dev=40googlegroups=2Ecom=2C_linux?= =?unknown-8bit?q?-media=40vger=2Ekernel=2Eorg?= Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" It makes more sense to register the CRTC before the encoder and connectors, so let's move our call around. Signed-off-by: Maxime Ripard Reviewed-by: Javier Martinez Canillas --- drivers/gpu/drm/vc4/vc4_txp.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/vc4/vc4_txp.c b/drivers/gpu/drm/vc4/vc4_txp.c index 0bb8e97d7891..c2a6bea6fd96 100644 --- a/drivers/gpu/drm/vc4/vc4_txp.c +++ b/drivers/gpu/drm/vc4/vc4_txp.c @@ -516,6 +516,11 @@ static int vc4_txp_bind(struct device *dev, struct device *master, void *data) vc4_crtc->regset.regs = txp_regs; vc4_crtc->regset.nregs = ARRAY_SIZE(txp_regs); + ret = vc4_crtc_init(drm, vc4_crtc, + &vc4_txp_crtc_funcs, &vc4_txp_crtc_helper_funcs); + if (ret) + return ret; + vc4_encoder = &txp->encoder; txp->encoder.type = VC4_ENCODER_TYPE_TXP; @@ -537,11 +542,6 @@ static int vc4_txp_bind(struct device *dev, struct device *master, void *data) if (ret) return ret; - ret = vc4_crtc_init(drm, vc4_crtc, - &vc4_txp_crtc_funcs, &vc4_txp_crtc_helper_funcs); - if (ret) - return ret; - ret = devm_request_irq(dev, irq, vc4_txp_interrupt, 0, dev_name(dev), txp); if (ret)