From patchwork Thu Feb 24 19:58:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 12759186 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 01042C433EF for ; Thu, 24 Feb 2022 19:59:17 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 4C72310E391; Thu, 24 Feb 2022 19:58:58 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) by gabe.freedesktop.org (Postfix) with ESMTPS id D5A1010E299 for ; Thu, 24 Feb 2022 19:58:53 +0000 (UTC) Received: from tr.lan (ip-89-176-112-137.net.upcbroadband.cz [89.176.112.137]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id 086C683CC5; Thu, 24 Feb 2022 20:58:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1645732732; bh=ru+z8ZlhHa+Zl9POBIrXmR2W5+rs4kCC6IS0on0DKqw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=T82zTPYSkE6J65HNlVSuuMjt/FNmCm0oMXLhxjIUZ00jxEg4xyiu8j+Lkq9xsUOBJ ibyvndK5wHNejGo1VKTY7yDiPa0NEXICCcSGiV8vRrG3Tc3iOclQIT7v+jjdUkdRsW zi2Pnw7o7Y87hN0G6EK+7XgoxG3UynE01HcKv9bSBnMqvzm/kJdv4hY9ZubJ2jp8tq ewKXlpjB+NFNmrzWWYhZKP8WETVJl3h9sRhiYKPOyJRITBasndPBp7fHbwycOLeNPK AMJzQk6AkbQ1jIh8ouwqcgMuT9n3ZgKBpfAeESM+t2FTMYQnVzWNxbmA9leEnanXsE 8ooMuIt7Fv7AQ== From: Marek Vasut To: dri-devel@lists.freedesktop.org Subject: [PATCH V3 04/12] drm/bridge: tc358767: Convert to atomic ops Date: Thu, 24 Feb 2022 20:58:09 +0100 Message-Id: <20220224195817.68504-5-marex@denx.de> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220224195817.68504-1-marex@denx.de> References: <20220224195817.68504-1-marex@denx.de> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean 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: Marek Vasut , Neil Armstrong , Jonas Karlman , Laurent Pinchart , Sam Ravnborg , Maxime Ripard Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Use the atomic version of the enable/disable operations to continue the transition to the atomic API. This will be needed to access the mode from the atomic state. Reviewed-by: Lucas Stach Signed-off-by: Marek Vasut Cc: Jonas Karlman Cc: Laurent Pinchart Cc: Maxime Ripard Cc: Neil Armstrong Cc: Sam Ravnborg --- V2: - New patch V3: - Add RB from Lucas --- drivers/gpu/drm/bridge/tc358767.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c index 23e0280f484de..f88d8e616f7f8 100644 --- a/drivers/gpu/drm/bridge/tc358767.c +++ b/drivers/gpu/drm/bridge/tc358767.c @@ -1234,7 +1234,9 @@ static int tc_edp_stream_disable(struct tc_data *tc) return 0; } -static void tc_edp_bridge_enable(struct drm_bridge *bridge) +static void +tc_edp_bridge_atomic_enable(struct drm_bridge *bridge, + struct drm_bridge_state *old_bridge_state) { struct tc_data *tc = bridge_to_tc(bridge); int ret; @@ -1259,7 +1261,9 @@ static void tc_edp_bridge_enable(struct drm_bridge *bridge) } } -static void tc_edp_bridge_disable(struct drm_bridge *bridge) +static void +tc_edp_bridge_atomic_disable(struct drm_bridge *bridge, + struct drm_bridge_state *old_bridge_state) { struct tc_data *tc = bridge_to_tc(bridge); int ret; @@ -1459,11 +1463,14 @@ static const struct drm_bridge_funcs tc_edp_bridge_funcs = { .detach = tc_edp_bridge_detach, .mode_valid = tc_edp_mode_valid, .mode_set = tc_bridge_mode_set, - .enable = tc_edp_bridge_enable, - .disable = tc_edp_bridge_disable, + .atomic_enable = tc_edp_bridge_atomic_enable, + .atomic_disable = tc_edp_bridge_atomic_disable, .mode_fixup = tc_bridge_mode_fixup, .detect = tc_bridge_detect, .get_edid = tc_get_edid, + .atomic_duplicate_state = drm_atomic_helper_bridge_duplicate_state, + .atomic_destroy_state = drm_atomic_helper_bridge_destroy_state, + .atomic_reset = drm_atomic_helper_bridge_reset, }; static bool tc_readable_reg(struct device *dev, unsigned int reg)