Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp727380ybz; Fri, 1 May 2020 07:29:47 -0700 (PDT) X-Google-Smtp-Source: APiQypL257GGnsV5leRcXbGVyVRNjck99oIgoZoe7gLm/CayZ6ytQOJWYiRp392Y/+zT8VWIvoEm X-Received: by 2002:a17:906:704c:: with SMTP id r12mr3379450ejj.105.1588343387708; Fri, 01 May 2020 07:29:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588343387; cv=none; d=google.com; s=arc-20160816; b=gGEsCEtmz1VcO2Rg65xGjNWzrWTeA6DcdJ/2HS62wDcdNjNbu94YtVjFD5pjdCXxnz nAS+yfspeqgxkQFNTTVmLDr0XlcJeKJJ/ca07Xf2jRkwb9uWb1ERCy6k/PJkJ9qcUDYj rfeH4zjhPJnD/PLgYU1rc1PHDkdAmSXSV6ozLGZs/4OP1Fvsvw9xyo8Hrpk1XuV9e883 DeUblTSAthOfQln2EYgb1GWi/pcDz/1q4XSomOQn28UIo2yVWdLv0LIAgJ/Vp3pcNhZR Mqgxkjiy3StkCeHvXx6PoAM4EYX+uHYWkKen5GGtIrczpSYpj6UHuysmWpWf/ssPUmYf Eqyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=DhAOGZ0YbifwTZ92qUfckZZ9Opfw3e1TzGIvdLKVG2s=; b=HGpJ/V5hoybns5c2+uq+PDt641Hj9fUQ5nYGlHJBaqWFHF/JJG/fKQX/wsGpPf/OBV AkAe85SFVJD1MjNw4G5BuSSDDxVqDMIR+nbmpvo1cpoJXfayLlKvQj1XoaIozBClVpeX eqKRo9FGSpDIQCMAbzb79/rTZ4UdfHlzXLdhJsO9/hBGfO4CKry5SsvD0LZbSobMtsuG XQee2YH66UWkAB2cJPlQ9FISnwDVGKOmiCGr6itH44dmSCiJDSwutT9qsZn4LZGM78Dr SdLw1oyLXxVUABKD2+oyGG3YFSDoQ5pP0w+UFOF4hMUj1EJJih86tCyzzj2yWuu1cOSl X3hw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=J6GWbaet; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id p31si1521337edb.495.2020.05.01.07.29.23; Fri, 01 May 2020 07:29:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=J6GWbaet; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729424AbgEAO0y (ORCPT + 99 others); Fri, 1 May 2020 10:26:54 -0400 Received: from mail.kernel.org ([198.145.29.99]:44968 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728737AbgEAO0x (ORCPT ); Fri, 1 May 2020 10:26:53 -0400 Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com [209.85.208.47]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id AE0DE2137B for ; Fri, 1 May 2020 14:26:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1588343213; bh=GWJwkvt0+8TQNxyG05ofo9WUCas5EChknR0I2IxYgog=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=J6GWbaettKOvk+oK9TnS51EkolS6QgEhWLhlRy8UMkMDxWBHVuBv0+IIaYp3/dbh3 HltRsMIZPGLN1o4ykQmmop96R4hv/4qpB/f5wZtLIdF6am4OujLdcpaQk45OAm3HnP 29dXCjiaGEX2RTL6bdKguIrkBNsgDAXISfnoZx/o= Received: by mail-ed1-f47.google.com with SMTP id t12so7377047edw.3 for ; Fri, 01 May 2020 07:26:52 -0700 (PDT) X-Gm-Message-State: AGi0PuarYxnJjkDnS/SUIMktf+u1WclrG3xLmT33NtisZ07fxj60Iiu/ FYUTIQdvSXgo7zd9l3rBz2xlVts/MuS1qNtYfA== X-Received: by 2002:aa7:dcd7:: with SMTP id w23mr3810850edu.300.1588343211141; Fri, 01 May 2020 07:26:51 -0700 (PDT) MIME-Version: 1.0 References: <20200417150614.2631786-1-enric.balletbo@collabora.com> <20200417150614.2631786-8-enric.balletbo@collabora.com> In-Reply-To: <20200417150614.2631786-8-enric.balletbo@collabora.com> From: Chun-Kuang Hu Date: Fri, 1 May 2020 22:26:37 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 7/7] drm/mediatek: mtk_dsi: Create connector for bridges To: Enric Balletbo i Serra Cc: linux-kernel , Collabora Kernel ML , Matthias Brugger , Nicolas Boichat , Hsin-Yi Wang , Laurent Pinchart , Chun-Kuang Hu , Daniel Vetter , David Airlie , Philipp Zabel , DRI Development , Linux ARM , "moderated list:ARM/Mediatek SoC support" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Enric: Enric Balletbo i Serra =E6=96=BC 2020=E5=B9= =B44=E6=9C=8817=E6=97=A5 =E9=80=B1=E4=BA=94 =E4=B8=8B=E5=8D=8811:06=E5=AF= =AB=E9=81=93=EF=BC=9A > > Use the drm_bridge_connector helper to create a connector for pipelines > that use drm_bridge. This allows splitting connector operations across > multiple bridges when necessary, instead of having the last bridge in > the chain creating the connector and handling all connector operations > internally. > > Signed-off-by: Enric Balletbo i Serra > --- > > Changes in v3: > - Move the bridge.type line to the patch that adds drm_bridge support. (L= aurent Pinchart) > > Changes in v2: None > > drivers/gpu/drm/mediatek/mtk_dsi.c | 13 ++++++++++++- > 1 file changed, 12 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediate= k/mtk_dsi.c > index 157097c63b23..85f76b01ae4d 100644 > --- a/drivers/gpu/drm/mediatek/mtk_dsi.c > +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c > @@ -17,6 +17,7 @@ > > #include > #include > +#include > #include > #include > #include > @@ -183,6 +184,7 @@ struct mtk_dsi { > struct drm_encoder encoder; > struct drm_bridge bridge; > struct drm_bridge *next_bridge; > + struct drm_connector *connector; > struct phy *phy; > > void __iomem *regs; > @@ -977,10 +979,19 @@ static int mtk_dsi_encoder_init(struct drm_device *= drm, struct mtk_dsi *dsi) > */ > dsi->encoder.possible_crtcs =3D 1; > > - ret =3D drm_bridge_attach(&dsi->encoder, &dsi->bridge, NULL, 0); > + ret =3D drm_bridge_attach(&dsi->encoder, &dsi->bridge, NULL, > + DRM_BRIDGE_ATTACH_NO_CONNECTOR); > if (ret) > goto err_cleanup_encoder; > > + dsi->connector =3D drm_bridge_connector_init(drm, &dsi->encoder); > + if (IS_ERR(dsi->connector)) { > + DRM_ERROR("Unable to create bridge connector\n"); > + ret =3D PTR_ERR(dsi->connector); > + goto err_cleanup_encoder; > + } > + drm_connector_attach_encoder(dsi->connector, &dsi->encoder); > + I'm not very clear about how brige-connector works, but why connector does not attach to panel? Regards, Chun-Kuang. > return 0; > > err_cleanup_encoder: > -- > 2.25.1 >