From patchwork Fri Feb 11 22:40:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 541801 Delivered-To: patch@linaro.org Received: by 2002:ad5:420f:0:0:0:0:0 with SMTP id e15csp3463725imo; Fri, 11 Feb 2022 14:40:49 -0800 (PST) X-Google-Smtp-Source: ABdhPJxpY71uKgPc6/VoMT6iiAs91SjfcF+10tx0LTPtbMEzrGjyjU5hXncoZXFyWfaVUHWhn8tn X-Received: by 2002:a65:458f:: with SMTP id o15mr1464325pgq.92.1644619249246; Fri, 11 Feb 2022 14:40:49 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644619249; cv=none; d=google.com; s=arc-20160816; b=hlfd1okSVLhkpyM2zyH4D+0pRSpUkovuOTo5oL6VRKRlHoRTKQ0VJvuCRYNuJXk8z4 0W7giYGpB3agxzv58oDbCsMhuZY2qi+iTLoeBNPK7qCzrfpzxeYF0NVLkdb7+Frrn1UM NRgsCF8isfxFriPRpmT+5d0G/mznJX/m3WwMKEpNtKio/bmIYjTXsro2KQA2dsDr+MwM wUE0o5Hw8QPPP1xOISnrcKPcn6Q4W4VubM/SLAOQhGjovtABEg8okF5JTo7ZSFm+soVM WFlOjUsmBEQzq95aRk8kr/fOVQqC88H2irnB4QStEvZdExn42ThpBjRp0j/kCvNaL9Qf r0BA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:to:from :dkim-signature:delivered-to; bh=A8ctvX5zLKvSPusbxBXHP85Dtil9Pv7DuZ+PpnlfzHc=; b=xwF9yaF0wicK+ck9C5FRJxhx+Wvgdymfu4bH5+3fvGUNH65Lqq61dcXvpx53xBBWVf 7vpwamH5KcGq2/9u45WM1i8SkHMBsj/3l7oK4CBB9w2gff8Enfh/IsUcILyqfJZZRKlK JZPJJkkajXd6mNHnZleF1+Ie9jxBqi4CWRu7Wq62rnY6nYm2DID5AKYTHsN0fCBxJ5SH 7gNKXquw/RzG9HXgJg0DPr+8aOC7nStxQ/J9r+/e6IRnC9aY+a+lAGMS6N2KcQf64oKi fE34+k+E5rCPP27RZUQpNQoGzAZnrdHnawFZYVytfzJ9XS7BKmatteuX1VMZ6UNZzn2x XqLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=QObfsafJ; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from gabe.freedesktop.org (gabe.freedesktop.org. [131.252.210.177]) by mx.google.com with ESMTPS id r23si23083296pga.495.2022.02.11.14.40.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Feb 2022 14:40:49 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) client-ip=131.252.210.177; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=QObfsafJ; spf=pass (google.com: best guess record for domain of dri-devel-bounces@lists.freedesktop.org designates 131.252.210.177 as permitted sender) smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1630210EBBB; Fri, 11 Feb 2022 22:40:27 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x12c.google.com (mail-lf1-x12c.google.com [IPv6:2a00:1450:4864:20::12c]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8D91910EBA9 for ; Fri, 11 Feb 2022 22:40:11 +0000 (UTC) Received: by mail-lf1-x12c.google.com with SMTP id x15so2034878lfu.10 for ; Fri, 11 Feb 2022 14:40:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=A8ctvX5zLKvSPusbxBXHP85Dtil9Pv7DuZ+PpnlfzHc=; b=QObfsafJ4EWjse6VV3bqb1uHiZBP6amKZbxvvjbIOlPJ/J+NAmh2xeY7cjkwbN4HmV kx5r+NO8p9TPow6xwADjImn0CnGaDXEqQYEaCI0lhrOEvsub7dTkUgy4KFfhUJymo7RH o2nl/LNJqSEcwIYoom14Srv5mHwd8OIgarz3lN0RGoUFWG876V7YTv9rJFsnNpuYMt/4 o7DpaoSbzbrRiUFK60QECAKO2wja0Eq24yYVB25HKIRykLkjQeznFgOJNk0lW0joMfeG 1oWCBu+o2KYPe+oIPmtduDKh9AoHKWhDXqgjQgsHv/ePg2JmaJOQIFbpXLwOETiEoAEV VLfg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=A8ctvX5zLKvSPusbxBXHP85Dtil9Pv7DuZ+PpnlfzHc=; b=YnQFFC/utUGJof6BeT4Y7q29zVVtMCGT1/FhCaavoRcHjivZEv4UG3ioMG4CpzcssM 2oS+9PgrTj/YQvyMvh87Y3EAOyRZsqozMAtKp0PzlY40qSUck0IrjFx+IDjF0b/j2CAH zSnzj4LqsSTCpQApRmv0zDt3pbGMdlHKjiH3dS/CJ1sXsMBjUK09oWXB/LwDXgrzq1CW LkoqpRU8vEWSG2yAQ5S1u54iGQm2gR9ofwg8tT4VVCM4XUw5wY4Iknii+Yg5rfW7d+KW ePFYEb+Nr4yuo0m0otgNWzZcagG7yeOr0AdylGbeKkZ9zRht3G8rlNX5V6eNBSmQRh9T C04Q== X-Gm-Message-State: AOAM530BoNibLU2JYtY+2vzaVhpFuZb8WFHCf6LLO6HtYF9OzzT2gsh9 jqhvx275Do1IQogq1ggeN8x6Rnyxb0U8KA== X-Received: by 2002:a05:6512:398d:: with SMTP id j13mr2623942lfu.251.1644619209897; Fri, 11 Feb 2022 14:40:09 -0800 (PST) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id a6sm3319983ljb.93.2022.02.11.14.40.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 11 Feb 2022 14:40:09 -0800 (PST) From: Dmitry Baryshkov To: Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar , Kuogee Hsieh Subject: [RFC PATCH v2 3/5] drm/msm/dp: support finding next bridge even for DP interfaces Date: Sat, 12 Feb 2022 01:40:04 +0300 Message-Id: <20220211224006.1797846-4-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220211224006.1797846-1-dmitry.baryshkov@linaro.org> References: <20220211224006.1797846-1-dmitry.baryshkov@linaro.org> MIME-Version: 1.0 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: David Airlie , linux-arm-msm@vger.kernel.org, dri-devel@lists.freedesktop.org, Stephen Boyd , freedreno@lists.freedesktop.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" It is possible to supply display-connector (bridge) to the DP interface, add support for parsing it too. Signed-off-by: Dmitry Baryshkov Tested-by: Kuogee Hsieh Reviewed-by: Stephen Boyd --- drivers/gpu/drm/msm/dp/dp_parser.c | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/msm/dp/dp_parser.c b/drivers/gpu/drm/msm/dp/dp_parser.c index 901d7967370f..1056b8d5755b 100644 --- a/drivers/gpu/drm/msm/dp/dp_parser.c +++ b/drivers/gpu/drm/msm/dp/dp_parser.c @@ -301,17 +301,22 @@ static int dp_parser_parse(struct dp_parser *parser, int connector_type) return rc; /* - * Currently we support external bridges only for eDP connectors. + * External bridges are mandatory for eDP interfaces: one has to + * provide at least an eDP panel (which gets wrapped into panel-bridge). * - * No external bridges are expected for the DisplayPort connector, - * it is physically present in a form of a DP or USB-C connector. + * For DisplayPort interfaces external bridges are optional, so + * silently ignore an error if one is not present (-ENODEV). */ - if (connector_type == DRM_MODE_CONNECTOR_eDP) { - rc = dp_parser_find_next_bridge(parser); - if (rc) { - DRM_ERROR("DP: failed to find next bridge\n"); + rc = dp_parser_find_next_bridge(parser); + if (rc == -ENODEV) { + if (connector_type == DRM_MODE_CONNECTOR_eDP) { + DRM_ERROR("eDP: next bridge is not present\n"); return rc; } + } else if (rc) { + if (rc != -EPROBE_DEFER) + DRM_ERROR("DP: error parsing next bridge: %d\n", rc); + return rc; } /* Map the corresponding regulator information according to