From mboxrd@z Thu Jan 1 00:00:00 1970 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 B146C3A83A3; Tue, 12 May 2026 13:06:51 +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=1778591211; cv=none; b=MuEXgwnmuCUvF/kwdsriib6xDD40Hue3CQ83dyEG3WxMwO/lSKgL1u/PSrmOsnkKh7qlpcz0/yUhEX3LrsZ0T/vhRbqIQemS+B0037GwBj9AAxagU+MKzUhFvkeRg34AcuQTsi/pLBv5k4x3GrpUMms82/VCzzJLgTPHrCFyOk0= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778591211; c=relaxed/simple; bh=qaSP70ZhrUcMPjOf7+v4uq6SslBv0gdUuCOqJYZwmRw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=F+SdSOfCpia7wbEu8dMPFmpj2yfgIH/GKS1gq+EPxBIGjkll+YM4/dyg8hvUFkqiFJ2KuBdldc3qB5ezx0PgcvlX918GXM4JCM5vJv8sOuvwkEvErvzynI+WbLFMb+T6S9GSNzqdUzwqYFpnHcYEzbJEFwAC8bz5i2QCQXJZ8sI= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=pQeL45EG; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="pQeL45EG" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BDB89C2BCF7; Tue, 12 May 2026 13:06:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1778591211; bh=qaSP70ZhrUcMPjOf7+v4uq6SslBv0gdUuCOqJYZwmRw=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=pQeL45EGMMkkR6d7G7LBMF0VlrOkqA0tcNxnr+YznAazoNdSc7rZTVzUJ30GA6oo2 Ts721O+0+w86MNdNL8L73bcHjmkE1laeHwZzWV992dHmWXkxtE12abU6xWBpx9FIQW fHRfAkVbbskSLKKVVke+srvwp2libZKQ0W16z4AUlSvbN97Wv89Pjv2mYJqNi16OL4 NTzWjHBdgf2p0bZOasLm/VpaT/ScSlepRBZFU53xOyeDnB8ChprjoM3xoqVIRRYHVO NwQ9kw641hgoTQoGzW4iqFgKhsr6rPy93UGy3gtTODH7LWon7tvTCcm5+MI0+7NkaX d6esck+b+vEJQ== From: Maxime Ripard Date: Tue, 12 May 2026 15:06:11 +0200 Subject: [PATCH v4 13/20] drm/atomic-state-helper: Rename __drm_atomic_helper_connector_state_reset() Precedence: bulk X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20260512-drm-mode-config-init-v4-13-591dfdcc1bf9@kernel.org> References: <20260512-drm-mode-config-init-v4-0-591dfdcc1bf9@kernel.org> In-Reply-To: <20260512-drm-mode-config-init-v4-0-591dfdcc1bf9@kernel.org> To: Maarten Lankhorst , Thomas Zimmermann , David Airlie , Simona Vetter , Jonathan Corbet , Shuah Khan , Dmitry Baryshkov , Jyri Sarha , Tomi Valkeinen , Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Simon Ser , Harry Wentland , Melissa Wen , Sebastian Wick , Alex Hung , Jani Nikula , Rodrigo Vivi , Joonas Lahtinen , Tvrtko Ursulin , Chen-Yu Tsai , Samuel Holland , Dave Stevenson , =?utf-8?q?Ma=C3=ADra_Canal?= , Raspberry Pi Kernel Maintenance Cc: dri-devel@lists.freedesktop.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, Daniel Stone , intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, Maxime Ripard , Laurent Pinchart , Laurent Pinchart X-Mailer: b4 0.14.3 X-Developer-Signature: v=1; a=openpgp-sha256; l=4078; i=mripard@kernel.org; h=from:subject:message-id; bh=qaSP70ZhrUcMPjOf7+v4uq6SslBv0gdUuCOqJYZwmRw=; b=owGbwMvMwCmsHn9OcpHtvjLG02pJDFnMqgc0J6xx8alSWHLszQbm5BimS3KP/2j9Zc6+sGeNy NUNq2e2dkxlYRDmZJAVU2R5IhN2enn74ioH+5U/YOawMoEMYeDiFICJZD9nbNiz+LzkY6Pd05ZP MrSWZ+V1bPOyVW8Lrf21xL0+Y5m2/Oyq/TKGp7/+lb+lvcCqVlFAhLFhdrrg7q+e10yXXd/idDI 82EZAcRvvx8v75ju0is1byDuptIrh7YmARWanLd73BOkFmNwCAA== X-Developer-Key: i=mripard@kernel.org; a=openpgp; fpr=BE5675C37E818C8B5764241C254BCFC56BF6CE8D __drm_atomic_helper_connector_state_reset() is used to initialize a newly allocated drm_connector_state, and is being typically called by the drm_connector_funcs.reset implementation. Since we want to consolidate DRM objects state allocation around the atomic_create_state callback that will only allocate and initialize a new drm_connector_state instance, we will need to call __drm_atomic_helper_connector_state_reset() from both the reset and atomic_create hooks. To avoid any confusion, we can thus rename __drm_atomic_helper_connector_state_reset() to __drm_atomic_helper_connector_state_init(). Suggested-by: Laurent Pinchart Reviewed-by: Dmitry Baryshkov Reviewed-by: Thomas Zimmermann Reviewed-by: Laurent Pinchart Signed-off-by: Maxime Ripard --- drivers/gpu/drm/drm_atomic_state_helper.c | 12 ++++++------ include/drm/drm_atomic_state_helper.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/drm_atomic_state_helper.c b/drivers/gpu/drm/drm_atomic_state_helper.c index 8762171c9432..e2e5a1b8a820 100644 --- a/drivers/gpu/drm/drm_atomic_state_helper.c +++ b/drivers/gpu/drm/drm_atomic_state_helper.c @@ -474,24 +474,24 @@ void drm_atomic_helper_plane_destroy_state(struct drm_plane *plane, kfree(state); } EXPORT_SYMBOL(drm_atomic_helper_plane_destroy_state); /** - * __drm_atomic_helper_connector_state_reset - reset the connector state + * __drm_atomic_helper_connector_state_init - Initialize the connector state * @conn_state: atomic connector state, must not be NULL - * @connector: connectotr object, must not be NULL + * @connector: connector object, must not be NULL * * Initializes the newly allocated @conn_state with default * values. This is useful for drivers that subclass the connector state. */ void -__drm_atomic_helper_connector_state_reset(struct drm_connector_state *conn_state, - struct drm_connector *connector) +__drm_atomic_helper_connector_state_init(struct drm_connector_state *conn_state, + struct drm_connector *connector) { conn_state->connector = connector; } -EXPORT_SYMBOL(__drm_atomic_helper_connector_state_reset); +EXPORT_SYMBOL(__drm_atomic_helper_connector_state_init); /** * __drm_atomic_helper_connector_reset - reset state on connector * @connector: drm connector * @conn_state: connector state to assign @@ -506,11 +506,11 @@ EXPORT_SYMBOL(__drm_atomic_helper_connector_state_reset); void __drm_atomic_helper_connector_reset(struct drm_connector *connector, struct drm_connector_state *conn_state) { if (conn_state) - __drm_atomic_helper_connector_state_reset(conn_state, connector); + __drm_atomic_helper_connector_state_init(conn_state, connector); connector->state = conn_state; } EXPORT_SYMBOL(__drm_atomic_helper_connector_reset); diff --git a/include/drm/drm_atomic_state_helper.h b/include/drm/drm_atomic_state_helper.h index 213f7e298008..9634a70e0401 100644 --- a/include/drm/drm_atomic_state_helper.h +++ b/include/drm/drm_atomic_state_helper.h @@ -68,11 +68,11 @@ struct drm_plane_state * drm_atomic_helper_plane_duplicate_state(struct drm_plane *plane); void __drm_atomic_helper_plane_destroy_state(struct drm_plane_state *state); void drm_atomic_helper_plane_destroy_state(struct drm_plane *plane, struct drm_plane_state *state); -void __drm_atomic_helper_connector_state_reset(struct drm_connector_state *conn_state, +void __drm_atomic_helper_connector_state_init(struct drm_connector_state *conn_state, struct drm_connector *connector); void __drm_atomic_helper_connector_reset(struct drm_connector *connector, struct drm_connector_state *conn_state); void drm_atomic_helper_connector_reset(struct drm_connector *connector); void drm_atomic_helper_connector_tv_reset(struct drm_connector *connector); -- 2.54.0