From patchwork Thu Dec 14 10:09:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 13492699 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 B7CC6C4332F for ; Thu, 14 Dec 2023 10:09:43 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1B5C810E918; Thu, 14 Dec 2023 10:09:42 +0000 (UTC) Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by gabe.freedesktop.org (Postfix) with ESMTPS id 195D110E911 for ; Thu, 14 Dec 2023 10:09:31 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id 551626216A; Thu, 14 Dec 2023 10:09:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A444DC433C7; Thu, 14 Dec 2023 10:09:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1702548570; bh=5bqkfAelbOTqlj5Ldp8Y2gweUJ+1X2cnM1h4FqoT81E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jig6IJ2m6JI9PvNPwgL1UnLjpkqTkTKDtMGl3w4StOKNRS9250mkgr0LgwPHmP0wW 4Et9rWN5C/EeY8AhRZibmHhBwDox7TYMCAMfBI+mj1AP0JQWS0LMCgX/f9wf/gxlrg 2SO1D9AtTcshCEPptFVJNjUGRm8nLSbV6Z5iBjZru+woy1QNmpovcZzgAypljGRILY ks4KNC9oUl9UH+VUYta9hygzdZivthoYaNaqTIkKdqkvJGB47QIz7HNOC6gzpCAUN/ nsBIfdDWfV8OQYb4hjkU9Y3uGakoL2GxtrKor7IT3xSJWEkXdzRPWIT48GsxnZ6CVW NnP3mOiHy34bQ== From: Maxime Ripard To: Daniel Vetter , David Airlie , Maarten Lankhorst , Thomas Zimmermann , Maxime Ripard Subject: [PATCH v2 4/5] drm/atomic: Make the drm_atomic_state documentation less ambiguous Date: Thu, 14 Dec 2023 11:09:15 +0100 Message-ID: <20231214100917.277842-4-mripard@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231214100917.277842-1-mripard@kernel.org> References: <20231214100917.277842-1-mripard@kernel.org> MIME-Version: 1.0 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: Pekka Paalanen , dri-devel@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" The current documentation of drm_atomic_state says that it's the "global state object". This is confusing since, while it does contain all the objects affected by an update and their respective states, if an object isn't affected by this update it won't be part of it. Thus, it's not truly a "global state", unlike object state structures that do contain the entire state of a given object. Signed-off-by: Maxime Ripard Reviewed-by: Hamza Mahfooz Acked-by: Pekka Paalanen --- include/drm/drm_atomic.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h index 914574b58ae7..5df67e587816 100644 --- a/include/drm/drm_atomic.h +++ b/include/drm/drm_atomic.h @@ -346,7 +346,13 @@ struct __drm_private_objs_state { }; /** - * struct drm_atomic_state - the global state object for atomic updates + * struct drm_atomic_state - Atomic commit structure + * + * This structure is the kernel counterpart of @drm_mode_atomic and represents + * an atomic commit that transitions from an old to a new display state. It + * contains all the objects affected by an atomic commits and both the new + * state structures and pointers to the old state structures for + * these. * * States are added to an atomic update by calling drm_atomic_get_crtc_state(), * drm_atomic_get_plane_state(), drm_atomic_get_connector_state(), or for