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 24F97CA0FE8 for ; Mon, 25 Aug 2025 15:01:25 +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-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=nhErUzttdF5vRfHvP4npN1YHMDyA1seKADkpWdwk2G8=; b=vLDD/jw3rYzRyi pzBqJ5M0Xp0S8+/a/lq16/5kAZR7+hWLEIF2O47MnHBPZFjbhrsJvKyAKhAjlh7nZJm2vx489lzRQ 87zQxY7aDTvNcC5qc7sUZAtaIaew6TUhgwC5XygQ7r9FjczuWdnH7PIn66bFDotggx12L0frl00wD +9mK0klLoPdRgUtj25Zwg4jwGwIh1qD2VKgdsycdkeqOuR+lxNjmBDaueZehdD5KgiMj1ib8ZyL42 UVGoYNKW+f2QzpkhrX0cH1vQ8ZKvqRINDZmu+vsr3uA5+BIpnf6SsbCLOkRsBsC+sBYnnyVJmpM2D 0JnuazUpC1rlvwFkeNFQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1uqYhC-00000008OJw-48Sw; Mon, 25 Aug 2025 15:01:19 +0000 Received: from dfw.source.kernel.org ([139.178.84.217]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1uqXUE-000000087Sn-0tpj; Mon, 25 Aug 2025 13:43:51 +0000 Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id A15405C5DC1; Mon, 25 Aug 2025 13:43:49 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E63F9C19421; Mon, 25 Aug 2025 13:43:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1756129429; bh=wk0b8XpwPxcYQ3noQMP9GONlP4C4Be6y8QzZeFkyZik=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=TNLr/eqZS5Z5YnxUeOhVHiHkvHvTkPfq6dRrv+J0eaL13OfGotbCDFdtrYU17Psj2 CGX+ig2ydR3YjaxgJD6RCVskBi/KqVQcJAfF85oMmqynJ2mAqd6k8MMJB4zAcmHlKx 0kPw3FGXEZvbQfDbSxGs/EeuNVEzesMvWw014OhX3oRFZ9V6teLe7xB73Rxl7eZZdP dZJK9hZmIWf935nEi7cvWg6+QflYB8Qcjn4JW4Jt6+vcQl9SHSCsh4BE/xRYw0iBYd 4wc3gBrx20XdyoTxrsvYCzob9TOo4bZvl/cWmWK/kycZ4M1boz9akiSv7VR6thFTt2 /lxt7tx/Lcvog== From: Maxime Ripard Date: Mon, 25 Aug 2025 15:43:10 +0200 Subject: [PATCH 05/39] drm/atomic: Document __drm_connectors_state state pointer MIME-Version: 1.0 Message-Id: <20250825-drm-no-more-existing-state-v1-5-f08ccd9f85c9@kernel.org> References: <20250825-drm-no-more-existing-state-v1-0-f08ccd9f85c9@kernel.org> In-Reply-To: <20250825-drm-no-more-existing-state-v1-0-f08ccd9f85c9@kernel.org> To: Maarten Lankhorst , Thomas Zimmermann , David Airlie , Simona Vetter , Louis Chauvet , Haneen Mohammed , Melissa Wen , Jyri Sarha , Tomi Valkeinen , Paul Cercueil , Liviu Dudau , Russell King , Manikandan Muralidharan , Dharma Balasubiramani , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea , Inki Dae , Seung-Woo Kim , Kyungmin Park , Krzysztof Kozlowski , Alim Akhtar , Liu Ying , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Laurentiu Palcu , Lucas Stach , Philipp Zabel , Anitha Chrisanthus , Edmund Dea , Paul Kocialkowski , Sui Jingfeng , Chun-Kuang Hu , Matthias Brugger , AngeloGioacchino Del Regno , Rob Clark , Dmitry Baryshkov , Abhinav Kumar , Jessica Zhang , Sean Paul , Marijn Suijten , Sandy Huang , =?utf-8?q?Heiko_St=C3=BCbner?= , Andy Yan , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Thierry Reding , Mikko Perttunen , Jonathan Hunter , Hans de Goede , Dave Stevenson , =?utf-8?q?Ma=C3=ADra_Canal?= , Raspberry Pi Kernel Maintenance Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, linux-mips@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-samsung-soc@vger.kernel.org, imx@lists.linux.dev, linux-mediatek@lists.infradead.org, linux-arm-msm@vger.kernel.org, freedreno@lists.freedesktop.org, linux-rockchip@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-tegra@vger.kernel.org, Maxime Ripard X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=1590; i=mripard@kernel.org; h=from:subject:message-id; bh=wk0b8XpwPxcYQ3noQMP9GONlP4C4Be6y8QzZeFkyZik=; b=owGbwMvMwCmsHn9OcpHtvjLG02pJDBlrMkpsFz4STLt/pPDOz5CsKmlWm7e+UmcNrFidjyrn6 mnPELrdMZWFQZiTQVZMkeWJTNjp5e2LqxzsV/6AmcPKBDKEgYtTACaiMImxYW3Gu1vP5V+wcj6q NGtUkPrZOeO+p2bbzcjqLm62d6/yJp3Z/nK7Ay/HxNch2SbWTbuWMTbMKnLYcC64JKft16ZaL+M tPFyTFi8qVgi/0G+3T9riBJf3p0PHVvotOjOHd7n8N656jTwA X-Developer-Key: i=mripard@kernel.org; a=openpgp; fpr=BE5675C37E818C8B5764241C254BCFC56BF6CE8D X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250825_064350_334893_93AD8A6E X-CRM114-Status: GOOD ( 15.96 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+linux-rockchip=archiver.kernel.org@lists.infradead.org While the old and new state pointers are somewhat self-explanatory, the state pointer and its relation to the other two really isn't. Now that we've cleaned up everything and it isn't used in any modesetting path, we can document what it's still useful for: to free the right state when we free the global state. Signed-off-by: Maxime Ripard --- include/drm/drm_atomic.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h index 321c866d5b0a46df7a9adbbf5e4cabd1ff987aad..798d33b50ef7497ce938ce3dbabee32487dda2d6 100644 --- a/include/drm/drm_atomic.h +++ b/include/drm/drm_atomic.h @@ -180,11 +180,26 @@ struct __drm_crtcs_state { u64 last_vblank_count; }; struct __drm_connnectors_state { struct drm_connector *ptr; - struct drm_connector_state *state, *old_state, *new_state; + + /** + * @state: + * + * Used to track the @drm_connector_state we will need to free + * when tearing down the associated &drm_atomic_state. + * + * Before a commit, and the call to + * drm_atomic_helper_swap_state() in particular, it points to + * the same state than @new_state. After a commit, it points to + * the same state than @old_state. + */ + struct drm_connector_state *state; + + struct drm_connector_state *old_state, *new_state; + /** * @out_fence_ptr: * * User-provided pointer which the kernel uses to return a sync_file * file descriptor. Used by writeback connectors to signal completion of -- 2.50.1 _______________________________________________ Linux-rockchip mailing list Linux-rockchip@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-rockchip