From patchwork Fri Jan 7 02:01:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dmitry Baryshkov X-Patchwork-Id: 530460 Delivered-To: patch@linaro.org Received: by 2002:ad5:544f:0:0:0:0:0 with SMTP id a15csp12325imp; Thu, 6 Jan 2022 18:01:42 -0800 (PST) X-Google-Smtp-Source: ABdhPJy2W0EaGVtB5cclCqN0SVbvcU3IlJEPpVZmRy+1AgYUlvaFJHWZ4WdagRPfiTVMSW+gxn3u X-Received: by 2002:a63:7459:: with SMTP id e25mr54097881pgn.471.1641520901950; Thu, 06 Jan 2022 18:01:41 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1641520901; cv=none; d=google.com; s=arc-20160816; b=BdkgA+pmCnkYbigq02W7LsOU2iQJdC+2eojuGdi8l5SXPrqZ/9t13zM4yiLfk3uL/0 N4T+SWl+v0i9cWd/o9xk+mEA/USLpSZqK7yfqJw2TEGaiexyRkTPOi1GMRjartnWyW6Z 9fmZbYIS4xO5D0ptspzlE/7rIm0IJ+/fjdNd4jopIa5pJe7u62HsgUqdIdSUYuAeo7Br 8Uc6fLOqKrFEhbyEQvgnnqQoixUgPWHxza7Kd/yZrWY2LSVf8MJ1qKuDV+FjM5O2KSWX 2iYo24qv7YLDD7NAHn1819bwyc1hdI9e0ZBIToV4Sbxdi+M7KnE0uc1dHDboywOd8yGD rgNw== 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=Mbm89ogoQZqGUNZ1cj9r9KOUuoZZufgU+BA4OgVhn8g=; b=hqnJXzyIe3iib9rEq4fsw/T/MqclKwhnWbkO429647ygsscqEWkASkX7gsHLnNyiVh vPqlDVBZ/tm7cdGpfIPf+5Wv0JwhDvWwdoq+oc2AC3DOFyK/QSXrPYkFOQQlS7oPwuct 6vw9kl3jFHKjYgqaPwIOLG7O9gUcjGqLEWT6zM/+wII5Rmd2KLuXDhDoYfheN7pEZkxD bsiTTTohq7384HnS/YZGf6jFt4pYFfimf4iHX9AcF0Mpi/ByghYgBzQXgqVXngVFHFn6 MN0kBxgN2QA3My8Wt7hDZXJkD60HKipVQGz1JSy29D3T4Mqiejx96lGL0qiuPBRnW9aW xTaQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=HrN+k7FX; 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 bg12si3521678plb.400.2022.01.06.18.01.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jan 2022 18:01:41 -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=HrN+k7FX; 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 AAEDA10ED91; Fri, 7 Jan 2022 02:01:38 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by gabe.freedesktop.org (Postfix) with ESMTPS id 1AED110ED91 for ; Fri, 7 Jan 2022 02:01:38 +0000 (UTC) Received: by mail-lf1-x129.google.com with SMTP id k21so10357597lfu.0 for ; Thu, 06 Jan 2022 18:01:38 -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=Mbm89ogoQZqGUNZ1cj9r9KOUuoZZufgU+BA4OgVhn8g=; b=HrN+k7FXfHQQe4fZOWaNS+ppaD7a7gXvvZDegmpMvzQKseetFljT8hqddGMz3fFiRT KyPsaxbZVyXpGYswOGyEsC+HU/omhYvjVaTGJuWzy+4ZNNR3ecNCcaSB0Q855PmBFGm2 A3WgU8g+zFdAux7e5RLGjVaoCetcFKlNgh6fVjIhvljN2Emv7lwDwpQelIfHVpQ8VrN+ bXpj/Aj4FvBRGYJYEBHa3RARSSHlMYA7r80qxbe5Rdir2H0sPTmcDHJdpMXECYxqVBYW pbliLniuHG0XFBZw8upVWYwr5AsrfaZOk7iqbbr9TTMOkNk604WgAMs5scr4yhZfC4f5 cNXA== 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=Mbm89ogoQZqGUNZ1cj9r9KOUuoZZufgU+BA4OgVhn8g=; b=HHa3NBKDjHf2ju3ODe8yT2uLWevhEcUhv2rip6LVwmcyKvMwLg+rivYzUXi2Uujg8r a25geMOiej6tFFdn5Nf5CNkz0ZYiPiu1WZxjgXgrHXJopE9nl31S0NTbCdCgOJUC6EqL mzvNZM9AfmMhXFifMUfF9SzDDXuWAsGB3JKNDf5f11uiWfTymH7cZW3lfVh2BmaQRg5j wt6XLrR/wJchbXKzgS/g3SCK9cbU5tfGxna8zXvp8CIqzF9mKgRNNeup5y61g6nvRRXQ LvOIFWJzAPw9TBgu3RakZky27/hdnzJhoQnVQM7Tp1x1Bo4wrJ4aN9BEiBLM9cfSSLXy YO0w== X-Gm-Message-State: AOAM5331f5MI/QdOIZzkL1372MUFN+7XNf0MyIXHc0v1RXER7q0gckkB ZkCMUvUbMhtsp+B0Qu6nadrdXQ== X-Received: by 2002:a2e:878f:: with SMTP id n15mr49924515lji.347.1641520896414; Thu, 06 Jan 2022 18:01:36 -0800 (PST) Received: from eriador.lan ([37.153.55.125]) by smtp.gmail.com with ESMTPSA id w12sm382837lfe.256.2022.01.06.18.01.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Jan 2022 18:01:36 -0800 (PST) From: Dmitry Baryshkov To: Bjorn Andersson , Rob Clark , Sean Paul , Abhinav Kumar , Kuogee Hsieh Subject: [RFC PATCH 1/7] drm/msm/dp: fix panel bridge attachment Date: Fri, 7 Jan 2022 05:01:26 +0300 Message-Id: <20220107020132.587811-2-dmitry.baryshkov@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220107020132.587811-1-dmitry.baryshkov@linaro.org> References: <20220107020132.587811-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" In commit 8a3b4c17f863 ("drm/msm/dp: employ bridge mechanism for display enable and disable") the DP driver received a drm_bridge instance, which is always attached to the encoder as a root bridge. However it conflicts with the panel_bridge support for eDP panels. Change panel_bridge attachment to come after dp_bridge attachment. Fixes: 8a3b4c17f863 ("drm/msm/dp: employ bridge mechanism for display enable and disable") Cc: Kuogee Hsieh Signed-off-by: Dmitry Baryshkov --- drivers/gpu/drm/msm/dp/dp_drm.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/drivers/gpu/drm/msm/dp/dp_drm.c b/drivers/gpu/drm/msm/dp/dp_drm.c index d4d360d19eba..26ef41a4c1b6 100644 --- a/drivers/gpu/drm/msm/dp/dp_drm.c +++ b/drivers/gpu/drm/msm/dp/dp_drm.c @@ -169,16 +169,6 @@ struct drm_connector *dp_drm_connector_init(struct msm_dp *dp_display) drm_connector_attach_encoder(connector, dp_display->encoder); - if (dp_display->panel_bridge) { - ret = drm_bridge_attach(dp_display->encoder, - dp_display->panel_bridge, NULL, - DRM_BRIDGE_ATTACH_NO_CONNECTOR); - if (ret < 0) { - DRM_ERROR("failed to attach panel bridge: %d\n", ret); - return ERR_PTR(ret); - } - } - return connector; } @@ -246,5 +236,16 @@ struct drm_bridge *msm_dp_bridge_init(struct msm_dp *dp_display, struct drm_devi return ERR_PTR(rc); } + if (dp_display->panel_bridge) { + rc = drm_bridge_attach(dp_display->encoder, + dp_display->panel_bridge, bridge, + DRM_BRIDGE_ATTACH_NO_CONNECTOR); + if (rc < 0) { + DRM_ERROR("failed to attach panel bridge: %d\n", rc); + drm_bridge_remove(bridge); + return ERR_PTR(rc); + } + } + return bridge; }