From patchwork Tue Mar 29 08:50:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 12794563 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 5F03BC433EF for ; Tue, 29 Mar 2022 08:50:59 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 29FC410E7EF; Tue, 29 Mar 2022 08:50:52 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) by gabe.freedesktop.org (Postfix) with ESMTPS id 495E110E7DF for ; Tue, 29 Mar 2022 08:50:41 +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 A2EBB83FBB; Tue, 29 Mar 2022 10:50:39 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1648543840; bh=IApG7eoUchPFW3V22IPv/cmNk9iRoQZ1MxYVusVaMhI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HaJ6r2guTBD2kuOhZRQiNqw1youAumZtNiVvVs2qyYOPOJiPG5i4qOYCb9UG+AF8T R+nbRKYFLXnyHtci9s3ChFSWvOD84rRPE8GEr3CymLSp6MUIRt4KzzM10eF7/VIvEA d+9JAHwYmY6xjvSTZfCcZv+AXT7LPzC/+nBAUqig8AYE0TcnPuQvlFVySKm9XU/kYq gryGBXwAOqycZNKzRFOMxk1S7Hy4879Gbscbx7fwjP7MIBQbrctRRPX2zUx8tbX0YB jZplupTIGTal52VsZgn786mMkWxsJJg3mx7+q+U+bAI39lKuhBr+c2o1HoYAB3TT1j dJZZdJd/huSsQ== From: Marek Vasut To: dri-devel@lists.freedesktop.org Subject: [PATCH v5 08/11] drm/bridge: tc358767: Move bridge ops setup into tc_probe_edp_bridge_endpoint() Date: Tue, 29 Mar 2022 10:50:12 +0200 Message-Id: <20220329085015.39159-9-marex@denx.de> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220329085015.39159-1-marex@denx.de> References: <20220329085015.39159-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" The bridge ops are specific to the bridge configuration, move them into tc_probe_edp_bridge_endpoint() to permit cleaner addition of DSI-to-DPI mode. No functional change. Reviewed-by: Lucas Stach Tested-by: Lucas Stach # In both DPI to eDP and DSI to DPI mode. Signed-off-by: Marek Vasut Cc: Jonas Karlman Cc: Laurent Pinchart Cc: Maxime Ripard Cc: Neil Armstrong Cc: Sam Ravnborg --- V2: - New patch V3: - No change V4: - Add RB/TB from Lucas V5: - No change --- drivers/gpu/drm/bridge/tc358767.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c index 8a8b495aa0ad1..8c468f77618d2 100644 --- a/drivers/gpu/drm/bridge/tc358767.c +++ b/drivers/gpu/drm/bridge/tc358767.c @@ -1613,6 +1613,11 @@ static int tc_probe_edp_bridge_endpoint(struct tc_data *tc) tc->bridge.type = DRM_MODE_CONNECTOR_DisplayPort; } + tc->bridge.funcs = &tc_edp_bridge_funcs; + if (tc->hpd_pin >= 0) + tc->bridge.ops |= DRM_BRIDGE_OP_DETECT; + tc->bridge.ops |= DRM_BRIDGE_OP_EDID; + return ret; } @@ -1742,11 +1747,6 @@ static int tc_probe(struct i2c_client *client, const struct i2c_device_id *id) if (ret) return ret; - tc->bridge.funcs = &tc_edp_bridge_funcs; - if (tc->hpd_pin >= 0) - tc->bridge.ops |= DRM_BRIDGE_OP_DETECT; - tc->bridge.ops |= DRM_BRIDGE_OP_EDID; - tc->bridge.of_node = dev->of_node; drm_bridge_add(&tc->bridge);