From patchwork Tue Feb 18 14:49:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boris Brezillon X-Patchwork-Id: 11388773 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 32375138D for ; Tue, 18 Feb 2020 14:49:20 +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 1A62420658 for ; Tue, 18 Feb 2020 14:49:20 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1A62420658 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 803776E30E; Tue, 18 Feb 2020 14:49:18 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by gabe.freedesktop.org (Postfix) with ESMTPS id 4D03D6E30E for ; Tue, 18 Feb 2020 14:49:17 +0000 (UTC) Received: from localhost.localdomain (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 E910E2940B9; Tue, 18 Feb 2020 14:49:15 +0000 (GMT) From: Boris Brezillon To: dri-devel@lists.freedesktop.org Subject: [PATCH] drm/bridge: Fix the bridge kernel doc Date: Tue, 18 Feb 2020 15:49:13 +0100 Message-Id: <20200218144913.593165-1-boris.brezillon@collabora.com> X-Mailer: git-send-email 2.24.1 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 , Neil Armstrong Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Commit 751465913f04 ("drm/bridge: Add a drm_bridge_state object") introduced new helpers and hooks but the kernel was slightly broken. Fix that now. Fixes: 751465913f04 ("drm/bridge: Add a drm_bridge_state object") Signed-off-by: Boris Brezillon --- drivers/gpu/drm/drm_atomic.c | 5 +++-- include/drm/drm_atomic.h | 2 +- include/drm/drm_bridge.h | 15 ++++++++------- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/drm_atomic.c b/drivers/gpu/drm/drm_atomic.c index 65c46ed049c5..e2093abae526 100644 --- a/drivers/gpu/drm/drm_atomic.c +++ b/drivers/gpu/drm/drm_atomic.c @@ -1098,8 +1098,9 @@ EXPORT_SYMBOL(drm_atomic_get_new_bridge_state); * * This function adds all bridges attached to @encoder. This is needed to add * bridge states to @state and make them available when - * &bridge_funcs.atomic_{check,pre_enable,enable,disable_post_disable}() are - * called + * &bridge_funcs.atomic_check(), &bridge_funcs.atomic_pre_enable, + * &bridge_funcs.atomic_enable, &bridge_funcs.atomic_disable_post_disable}() + * are called * * Returns: * 0 on success or can fail with -EDEADLK or -ENOMEM. When the error is EDEADLK diff --git a/include/drm/drm_atomic.h b/include/drm/drm_atomic.h index 52d65a055491..7b6cb4774e7d 100644 --- a/include/drm/drm_atomic.h +++ b/include/drm/drm_atomic.h @@ -1016,7 +1016,7 @@ struct drm_bus_cfg { * @format: format used on this bus (one of the MEDIA_BUS_FMT_* format) * * This field should not be directly modified by drivers - * (&drm_atomic_bridge_chain_select_bus_fmts() takes care of the bus + * (drm_atomic_bridge_chain_select_bus_fmts() takes care of the bus * format negotiation). */ u32 format; diff --git a/include/drm/drm_bridge.h b/include/drm/drm_bridge.h index 45626ecf20f8..999faaaab9a1 100644 --- a/include/drm/drm_bridge.h +++ b/include/drm/drm_bridge.h @@ -349,9 +349,9 @@ struct drm_bridge_funcs { * Duplicate the current bridge state object (which is guaranteed to be * non-NULL). * - * The atomic_duplicate_state() 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 optional. When not implemented + * the core allocates a drm_bridge_state object and calls + * __drm_atomic_helper_bridge_duplicate_state() to initialize it. * * RETURNS: * A valid drm_bridge_state object or NULL if the allocation fails. @@ -407,11 +407,11 @@ struct drm_bridge_funcs { * Formats listed in the returned array should be listed in decreasing * preference order (the core will try all formats until it finds one * that works). When the format is not supported NULL should be - * returned and *num_output_fmts should be set to 0. + * returned and num_output_fmts should be set to 0. * * This method is called on all elements of the bridge chain as part of * the bus format negotiation process that happens in - * &drm_atomic_bridge_chain_select_bus_fmts(). + * drm_atomic_bridge_chain_select_bus_fmts(). * This method is optional. When not implemented, the core will bypass * bus format negotiation on this element of the bridge without * failing, and the previous element in the chain will be passed @@ -478,9 +478,10 @@ struct drm_bridge_funcs { * * Note that the atomic_reset() semantics is not exactly matching the * reset() semantics found on other components (connector, plane, ...). - * 1/ The reset operation happens when the bridge is attached, not when + * + * 1. The reset operation happens when the bridge is attached, not when * drm_mode_config_reset() is called - * 2/ It's meant to be used exclusively on bridges that have been + * 2. It's meant to be used exclusively on bridges that have been * converted to the ATOMIC API * * RETURNS: