From patchwork Tue Jun 20 06:47:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonas Karlman X-Patchwork-Id: 13285218 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 8FFA8EB64DB for ; Tue, 20 Jun 2023 06:47:49 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id AC15410E267; Tue, 20 Jun 2023 06:47:48 +0000 (UTC) Received: from s.wrqvtbkv.outbound-mail.sendgrid.net (s.wrqvtbkv.outbound-mail.sendgrid.net [149.72.123.24]) by gabe.freedesktop.org (Postfix) with ESMTPS id 731B910E260 for ; Tue, 20 Jun 2023 06:47:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kwiboo.se; h=from:subject:in-reply-to:references:mime-version:to:cc: content-transfer-encoding:content-type:cc:content-type:from:subject:to; s=s1; bh=WIftQBIpIy4TYM/w/l437zYjnaja+iEv9fSTQdcIaxc=; b=DD8iiQ3BAznRD1abNxYFKd9FHfceipbNMrV1hgdm7Tior8YDCBRjEgOXsTiSHl10CIFg c9EJnBeSFAU/kN1aAyQld2KFKR61y8VXWQExNua3TYlYNv4v7sbgDt3wWlCID2MvbIQE1H TKK/Qm0UXcDm3Wbp/tFsqOISysV8dMJjAdgjo0t4IooRVDydt9d1Sp7IVsCIGMQflMGMTJ QkvgEoQ9zQGRA4IeTiwzwWvVEv7GPpNdgtH6MrSUu1t6qaUsB4GRZfBWqXkHNnWPtd6gVS 2kmfOP2nxBtMo+eVPQndktCzKStTkBNpLQgqSMCyGoIucG8Rk+d99MUwSt+NIiDA== Received: by filterdrecv-84b96456cb-rsmc4 with SMTP id filterdrecv-84b96456cb-rsmc4-1-64914B89-1E 2023-06-20 06:47:37.498149536 +0000 UTC m=+3481757.706840986 Received: from bionic.localdomain (unknown) by geopod-ismtpd-5 (SG) with ESMTP id ZMjEKrw4Qmu6N8KSTS7lHQ Tue, 20 Jun 2023 06:47:37.177 +0000 (UTC) From: Jonas Karlman Subject: [PATCH 2/4] drm/rockchip: vop: Use cleanup helper directly as destroy funcs Date: Tue, 20 Jun 2023 06:47:37 +0000 (UTC) Message-ID: <20230620064732.1525594-3-jonas@kwiboo.se> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230620064732.1525594-1-jonas@kwiboo.se> References: <20230620064732.1525594-1-jonas@kwiboo.se> MIME-Version: 1.0 X-SG-EID: TdbjyGynYnRZWhH+7lKUQJL+ZxmxpowvO2O9SQF5CwCVrYgcwUXgU5DKUU3QxAfZekEeQsTe+RrMu3cja6a0h+3K61RI4BbEH1WyovFH13WxQgrm+3EFl7eTAtcTWehbd5CjXWBfBMemcOLPT8tHF4GvEfty/J9+9b1lO9STEgA3p6sjKimF6svmCUWhXzhAFWyhpjlFzkimkb+Q7YDxbtZ4Xj74hGtLc17Lh4J7LWbgUOH3hMIrrXidJV3+Oz0sOZ1HLxcP4xVTcKeLoeABmw== To: Sandy Huang , Heiko Stuebner , David Airlie , Daniel Vetter X-Entity-ID: P7KYpSJvGCELWjBME/J5tg== 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: Jonas Karlman , Sascha Hauer , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-rockchip@lists.infradead.org, Andy Yan , Mark Yao , linux-arm-kernel@lists.infradead.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" vop_plane_destroy and vop_crtc_destroy are plain wrappers around drm_plane_cleanup and drm_crtc_cleanup. Use them directly as plane and crtc funcs to closer match VOP2 driver. Signed-off-by: Jonas Karlman Reviewed-by: Sascha Hauer --- drivers/gpu/drm/rockchip/rockchip_drm_vop.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c index 60b23636a3fe..25c873d4ff53 100644 --- a/drivers/gpu/drm/rockchip/rockchip_drm_vop.c +++ b/drivers/gpu/drm/rockchip/rockchip_drm_vop.c @@ -766,11 +766,6 @@ static void vop_crtc_atomic_disable(struct drm_crtc *crtc, } } -static void vop_plane_destroy(struct drm_plane *plane) -{ - drm_plane_cleanup(plane); -} - static inline bool rockchip_afbc(u64 modifier) { return modifier == ROCKCHIP_AFBC_MOD; @@ -1131,7 +1126,7 @@ static const struct drm_plane_helper_funcs plane_helper_funcs = { static const struct drm_plane_funcs vop_plane_funcs = { .update_plane = drm_atomic_helper_update_plane, .disable_plane = drm_atomic_helper_disable_plane, - .destroy = vop_plane_destroy, + .destroy = drm_plane_cleanup, .reset = drm_atomic_helper_plane_reset, .atomic_duplicate_state = drm_atomic_helper_plane_duplicate_state, .atomic_destroy_state = drm_atomic_helper_plane_destroy_state, @@ -1602,11 +1597,6 @@ static const struct drm_crtc_helper_funcs vop_crtc_helper_funcs = { .atomic_disable = vop_crtc_atomic_disable, }; -static void vop_crtc_destroy(struct drm_crtc *crtc) -{ - drm_crtc_cleanup(crtc); -} - static struct drm_crtc_state *vop_crtc_duplicate_state(struct drm_crtc *crtc) { struct rockchip_crtc_state *rockchip_state; @@ -1711,7 +1701,7 @@ vop_crtc_verify_crc_source(struct drm_crtc *crtc, const char *source_name, static const struct drm_crtc_funcs vop_crtc_funcs = { .set_config = drm_atomic_helper_set_config, .page_flip = drm_atomic_helper_page_flip, - .destroy = vop_crtc_destroy, + .destroy = drm_crtc_cleanup, .reset = vop_crtc_reset, .atomic_duplicate_state = vop_crtc_duplicate_state, .atomic_destroy_state = vop_crtc_destroy_state, @@ -1962,7 +1952,7 @@ static void vop_destroy_crtc(struct vop *vop) */ list_for_each_entry_safe(plane, tmp, &drm_dev->mode_config.plane_list, head) - vop_plane_destroy(plane); + drm_plane_cleanup(plane); /* * Destroy CRTC after vop_plane_destroy() since vop_disable_plane()