From patchwork Mon Feb 7 16:34:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 1589463 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=cerno.tech header.i=@cerno.tech header.a=rsa-sha256 header.s=fm2 header.b=Ay5D9Kcj; dkim=pass (2048-bit key; unprotected) header.d=messagingengine.com header.i=@messagingengine.com header.a=rsa-sha256 header.s=fm2 header.b=Uqtzi7b0; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2620:137:e000::1:20; helo=out1.vger.email; envelope-from=linux-tegra-owner@vger.kernel.org; receiver=) Received: from out1.vger.email (out1.vger.email [IPv6:2620:137:e000::1:20]) by bilbo.ozlabs.org (Postfix) with ESMTP id 4Jssjx1Fzzz9s5B for ; Tue, 8 Feb 2022 03:56:37 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345307AbiBGQzn (ORCPT ); Mon, 7 Feb 2022 11:55:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45076 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344901AbiBGQkw (ORCPT ); Mon, 7 Feb 2022 11:40:52 -0500 Received: from new4-smtp.messagingengine.com (new4-smtp.messagingengine.com [66.111.4.230]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0ED21C0401D3 for ; Mon, 7 Feb 2022 08:40:49 -0800 (PST) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailnew.nyi.internal (Postfix) with ESMTP id 023CD5801DC; Mon, 7 Feb 2022 11:35:25 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Mon, 07 Feb 2022 11:35:25 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; bh=JXq4978RZHODPqVrUMOV4cMFQcwToP 3PtgokXOpf0iM=; b=Ay5D9Kcj2pj5m59th2Z9naY0WEtwqFOOi0kryZZZV7HKI3 gEY83DVD/EWM4PKcza/LVdt3m9Z2YPjaFroKIMycSQgsQm4Ew6pf9BtQCqWs9kYi 9Od4mqhY4ESnyX0AO9v3ANNPbeB/SqhFtNq4+otpu+qevqjOnRMNzM77z5AtYl4U tKMKOnQzSiwzkcTI5cqkLr5PMuIEihw/tery9QebsMYnotqeOJoyyJ7qM0Sw44x/ yapE36uof0XFmUcXMhAOql85tTkB7eBMZzAg/F6g5ElZOc1lxK3+06nqfP94R2TV 1giVh7kpgWGGAR8lgmOhBj0jcA6Wjj1LeRQswppg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :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=fm2; bh=JXq497 8RZHODPqVrUMOV4cMFQcwToP3PtgokXOpf0iM=; b=Uqtzi7b0avZclQCqwVt++F vA4FWdfDsZkSZrq7QSf6x/GE/lxfOFXRlw95H+QnXcFc0Nc50O3QEywqWMLrQ6WH RWMgDpYxOWwK1uD4kiC1de5vv7tG6suSLboxp7Ilan8sY7h509zNb5Txkdr+zNch ej5HrqoNIIrMS+998zdWdCVo8olOPlvPetdvuvS0ZCDXCQ8Ks6IVSNy9zM5cpvtb uk+C/gDaLsF2eeaty9DSqmUl+tne+kjzDXKUt+Jz6+MZdbVTycTcU0etMt77zyeX novlzJy8z5R95FHRIdr/vD6LUEcSfYX8IIxaj6/YIZpv8O/qvmz4Rnnp0TStcIVA == X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrheehgdekjecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkofgjfhgggfestdekredtredttdenucfhrhhomhepofgrgihimhgv ucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrghtth gvrhhnpedvkeelveefffekjefhffeuleetleefudeifeehuddugffghffhffehveevheeh vdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrg igihhmvgestggvrhhnohdrthgvtghh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 7 Feb 2022 11:35:24 -0500 (EST) From: Maxime Ripard To: Daniel Vetter , David Airlie Cc: dri-devel@lists.freedesktop.org, Maarten Lankhorst , Thomas Zimmermann , Maxime Ripard , Dave Stevenson , Phil Elwell , Tim Gover , Dom Cobley , linux-tegra@vger.kernel.org, Jonathan Hunter , Thierry Reding Subject: [PATCH 02/23] drm/tegra: plane: switch to plane reset helper Date: Mon, 7 Feb 2022 17:34:54 +0100 Message-Id: <20220207163515.1038648-3-maxime@cerno.tech> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220207163515.1038648-1-maxime@cerno.tech> References: <20220207163515.1038648-1-maxime@cerno.tech> MIME-Version: 1.0 X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-tegra@vger.kernel.org tegra_plane_reset() does the state initialisation by copying a lot of the code found in the __drm_atomic_helper_plane_reset(). Let's switch to that helper and reduce the boilerplate. Cc: linux-tegra@vger.kernel.org Cc: Jonathan Hunter Cc: Thierry Reding Signed-off-by: Maxime Ripard --- drivers/gpu/drm/tegra/plane.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/tegra/plane.c b/drivers/gpu/drm/tegra/plane.c index 321cb1f13da6..ec0822c86926 100644 --- a/drivers/gpu/drm/tegra/plane.c +++ b/drivers/gpu/drm/tegra/plane.c @@ -37,8 +37,7 @@ static void tegra_plane_reset(struct drm_plane *plane) state = kzalloc(sizeof(*state), GFP_KERNEL); if (state) { - plane->state = &state->base; - plane->state->plane = plane; + __drm_atomic_helper_plane_reset(plane, &state->base); plane->state->zpos = p->index; plane->state->normalized_zpos = p->index;