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 X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BDF08C35E01 for ; Tue, 25 Feb 2020 15:28:40 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 9C94821744 for ; Tue, 25 Feb 2020 15:28:40 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9C94821744 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=collabora.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 16DE26EB33; Tue, 25 Feb 2020 15:28:40 +0000 (UTC) Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by gabe.freedesktop.org (Postfix) with ESMTPS id 02A816EB31 for ; Tue, 25 Feb 2020 15:28:38 +0000 (UTC) Received: from localhost (unknown [IPv6:2a01:e0a:2c:6930:5cf4:84a1:2763:fe0d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: bbrezillon) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id 6A8DF294F57; Tue, 25 Feb 2020 15:28:37 +0000 (GMT) Date: Tue, 25 Feb 2020 16:28:35 +0100 From: Boris Brezillon To: Laurent Pinchart Subject: Re: [PATCH v7 05/54] drm/bridge: Fix atomic state ops documentation Message-ID: <20200225162835.3974a852@collabora.com> In-Reply-To: <20200222150106.22919-6-laurent.pinchart@ideasonboard.com> References: <20200222150106.22919-1-laurent.pinchart@ideasonboard.com> <20200222150106.22919-6-laurent.pinchart@ideasonboard.com> Organization: Collabora X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) 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: Boris Brezillon , Sebastian Reichel , dri-devel@lists.freedesktop.org, Tomi Valkeinen , Sam Ravnborg Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Sat, 22 Feb 2020 17:00:17 +0200 Laurent Pinchart wrote: > The drm_bridge_funcs atomic_state_duplicate and atomic_state_destroy > operations are erroneously documented as having a default implementation > if not implemented in bridge drivers. This isn't correct, fix the > documentation. Oops, looks like a leftover from a previous version. Thanks for fixing that. Reviewed-by: Boris Brezillon > > Signed-off-by: Laurent Pinchart > --- > include/drm/drm_bridge.h | 20 ++++++++++++++------ > 1 file changed, 14 insertions(+), 6 deletions(-) > > diff --git a/include/drm/drm_bridge.h b/include/drm/drm_bridge.h > index 999faaaab9a1..38de129d5947 100644 > --- a/include/drm/drm_bridge.h > +++ b/include/drm/drm_bridge.h > @@ -349,9 +349,11 @@ struct drm_bridge_funcs { > * Duplicate the current bridge state object (which is guaranteed to be > * non-NULL). > * > - * The atomic_duplicate_state() hook is optional. When not implemented > - * the core allocates a drm_bridge_state object and calls > - * __drm_atomic_helper_bridge_duplicate_state() to initialize it. > + * The atomic_duplicate_state hook is mandatory if the bridge > + * implements any of the atomic hooks, and should be left unassigned > + * otherwise. For bridges that don't subclass &drm_bridge_state, the > + * drm_atomic_helper_bridge_duplicate_state() helper function shall be > + * used to implement this hook. > * > * RETURNS: > * A valid drm_bridge_state object or NULL if the allocation fails. > @@ -364,8 +366,11 @@ struct drm_bridge_funcs { > * Destroy a bridge state object previously allocated by > * &drm_bridge_funcs.atomic_duplicate_state(). > * > - * The atomic_destroy_state hook is optional. When not implemented the > - * core calls kfree() on the state. > + * The atomic_destroy_state hook is mandatory if the bridge implements > + * any of the atomic hooks, and should be left unassigned otherwise. > + * For bridges that don't subclass &drm_bridge_state, the > + * drm_atomic_helper_bridge_destroy_state() helper function shall be > + * used to implement this hook. > */ > void (*atomic_destroy_state)(struct drm_bridge *bridge, > struct drm_bridge_state *state); > @@ -474,7 +479,10 @@ struct drm_bridge_funcs { > * This function is called at attach time. > * > * The atomic_reset hook is mandatory if the bridge implements any of > - * the atomic hooks, and should be left unassigned otherwise. > + * the atomic hooks, and should be left unassigned otherwise. For > + * bridges that don't subclass &drm_bridge_state, the > + * drm_atomic_helper_bridge_reset() helper function shall be used to > + * implement this hook. > * > * Note that the atomic_reset() semantics is not exactly matching the > * reset() semantics found on other components (connector, plane, ...). _______________________________________________ dri-devel mailing list dri-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/dri-devel