Message ID | 20230105132457.4125372-6-treapking@chromium.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp299762wrt; Thu, 5 Jan 2023 05:27:15 -0800 (PST) X-Google-Smtp-Source: AMrXdXuL64L0qttz+wmhUtWXubtmP6INyKlmBABCJdmgCsQdYuzr+OLYY/d/YeXsY/jqdUXa9i/N X-Received: by 2002:a17:906:a891:b0:7c1:4d35:a143 with SMTP id ha17-20020a170906a89100b007c14d35a143mr42025195ejb.3.1672925235229; Thu, 05 Jan 2023 05:27:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672925235; cv=none; d=google.com; s=arc-20160816; b=QqxxZ8oxn1n+SBXdN3NSZlBa2U0b1WqCubOZ4+Xg6ipXZRUTtOZKVfilw4UkIYNjwV aETZKfRY8GTUbb32SM7vS6OMNewiyJOhPupuJP/UXTHcPrReVhSMADkGqzZMkTWEahIC 8U3O55LX18vRxsYQMHtPUPUQ2DBWCZJnl1NyZ0tjHi+ST/HklcmAzbTYWU7Lp/6/5C3H EkmjmvqK2mlkcWXb4MaD1l/akyKb4VDMDutrzKSYSr+rfuFHMo1JJYjm3bV/TO29yowZ 795WU+TEEg2n1L9rfw7e7Lxas4Kx6yW3gatigzO029JWTn86BxhzLk5fLzSRTOxPAJW3 qSvA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=C65HbTqm4aoCrwDl2BLz1roa80SXzNKa5x0ufot4CrI=; b=k/igEN2XN7mcuehgqcchGFz9yzEpBAwECGhIz9plP6+gRvKVZX21u/zORnZghB2P8q 8I6l4P29SOBywNfu3R9G8esDyxZ3bg3hZZYxkmw98M7yue3/0BecJK/ngcUkcr7BX/dB UujtbAVnqD70lvRn1WX+7rvc3YntRWn3cmH3O8gADOLPXX1yqjQOMqhOFNIM4vF5CtBh kFESHUxIH0Fsm9AOTjXMfoJfcgZQKKb9Npn8nP0TMNE/zmEMJ/pcpvnluOUyWlHVl+H5 +MQfTYv7O/lhWgDlz4x1x4hZRWchSbHNPzoaBsJQTMfJineHsEI75nY2Ex8I8XHcZIAr GyhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=EcSiBdYw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xg9-20020a170907320900b007c18e8131e1si33117050ejb.744.2023.01.05.05.26.51; Thu, 05 Jan 2023 05:27:15 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=EcSiBdYw; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234025AbjAEN0S (ORCPT <rfc822;tmhikaru@gmail.com> + 99 others); Thu, 5 Jan 2023 08:26:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44824 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233760AbjAENZk (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 5 Jan 2023 08:25:40 -0500 Received: from mail-pj1-x102c.google.com (mail-pj1-x102c.google.com [IPv6:2607:f8b0:4864:20::102c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13294392CD for <linux-kernel@vger.kernel.org>; Thu, 5 Jan 2023 05:25:39 -0800 (PST) Received: by mail-pj1-x102c.google.com with SMTP id v13-20020a17090a6b0d00b00219c3be9830so2001363pjj.4 for <linux-kernel@vger.kernel.org>; Thu, 05 Jan 2023 05:25:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=C65HbTqm4aoCrwDl2BLz1roa80SXzNKa5x0ufot4CrI=; b=EcSiBdYwt+3fFTqI3pD+Z1cWbfdlPdT1QRYJXeDcGanBNH+YzpSIj4FWtukHqzOYqu 2ozT6CU7PjO0z3oXwZ1RGBrtkJrX1qxyw3nEO/Gdr0dlaN/snPPv0OW2d8tedJ0FpcAw kxMlloNT946vDD52UbOffRvbe6M3ZkG/q5cIU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=C65HbTqm4aoCrwDl2BLz1roa80SXzNKa5x0ufot4CrI=; b=gk03gq9OwoquPbNg0KtBwA3iphVRxM/DGogL348jg3nRvHU6YfMzdsdH2MZ/pxFrZj Vug2tWjwRObJReKriy3Dbs9j1Ns8RJ7astznWSVFI4DfX0kTe3Mf+Q2xnM8Yv9ZrG1Z1 TuMSpeeBEgaSz7xWQffSM8f9ZUFqhW6W3ACpb7aEicEY0wXcQTFvsrhUtfw6GWCAMtpQ X1p4DaaPUGWATBwLcf6RWWLP0NXd2veHtZcZqtNldYP9bjZrTkzQ4NZ4E3ixDVaO0fC9 A/calP5lacUUWyfd36umHZAjbEXlEhhxdeFF7JGL1wu7/NHB+1eO4sRdniDvctsHp4Og Gaag== X-Gm-Message-State: AFqh2kphpL5T+M3strzirlBGRv1DjnHSTq1pvWnB7LIj4dl9Ip20mVqK dpCegFtF4IyQEPGUL2w+NI/KIA== X-Received: by 2002:a17:90b:d98:b0:221:4cd7:3401 with SMTP id bg24-20020a17090b0d9800b002214cd73401mr54129230pjb.10.1672925138498; Thu, 05 Jan 2023 05:25:38 -0800 (PST) Received: from treapking.tpe.corp.google.com ([2401:fa00:1:10:7a61:eb85:2e3:2bd0]) by smtp.gmail.com with ESMTPSA id gk22-20020a17090b119600b00225e670e4c7sm1372682pjb.35.2023.01.05.05.25.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Jan 2023 05:25:38 -0800 (PST) From: Pin-yen Lin <treapking@chromium.org> To: Andrzej Hajda <andrzej.hajda@intel.com>, Neil Armstrong <neil.armstrong@linaro.org>, Robert Foss <robert.foss@linaro.org>, Laurent Pinchart <Laurent.pinchart@ideasonboard.com>, Jonas Karlman <jonas@kwiboo.se>, Jernej Skrabec <jernej.skrabec@gmail.com>, David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Andy Shevchenko <andriy.shevchenko@linux.intel.com>, Daniel Scally <djrscally@gmail.com>, Heikki Krogerus <heikki.krogerus@linux.intel.com>, Sakari Ailus <sakari.ailus@linux.intel.com>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, "Rafael J . Wysocki" <rafael@kernel.org>, Prashant Malani <pmalani@chromium.org>, Benson Leung <bleung@chromium.org>, Guenter Roeck <groeck@chromium.org> Cc: =?utf-8?q?N=C3=ADcolas_F_=2E_R_=2E_A_=2E_Prado?= <nfraprado@collabora.com>, Xin Ji <xji@analogixsemi.com>, AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>, Thomas Zimmermann <tzimmermann@suse.de>, Hsin-Yi Wang <hsinyi@chromium.org>, linux-kernel@vger.kernel.org, Allen Chen <allen.chen@ite.com.tw>, linux-acpi@vger.kernel.org, Lyude Paul <lyude@redhat.com>, dri-devel@lists.freedesktop.org, chrome-platform@lists.linux.dev, Pin-yen Lin <treapking@chromium.org>, Javier Martinez Canillas <javierm@redhat.com>, Marek Vasut <marex@denx.de>, devicetree@vger.kernel.org, Stephen Boyd <swboyd@chromium.org> Subject: [PATCH v7 5/9] drm/bridge: anx7625: Check for Type-C during panel registration Date: Thu, 5 Jan 2023 21:24:53 +0800 Message-Id: <20230105132457.4125372-6-treapking@chromium.org> X-Mailer: git-send-email 2.39.0.314.g84b9a713c41-goog In-Reply-To: <20230105132457.4125372-1-treapking@chromium.org> References: <20230105132457.4125372-1-treapking@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754189251666111922?= X-GMAIL-MSGID: =?utf-8?q?1754189251666111922?= |
Series |
Register Type-C mode-switch in DP bridge endpoints
|
|
Commit Message
Pin-yen Lin
Jan. 5, 2023, 1:24 p.m. UTC
The output port endpoints can be connected to USB-C connectors.
Running drm_of_find_panel_or_bridge() with such endpoints leads to
a continuous return value of -EPROBE_DEFER, even though there is
no panel present.
To avoid this, check for the existence of a "mode-switch" property in
the port endpoint, and skip panel registration completely if so.
Signed-off-by: Pin-yen Lin <treapking@chromium.org>
---
(no changes since v6)
Changes in v6:
- New in v6
drivers/gpu/drm/bridge/analogix/anx7625.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/bridge/analogix/anx7625.c b/drivers/gpu/drm/bridge/analogix/anx7625.c index b375887e655d..1cf242130b91 100644 --- a/drivers/gpu/drm/bridge/analogix/anx7625.c +++ b/drivers/gpu/drm/bridge/analogix/anx7625.c @@ -1649,7 +1649,7 @@ static int anx7625_get_swing_setting(struct device *dev, static int anx7625_parse_dt(struct device *dev, struct anx7625_platform_data *pdata) { - struct device_node *np = dev->of_node, *ep0; + struct device_node *np = dev->of_node, *ep0, *sw; int bus_type, mipi_lanes; anx7625_get_swing_setting(dev, pdata); @@ -1688,6 +1688,17 @@ static int anx7625_parse_dt(struct device *dev, if (of_property_read_bool(np, "analogix,audio-enable")) pdata->audio_en = 1; + /* + * Don't bother finding a panel if a Type-C `mode-switch` property is + * present in one of the endpoints. + */ + for_each_endpoint_of_node(np, sw) { + if (of_property_read_bool(sw, "mode-switch")) { + of_node_put(sw); + return 0; + } + } + pdata->panel_bridge = devm_drm_of_get_bridge(dev, np, 1, 0); if (IS_ERR(pdata->panel_bridge)) { if (PTR_ERR(pdata->panel_bridge) == -ENODEV) {