| Message ID | 20260424-drm-mode-config-init-v3-6-8b68d9db0d8b@kernel.org (mailing list archive) |
|---|---|
| State | New |
| Headers |
Return-Path: <linux-sunxi+bounces-22942-sunxi=pue.re@lists.linux.dev> X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mxe881.netcup.net (Postfix) with ESMTPS id A47191C0085 for <noreply@patchwork.local>; Fri, 24 Apr 2026 12:22:13 +0200 (CEST) Authentication-Results: mxe881; dkim=pass header.d=kernel.org; spf=pass (sender IP is 172.234.253.10) smtp.mailfrom=linux-sunxi+bounces-22942-noreply=patchwork.local@lists.linux.dev smtp.helo=sea.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.234.253.10 as permitted sender) client-ip=172.234.253.10; envelope-from=linux-sunxi+bounces-22942-noreply=patchwork.local@lists.linux.dev; helo=sea.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id D63F5301B715 for <noreply@patchwork.local>; Fri, 24 Apr 2026 10:19:18 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id A16F030DD1D; Fri, 24 Apr 2026 10:19:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="rdMo+7T8" X-Original-To: linux-sunxi@lists.linux.dev Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7D55E363C4C; Fri, 24 Apr 2026 10:19:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777025958; cv=none; b=k5vuOa07AEUO/KcOPlCz0wfwywgNQU20dGbQ35t6z02g4pAXBjvRQR8JoCL1YHlMYYKWLPUUbazT1tMw9ANS+phyuXZzp79jbwKvPQLwl1LfoFlp1/MmivqQoiIE4iz7gBMEgiN4BAALglQqDVYgHYtP6Eq14T/KwKrnpDeVUZo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1777025958; c=relaxed/simple; bh=AZneGDz+L+6Cr8qiXiO/cK1JybuA0V/+52HowqTom6I=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=YGP06Kd8/wEMputMy2R5kGSEcvlvTnasvUxud0csQ3Ek+LPodZ555H0WDA4EoTGt+xkgXFngyMDbRga4vqE2TbFW6De+8uBsRj+rgWMDX6eefA7DK8V6UyB95Ci/Ogg7okIcmUmzqN5Y0SZqOpU8EmI+W2toDGkj+mS6EYSNQ3o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=rdMo+7T8; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id D85B5C2BCB9; Fri, 24 Apr 2026 10:19:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1777025958; bh=AZneGDz+L+6Cr8qiXiO/cK1JybuA0V/+52HowqTom6I=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=rdMo+7T8P7Kbo+52IXM876MKaMMM7w0H9XTH9EOn+kPqRkkiFfZB9pJVrk5QdDxQv SdvTdwOOmBgeDspyoO/yVWFzcJQEJkxtXegQxWajhkS8LZiubAW3/U8LGsYW03k6el 9bDNOk+6JRXS+hM8Jp5UX0owBOe24nMn7WyABAhswBOI/nM/QuvnCGerBagT4M+Ez1 Ynk27422G5/JJDmTbX5Td4R5EQ/tXMBPdOOPfC14ZBXYxCLkgW2UfZoqPXNotWfWmE DwqvSQ1xsI0HCB7Zm0/B/Qa/aCseStwEA416fgXcmjwBmKnuj/cfi5uspZNpLxg3QR MBe4167Xb+1sw== From: Maxime Ripard <mripard@kernel.org> Date: Fri, 24 Apr 2026 12:18:46 +0200 Subject: [PATCH v3 06/20] drm/colorop: Rename __drm_colorop_state_reset() Precedence: bulk X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: <linux-sunxi.lists.linux.dev> List-Subscribe: <mailto:linux-sunxi+subscribe@lists.linux.dev> List-Unsubscribe: <mailto:linux-sunxi+unsubscribe@lists.linux.dev> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260424-drm-mode-config-init-v3-6-8b68d9db0d8b@kernel.org> References: <20260424-drm-mode-config-init-v3-0-8b68d9db0d8b@kernel.org> In-Reply-To: <20260424-drm-mode-config-init-v3-0-8b68d9db0d8b@kernel.org> To: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>, Thomas Zimmermann <tzimmermann@suse.de>, David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>, Jonathan Corbet <corbet@lwn.net>, Shuah Khan <skhan@linuxfoundation.org>, Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>, Jyri Sarha <jyri.sarha@iki.fi>, Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>, Andrzej Hajda <andrzej.hajda@intel.com>, Neil Armstrong <neil.armstrong@linaro.org>, Robert Foss <rfoss@kernel.org>, Laurent Pinchart <Laurent.pinchart@ideasonboard.com>, Jonas Karlman <jonas@kwiboo.se>, Jernej Skrabec <jernej.skrabec@gmail.com>, Simon Ser <contact@emersion.fr>, Harry Wentland <harry.wentland@amd.com>, Melissa Wen <mwen@igalia.com>, Sebastian Wick <sebastian.wick@redhat.com>, Alex Hung <alex.hung@amd.com>, Jani Nikula <jani.nikula@linux.intel.com>, Rodrigo Vivi <rodrigo.vivi@intel.com>, Joonas Lahtinen <joonas.lahtinen@linux.intel.com>, Tvrtko Ursulin <tursulin@ursulin.net>, Chen-Yu Tsai <wens@kernel.org>, Samuel Holland <samuel@sholland.org>, Dave Stevenson <dave.stevenson@raspberrypi.com>, =?utf-8?q?Ma=C3=ADra_Canal?= <mcanal@igalia.com>, Raspberry Pi Kernel Maintenance <kernel-list@raspberrypi.com> Cc: dri-devel@lists.freedesktop.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Daniel Stone <daniels@collabora.com>, intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, Maxime Ripard <mripard@kernel.org> X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=2296; i=mripard@kernel.org; h=from:subject:message-id; bh=AZneGDz+L+6Cr8qiXiO/cK1JybuA0V/+52HowqTom6I=; b=owGbwMvMwCmsHn9OcpHtvjLG02pJDJmvnbtNeE5Pusb5ePlUf4duwfK2PWY60+beXbXAtNfoS clH+WOPOqayMAhzMsiKKbI8kQk7vbx9cZWD/cofMHNYmUCGMHBxCsBEDk9krNM7rnZo2Upf8dua /qrPb6tGi6l/Otal/3nRnvPBy6Xn9B7VZzRa86GjsbYxVdy7N2+ZOWO909Id15/kdwhlPFsq2RV a2C9ww7hg1p9MnlsPGcsFZ/3ltYyRn6X0ezHv/Y8J1aWGb7oA X-Developer-Key: i=mripard@kernel.org; a=openpgp; fpr=BE5675C37E818C8B5764241C254BCFC56BF6CE8D X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [-0.66 / 15.00]; BAYES_HAM(-5.50)[100.00%]; RBL_SENDERSCORE(2.00)[172.234.253.10:from]; SUSPICIOUS_RECIPS(1.50)[]; DMARC_POLICY_QUARANTINE(1.50)[kernel.org : SPF not aligned (relaxed),quarantine]; MAILLIST(-0.15)[generic]; MIME_GOOD(-0.10)[text/plain]; BAD_REP_POLICIES(0.10)[]; HAS_LIST_UNSUB(-0.01)[]; FORGED_SENDER_MAILLIST(0.00)[]; RCPT_COUNT_TWELVE(0.00)[38]; FROM_HAS_DN(0.00)[]; PRECEDENCE_BULK(0.00)[]; TAGGED_RCPT(0.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; DBL_BLOCKED_OPENRESOLVER(0.00)[suse.de:email,sea.lore.kernel.org:rdns,sea.lore.kernel.org:helo]; R_DKIM_PERMFAIL(0.00)[kernel.org:s=k20201202]; RCVD_VIA_SMTP_AUTH(0.00)[]; RCVD_COUNT_FIVE(0.00)[5]; ASN(0.00)[asn:63949, ipnet:172.234.224.0/19, country:SG]; DKIM_TRACE(0.00)[kernel.org:~]; FREEMAIL_TO(0.00)[linux.intel.com,suse.de,gmail.com,ffwll.ch,lwn.net,linuxfoundation.org,oss.qualcomm.com,iki.fi,ideasonboard.com,intel.com,linaro.org,kernel.org,kwiboo.se,emersion.fr,amd.com,igalia.com,redhat.com,ursulin.net,sholland.org,raspberrypi.com]; R_SPF_ALLOW(0.00)[+ip4:172.234.253.10:c]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[100.90.174.1:received]; TO_DN_SOME(0.00)[]; FROM_NEQ_ENVFROM(0.00)[mripard@kernel.org,linux-sunxi@lists.linux.dev]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; RCVD_TLS_LAST(0.00)[]; TAGGED_FROM(0.00)[bounces-22942-noreply=patchwork.local]; MIME_TRACE(0.00)[0:+]; MID_RHS_MATCH_FROM(0.00)[]; ARC_ALLOW(0.00)[subspace.kernel.org:s=arc-20240116:i=1]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[172.234.253.10:from] X-Rspamd-Queue-Id: A47191C0085 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= |
| Series |
drm/atomic: Rework initial state allocation
|
|
Commit Message
Maxime Ripard
April 24, 2026, 10:18 a.m. UTC
__drm_colorop_state_reset() is used to initialize a newly allocated drm_colorop_state, and is being typically called by drm_colorop_reset(). Since we want to consolidate DRM objects state allocation around the atomic_create_state callback that will only allocate and initialize a new drm_colorop_state instance, we will need to call __drm_colorop_state_reset() from both the reset and atomic_create paths. To avoid any confusion, we can thus rename __drm_colorop_state_reset() to __drm_colorop_state_init(). Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Signed-off-by: Maxime Ripard <mripard@kernel.org> --- drivers/gpu/drm/drm_colorop.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
Comments
Hi Maxime, Thank you for the patch. On Fri, Apr 24, 2026 at 12:18:46PM +0200, Maxime Ripard wrote: > __drm_colorop_state_reset() is used to initialize a newly allocated > drm_colorop_state, and is being typically called by drm_colorop_reset(). > > Since we want to consolidate DRM objects state allocation around the > atomic_create_state callback that will only allocate and initialize a > new drm_colorop_state instance, we will need to call > __drm_colorop_state_reset() from both the reset and atomic_create paths. > > To avoid any confusion, we can thus rename __drm_colorop_state_reset() > to __drm_colorop_state_init(). > > Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> > Signed-off-by: Maxime Ripard <mripard@kernel.org> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> > --- > drivers/gpu/drm/drm_colorop.c | 8 ++++---- > 1 file changed, 4 insertions(+), 4 deletions(-) > > diff --git a/drivers/gpu/drm/drm_colorop.c b/drivers/gpu/drm/drm_colorop.c > index 48d0b7ae3fc9..4c4d0a953e35 100644 > --- a/drivers/gpu/drm/drm_colorop.c > +++ b/drivers/gpu/drm/drm_colorop.c > @@ -498,19 +498,19 @@ void drm_colorop_atomic_destroy_state(struct drm_colorop *colorop, > __drm_atomic_helper_colorop_destroy_state(state); > kfree(state); > } > > /** > - * __drm_colorop_state_reset - resets colorop state to default values > + * __drm_colorop_state_init - Initializes colorop state to default values > * @colorop_state: atomic colorop state, must not be NULL > * @colorop: colorop object, must not be NULL > * > * Initializes the newly allocated @colorop_state with default > * values. This is useful for drivers that subclass the colorop state. > */ > -static void __drm_colorop_state_reset(struct drm_colorop_state *colorop_state, > - struct drm_colorop *colorop) > +static void __drm_colorop_state_init(struct drm_colorop_state *colorop_state, > + struct drm_colorop *colorop) > { > u64 val; > > colorop_state->colorop = colorop; > colorop_state->bypass = true; > @@ -537,11 +537,11 @@ static void __drm_colorop_state_reset(struct drm_colorop_state *colorop_state, > */ > static void __drm_colorop_reset(struct drm_colorop *colorop, > struct drm_colorop_state *colorop_state) > { > if (colorop_state) > - __drm_colorop_state_reset(colorop_state, colorop); > + __drm_colorop_state_init(colorop_state, colorop); > > colorop->state = colorop_state; > } > > void drm_colorop_reset(struct drm_colorop *colorop)
diff --git a/drivers/gpu/drm/drm_colorop.c b/drivers/gpu/drm/drm_colorop.c index 48d0b7ae3fc9..4c4d0a953e35 100644 --- a/drivers/gpu/drm/drm_colorop.c +++ b/drivers/gpu/drm/drm_colorop.c @@ -498,19 +498,19 @@ void drm_colorop_atomic_destroy_state(struct drm_colorop *colorop, __drm_atomic_helper_colorop_destroy_state(state); kfree(state); } /** - * __drm_colorop_state_reset - resets colorop state to default values + * __drm_colorop_state_init - Initializes colorop state to default values * @colorop_state: atomic colorop state, must not be NULL * @colorop: colorop object, must not be NULL * * Initializes the newly allocated @colorop_state with default * values. This is useful for drivers that subclass the colorop state. */ -static void __drm_colorop_state_reset(struct drm_colorop_state *colorop_state, - struct drm_colorop *colorop) +static void __drm_colorop_state_init(struct drm_colorop_state *colorop_state, + struct drm_colorop *colorop) { u64 val; colorop_state->colorop = colorop; colorop_state->bypass = true; @@ -537,11 +537,11 @@ static void __drm_colorop_state_reset(struct drm_colorop_state *colorop_state, */ static void __drm_colorop_reset(struct drm_colorop *colorop, struct drm_colorop_state *colorop_state) { if (colorop_state) - __drm_colorop_state_reset(colorop_state, colorop); + __drm_colorop_state_init(colorop_state, colorop); colorop->state = colorop_state; } void drm_colorop_reset(struct drm_colorop *colorop)