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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 C0B64C4167B for ; Fri, 1 Dec 2023 02:37:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:From:References:Cc:To:Subject: MIME-Version:Date:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=BicmOQk1gmRnz4g1W7GF5+vBa96vm8+Jn+mMbDT6kh8=; b=TxMaVG72ds92hA zQCTXx9A9SDWyEoseF6IKl1k6A0prbqS9y7HnDpNzJ/Ro3kcAY3jBhoHAxoONnww9dm1LOIkL5SX6 LHUQu99nxX+bpIe4Rf0AeZvxVs7NT+CNLQeOMGV6RsZFuiqN0jP+Q1yoN6TR52DhKKKTwPPQXQydX BvGs+qvaluBzHS8uASQ0wkbsL6HcnrT3FQht1Da++q6oOalOdtFuLMHMhhpMVZwCRfTJgtERY9fxO D3QOtRI0qgt22HO+i4QMKHSpxnY3ZowBaATkIuGADI7Crzk7Pf5CaDg6vTxHHbY0hMNYhv7oqDdmn TsauUC1OEASiyUYg74uA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r8tOG-00CRmk-20; Fri, 01 Dec 2023 02:36:28 +0000 Received: from out-186.mta1.migadu.com ([95.215.58.186]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r8tOC-00CRkm-0X for linux-arm-kernel@lists.infradead.org; Fri, 01 Dec 2023 02:36:27 +0000 Message-ID: <9a741d8d-a699-4fe8-af59-f90c91014d01@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1701398175; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=EIETJb62GcJnMc0HG5pRvWQuoXMY9gZZynhystY1S+g=; b=ZZyzjJQWQ2LuSvhxg2XyMudBtyeZupmuAAnvmKHiwQ+cISrZEQwCONl2svSSzC0iMFByAQ u/8MQxOL1o4lub/0CjMMm58jAsESsW0JcN9g3bzVvzGoQAKuXcSu6dHSO9Zps4rSSQoC93 iTR4J7EEcdkpBG1hYmDGsbImU9l4c6A= Date: Fri, 1 Dec 2023 10:36:08 +0800 MIME-Version: 1.0 Subject: Re: [1/8] drm/plane-helper: Move drm_plane_helper_atomic_check() into udl To: Thomas Zimmermann , mripard@kernel.org, maarten.lankhorst@linux.intel.com, daniel@ffwll.ch, airlied@gmail.com Cc: dri-devel@lists.freedesktop.org, javierm@redhat.com, amd-gfx@lists.freedesktop.org, linux-renesas-soc@vger.kernel.org, laurent.pinchart@ideasonboard.com, linux-arm-kernel@lists.infradead.org References: <20231128104723.20622-2-tzimmermann@suse.de> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Sui Jingfeng In-Reply-To: <20231128104723.20622-2-tzimmermann@suse.de> X-Migadu-Flow: FLOW_OUT X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231130_183624_611503_F8C8FEFB X-CRM114-Status: GOOD ( 21.24 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, On 2023/11/28 18:45, Thomas Zimmermann wrote: > The udl driver is the only caller of drm_plane_helper_atomic_check(). > Move the function into the driver. No functional changes. > > Signed-off-by: Thomas Zimmermann > --- > drivers/gpu/drm/drm_plane_helper.c | 32 ------------------------------ > drivers/gpu/drm/udl/udl_modeset.c | 19 ++++++++++++++++-- > include/drm/drm_plane_helper.h | 2 -- > 3 files changed, 17 insertions(+), 36 deletions(-) > > diff --git a/drivers/gpu/drm/drm_plane_helper.c b/drivers/gpu/drm/drm_plane_helper.c > index 5e95089676ff8..7982be4b0306d 100644 > --- a/drivers/gpu/drm/drm_plane_helper.c > +++ b/drivers/gpu/drm/drm_plane_helper.c > @@ -279,35 +279,3 @@ void drm_plane_helper_destroy(struct drm_plane *plane) > kfree(plane); > } > EXPORT_SYMBOL(drm_plane_helper_destroy); > - > -/** > - * drm_plane_helper_atomic_check() - Helper to check plane atomic-state > - * @plane: plane to check > - * @state: atomic state object > - * > - * Provides a default plane-state check handler for planes whose atomic-state > - * scale and positioning are not expected to change since the plane is always > - * a fullscreen scanout buffer. > - * > - * This is often the case for the primary plane of simple framebuffers. See > - * also drm_crtc_helper_atomic_check() for the respective CRTC-state check > - * helper function. > - * > - * RETURNS: > - * Zero on success, or an errno code otherwise. > - */ > -int drm_plane_helper_atomic_check(struct drm_plane *plane, struct drm_atomic_state *state) > -{ > - struct drm_plane_state *new_plane_state = drm_atomic_get_new_plane_state(state, plane); > - struct drm_crtc *new_crtc = new_plane_state->crtc; > - struct drm_crtc_state *new_crtc_state = NULL; > - > - if (new_crtc) > - new_crtc_state = drm_atomic_get_new_crtc_state(state, new_crtc); > - > - return drm_atomic_helper_check_plane_state(new_plane_state, new_crtc_state, > - DRM_PLANE_NO_SCALING, > - DRM_PLANE_NO_SCALING, > - false, false); > -} > -EXPORT_SYMBOL(drm_plane_helper_atomic_check); Since this function is removed, does the comments of the drm_crtc_helper_atomic_check() function (in the drm_crtc_helper.c) need to update as well? I'm ask because I see the comments of the drm_crtc_helper_atomic_check() still referencing this function. > diff --git a/drivers/gpu/drm/udl/udl_modeset.c b/drivers/gpu/drm/udl/udl_modeset.c > index 40876bcdd79a4..7702359c90c22 100644 > --- a/drivers/gpu/drm/udl/udl_modeset.c > +++ b/drivers/gpu/drm/udl/udl_modeset.c > @@ -21,7 +21,6 @@ > #include > #include > #include > -#include > #include > #include > > @@ -261,6 +260,22 @@ static const uint64_t udl_primary_plane_fmtmods[] = { > DRM_FORMAT_MOD_INVALID > }; > > +static int udl_primary_plane_helper_atomic_check(struct drm_plane *plane, > + struct drm_atomic_state *state) > +{ > + struct drm_plane_state *new_plane_state = drm_atomic_get_new_plane_state(state, plane); > + struct drm_crtc *new_crtc = new_plane_state->crtc; > + struct drm_crtc_state *new_crtc_state = NULL; > + > + if (new_crtc) > + new_crtc_state = drm_atomic_get_new_crtc_state(state, new_crtc); > + > + return drm_atomic_helper_check_plane_state(new_plane_state, new_crtc_state, > + DRM_PLANE_NO_SCALING, > + DRM_PLANE_NO_SCALING, > + false, false); > +} > + > static void udl_primary_plane_helper_atomic_update(struct drm_plane *plane, > struct drm_atomic_state *state) > { > @@ -296,7 +311,7 @@ static void udl_primary_plane_helper_atomic_update(struct drm_plane *plane, > > static const struct drm_plane_helper_funcs udl_primary_plane_helper_funcs = { > DRM_GEM_SHADOW_PLANE_HELPER_FUNCS, > - .atomic_check = drm_plane_helper_atomic_check, > + .atomic_check = udl_primary_plane_helper_atomic_check, > .atomic_update = udl_primary_plane_helper_atomic_update, > }; > > diff --git a/include/drm/drm_plane_helper.h b/include/drm/drm_plane_helper.h > index 3a574e8cd22f4..75f9c4830564a 100644 > --- a/include/drm/drm_plane_helper.h > +++ b/include/drm/drm_plane_helper.h > @@ -26,7 +26,6 @@ > > #include > > -struct drm_atomic_state; > struct drm_crtc; > struct drm_framebuffer; > struct drm_modeset_acquire_ctx; > @@ -42,7 +41,6 @@ int drm_plane_helper_update_primary(struct drm_plane *plane, struct drm_crtc *cr > int drm_plane_helper_disable_primary(struct drm_plane *plane, > struct drm_modeset_acquire_ctx *ctx); > void drm_plane_helper_destroy(struct drm_plane *plane); > -int drm_plane_helper_atomic_check(struct drm_plane *plane, struct drm_atomic_state *state); > > /** > * DRM_PLANE_NON_ATOMIC_FUNCS - Default plane functions for non-atomic drivers _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel