From patchwork Fri May 31 20:37:46 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Ravnborg via B4 Relay X-Patchwork-Id: 13682143 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 7CB7DC25B75 for ; Fri, 31 May 2024 20:38:02 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id BC22710E2A1; Fri, 31 May 2024 20:38:01 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="h9F41wSU"; dkim-atps=neutral Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by gabe.freedesktop.org (Postfix) with ESMTPS id F128810E2A1 for ; Fri, 31 May 2024 20:37:47 +0000 (UTC) Received: from smtp.kernel.org (transwarp.subspace.kernel.org [100.75.92.58]) by dfw.source.kernel.org (Postfix) with ESMTP id E79F360C01; Fri, 31 May 2024 20:37:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPS id 60A01C4AF09; Fri, 31 May 2024 20:37:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1717187866; bh=WY531ZFWnLngKD/+q6EMBQ80fsxU9iBEBmfNN0fASI0=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=h9F41wSUTOvzpThewcM4UF1PqEF9QEJ1Sa6H5Yi2OEH/S4eFxd0v6Hd/YbbOQ5zYJ hchmcaUZnP0ak+JWCK4oS7sdrouSK+ThkaT4I7G8WQ4IgfjAvWZ6X6+bYiZXB+QZhP pKEUuVepzPqWGSe7gxc/MpUPuLC0AJRC2oeHQb++2+diZ4tuy5W32fXjAp5Prguish /gcKj+q3vpRfFzagmFXTFi+3VR4S5rMmF2Z337zZNcf+ShDPY3scAyTqi/O447biSI EUaUEuPrgLaiRhZ88ySL+2a+a1zlYM65R3B3YZTBRZSpULbnXAuKhu2Tz4ZmxqREvs a4s8D0OoJzfTg== Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id 554E9C27C51; Fri, 31 May 2024 20:37:46 +0000 (UTC) From: Sam Ravnborg via B4 Relay Date: Fri, 31 May 2024 22:37:46 +0200 Subject: [PATCH 2/2] drm/bridge: Drop drm_bridge_chain_mode_fixup MIME-Version: 1.0 Message-Id: <20240531-bridge_chain_mode-v1-2-8b49e36c5dd3@ravnborg.org> References: <20240531-bridge_chain_mode-v1-0-8b49e36c5dd3@ravnborg.org> In-Reply-To: <20240531-bridge_chain_mode-v1-0-8b49e36c5dd3@ravnborg.org> To: dri-devel@lists.freedesktop.org, Andrzej Hajda , Neil Armstrong , Robert Foss , Laurent Pinchart , Jonas Karlman , Jernej Skrabec Cc: Sam Ravnborg , Maxime Ripard , Laurent Pinchart , Laurent Pinchart , Maarten Lankhorst , Thomas Zimmermann , David Airlie , Daniel Vetter X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1717187865; l=2934; i=sam@ravnborg.org; s=20230107; h=from:subject:message-id; bh=xm7f++qnfzJgiUWk6f8lnMbUPrsPBwFJAzI7MRE8MMU=; b=CYV+punnp4i5EnYOF7WM7p5Tr4giEsg9rQzS+q54fSTqfQKj23xN+cQ8ABZfaxDnbquEbl+6FoCW 5FR+KJ7MAX4qOtndDEElXMeSxZvkijk2u4hK5hiv1rVSiF1eblpM X-Developer-Key: i=sam@ravnborg.org; a=ed25519; pk=R0+pqV7BRYOAeOIGkyOrSNke7arx5y3LkEuNi37YEyU= X-Endpoint-Received: by B4 Relay for sam@ravnborg.org/20230107 with auth_id=22 X-Original-From: Sam Ravnborg 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: , Reply-To: sam@ravnborg.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Sam Ravnborg There are no users left of drm_bridge_chain_mode_fixup() and we do not want to have this function available, so drop it. Signed-off-by: Sam Ravnborg Reviewed-by: Maxime Ripard Reviewed-by: Laurent Pinchart Cc: Laurent Pinchart Cc: Maarten Lankhorst Cc: Maxime Ripard Cc: Thomas Zimmermann Cc: David Airlie Cc: Daniel Vetter --- drivers/gpu/drm/drm_bridge.c | 37 ------------------------------------- include/drm/drm_bridge.h | 3 --- 2 files changed, 40 deletions(-) diff --git a/drivers/gpu/drm/drm_bridge.c b/drivers/gpu/drm/drm_bridge.c index 584d109330ab..d44f055dbe3e 100644 --- a/drivers/gpu/drm/drm_bridge.c +++ b/drivers/gpu/drm/drm_bridge.c @@ -467,43 +467,6 @@ void drm_bridge_detach(struct drm_bridge *bridge) * needed, in order to gradually transition to the new model. */ -/** - * drm_bridge_chain_mode_fixup - fixup proposed mode for all bridges in the - * encoder chain - * @bridge: bridge control structure - * @mode: desired mode to be set for the bridge - * @adjusted_mode: updated mode that works for this bridge - * - * Calls &drm_bridge_funcs.mode_fixup for all the bridges in the - * encoder chain, starting from the first bridge to the last. - * - * Note: the bridge passed should be the one closest to the encoder - * - * RETURNS: - * true on success, false on failure - */ -bool drm_bridge_chain_mode_fixup(struct drm_bridge *bridge, - const struct drm_display_mode *mode, - struct drm_display_mode *adjusted_mode) -{ - struct drm_encoder *encoder; - - if (!bridge) - return true; - - encoder = bridge->encoder; - list_for_each_entry_from(bridge, &encoder->bridge_chain, chain_node) { - if (!bridge->funcs->mode_fixup) - continue; - - if (!bridge->funcs->mode_fixup(bridge, mode, adjusted_mode)) - return false; - } - - return true; -} -EXPORT_SYMBOL(drm_bridge_chain_mode_fixup); - /** * drm_bridge_chain_mode_valid - validate the mode against all bridges in the * encoder chain. diff --git a/include/drm/drm_bridge.h b/include/drm/drm_bridge.h index 4baca0d9107b..5cf41f92d1f0 100644 --- a/include/drm/drm_bridge.h +++ b/include/drm/drm_bridge.h @@ -855,9 +855,6 @@ drm_bridge_chain_get_first_bridge(struct drm_encoder *encoder) #define drm_for_each_bridge_in_chain(encoder, bridge) \ list_for_each_entry(bridge, &(encoder)->bridge_chain, chain_node) -bool drm_bridge_chain_mode_fixup(struct drm_bridge *bridge, - const struct drm_display_mode *mode, - struct drm_display_mode *adjusted_mode); enum drm_mode_status drm_bridge_chain_mode_valid(struct drm_bridge *bridge, const struct drm_display_info *info,