From patchwork Thu Apr 28 21:31:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 12831230 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 4B0EFC433F5 for ; Thu, 28 Apr 2022 21:31:45 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 88A9510EB1F; Thu, 28 Apr 2022 21:31:44 +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 6911710EB1F for ; Thu, 28 Apr 2022 21:31:43 +0000 (UTC) Received: from tr.lan (ip-86-49-12-201.net.upcbroadband.cz [86.49.12.201]) (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 AF7B183108; Thu, 28 Apr 2022 23:31:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1651181501; bh=gjXAa9d6LB9cKyN20kpaWSeUxh/Gi0C5nYh01w7v0f8=; h=From:To:Cc:Subject:Date:From; b=fr0Mbr262xffHmuKCzBclWxsVW1dJx6ByDQ+aBsIi13D8XYGlsVNsNxJ2nh/iCHwi 2FgE4978HJHMCTeuO8+S5e0gOiSlLFJ3ibtD9cpQPzaTG+kT5EaK03rC+bik0JlxUd 4p2mVdw0/NJ+Ydl6b1eZkocwjcSzWNRMyGm08hamg00oLxNulYpuZbaGp6TiyLYSNk JSxziyiF0uxspaUl+k3D9bbkz+/Ik1cGFyiGpMO4lv+lt+4XB/OS0LprqVw462YpdK ki7SbuNL5PaEYU5z3sWQSdnyXkLGDMNZ5N18+WCgtBzDVdFlxPyQd57zWAJ7frocWR eos0OKvh9RN+Q== From: Marek Vasut To: dri-devel@lists.freedesktop.org Subject: [PATCH v4] drm/bridge: tc358767: Fix (e)DP bridge endpoint parsing in dedicated function Date: Thu, 28 Apr 2022 23:31:32 +0200 Message-Id: <20220428213132.447890-1-marex@denx.de> X-Mailer: git-send-email 2.35.1 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 , Laurent Pinchart , Jonas Karlman , Neil Armstrong , robert.foss@linaro.org, Maxime Ripard , Sam Ravnborg Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Per toshiba,tc358767.yaml DT binding document, port@2 the output (e)DP port is optional. In case this port is not described in DT, the bridge driver operates in DPI-to-DP mode. The drm_of_find_panel_or_bridge() call in tc_probe_edp_bridge_endpoint() returns -ENODEV in case port@2 is not present in DT and this specific return value is incorrectly propagated outside of tc_probe_edp_bridge_endpoint() function. All other error values must be propagated and are propagated correctly. Return 0 in case the port@2 is missing instead, that reinstates the original behavior before the commit this patch fixes. Fixes: 8478095a8c4b ("drm/bridge: tc358767: Move (e)DP bridge endpoint parsing into dedicated function") Signed-off-by: Marek Vasut Cc: Jonas Karlman Cc: Laurent Pinchart Cc: Lucas Stach Cc: Marek Vasut Cc: Maxime Ripard Cc: Neil Armstrong Cc: Robert Foss Cc: Sam Ravnborg Reviewed-by: Lucas Stach --- drivers/gpu/drm/bridge/tc358767.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/bridge/tc358767.c b/drivers/gpu/drm/bridge/tc358767.c index 0336b14d9e94..ad1d6e383966 100644 --- a/drivers/gpu/drm/bridge/tc358767.c +++ b/drivers/gpu/drm/bridge/tc358767.c @@ -1955,7 +1955,7 @@ static int tc_probe_edp_bridge_endpoint(struct tc_data *tc) tc->bridge.ops |= DRM_BRIDGE_OP_DETECT; tc->bridge.ops |= DRM_BRIDGE_OP_EDID; - return ret; + return 0; } static int tc_probe_bridge_endpoint(struct tc_data *tc)