Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1154151pxa; Sat, 1 Aug 2020 20:13:15 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzDgbLlR7eqcgvTRvpe9KXKXuqBC6N3JqbdvXdayNvVcEzAVuD7eIuP8a/NTeBij6N06j4B X-Received: by 2002:a17:906:43c9:: with SMTP id j9mr10609567ejn.542.1596337995075; Sat, 01 Aug 2020 20:13:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596337995; cv=none; d=google.com; s=arc-20160816; b=qr+5wUfaW+u+lbE02FP62t2mU7XpPnK3R0Y8juwQdqhW1GN9EGRwPxPhgMncd4DkDi XmVRh1ctZm9CPjrxrBoQZ9oZubytLNpU8uqzR+VyITLAZynNRjZEjPdp4DMXxbg5dHlb yJ1Q0Uu8CwOaAvehZKddko3h7vXsPQ7081DM/0FaFavPz2K8oF36BA+ZtMmn9DcQ0R8d qrs60pF87dAMVfBn4h0xyQCH67ynmsBDcnY1OyJXA3RwThpKeFdkB7CW1dx5j0xVbRQ6 ox/sND8orT12mWpRUjBFsPyfM5upuNpiK/o+lWEOL3clgwx5sv11CoVEqyoHXCbaPGHE QmSg== 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=lgQuXXCjNZD+UMIz3wfTIRAVJhCSy+KN4JtF+pIWPgU=; b=t4CWYXP1zlAL5cUUU0NQZi4WnKtGVal4zV8tQAHsSgB3Et8NhmDimpQflz1DToInTR C9WdSeq1atOs90j2d25F70LWFMc6kwK2eADA2LUMD5zQ4SQrHug7w3G3VSwKPq+5hp+k Vt2EZo5HxUzfFJZGnoGM1ap9thsQiLy3PkpAg72TMXPHOzEQUm5DgIMaLdOD5R7itCk3 K5wwS3N+qLF9GSC1nXGE8xQenWXJxhql0rX7znQyik/mqTicqyc1Zq7/aWeFvpXVr5ht 6qL7AGI8MCkuzvuM/mbLBJWak0nKW+i4PFLpl80aVLuK+PTwts4XUCiCV4vgq7EjpaxP vkRw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=K+ksXFY7; 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 z14si4614718edk.480.2020.08.01.20.12.53; Sat, 01 Aug 2020 20:13:15 -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=K+ksXFY7; 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 S1727991AbgHBDH4 (ORCPT + 99 others); Sat, 1 Aug 2020 23:07:56 -0400 Received: from mail.kernel.org ([198.145.29.99]:44182 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725883AbgHBDH4 (ORCPT ); Sat, 1 Aug 2020 23:07:56 -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 0E8BE2067D for ; Sun, 2 Aug 2020 03:07:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596337675; bh=BDe3yrs2v8VZq1a11x+flngPwziIhT6reSqN/ADz+Do=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=K+ksXFY7u11n48uVBOuFNHQQ9C51A4Cx58+FxIOWeKiJEnIL5aj1+hUZK1aggDn1z myxPzZKhwAtNJMXb4+HnJmr6aMIR00n7EUNU0o1eHBY3QdqzCwEtTAvlh4i3oNpMo0 jhBDyaCR35CyK0BXxAATuMXx20uru00c1cnKX3RE= Received: by mail-ed1-f47.google.com with SMTP id n2so24925514edr.5 for ; Sat, 01 Aug 2020 20:07:54 -0700 (PDT) X-Gm-Message-State: AOAM533G/PGVP4RVb7Wa+v2EbYYLNlj6H40IuVaFsRhrorOSYaCZTHlV Q16abCjyc8Fh4FQp857dViU9+PUCGtGmm1R6/g== X-Received: by 2002:a05:6402:2037:: with SMTP id ay23mr10069970edb.48.1596337673694; Sat, 01 Aug 2020 20:07:53 -0700 (PDT) MIME-Version: 1.0 References: <20200728111800.77641-1-frank-w@public-files.de> <20200728111800.77641-5-frank-w@public-files.de> In-Reply-To: <20200728111800.77641-5-frank-w@public-files.de> From: Chun-Kuang Hu Date: Sun, 2 Aug 2020 11:07:41 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v2 4/5] drm/mediatek: dpi/dsi: change the getting possible_crtc way To: Frank Wunderlich Cc: "moderated list:ARM/Mediatek SoC support" , Chun-Kuang Hu , Philipp Zabel , David Airlie , Daniel Vetter , Matthias Brugger , DRI Development , Linux ARM , linux-kernel , Jitao Shi 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, Frank: Frank Wunderlich =E6=96=BC 2020=E5=B9=B47=E6=9C= =8828=E6=97=A5 =E9=80=B1=E4=BA=8C =E4=B8=8B=E5=8D=887:18=E5=AF=AB=E9=81=93= =EF=BC=9A > > From: Jitao Shi > > [Detail] > dpi/dsi get the possible_crtc by > mtk_drm_find_possible_crtc_by_comp(*drm_dev, ddp_comp) > I would like more information of why do this patch. For example: For current mediatek dsi encoder, its possible crtc is fixed in crtc 0, and mediatek dpi encoder's possible crtc is fixed in crtc 1. In some SoC the possible crtc is not fixed in this case, so call mtk_drm_find_possible_crtc_by_comp() to find out the correct possible crtc. Regards, Chun-Kuang. > Test: build pass and boot to logo > > Signed-off-by: Jitao Shi > --- > drivers/gpu/drm/mediatek/mtk_dpi.c | 3 ++- > drivers/gpu/drm/mediatek/mtk_dsi.c | 3 ++- > 2 files changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/mediatek/mtk_dpi.c b/drivers/gpu/drm/mediate= k/mtk_dpi.c > index d4f0fb7ad312..e43977015843 100644 > --- a/drivers/gpu/drm/mediatek/mtk_dpi.c > +++ b/drivers/gpu/drm/mediatek/mtk_dpi.c > @@ -608,7 +608,8 @@ static int mtk_dpi_bind(struct device *dev, struct de= vice *master, void *data) > drm_encoder_helper_add(&dpi->encoder, &mtk_dpi_encoder_helper_fun= cs); > > /* Currently DPI0 is fixed to be driven by OVL1 */ > - dpi->encoder.possible_crtcs =3D BIT(1); > + dpi->encoder.possible_crtcs =3D > + mtk_drm_find_possible_crtc_by_comp(drm_dev, dpi->ddp_comp= ); > > ret =3D drm_bridge_attach(&dpi->encoder, dpi->bridge, NULL, 0); > if (ret) { > diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediate= k/mtk_dsi.c > index 270bf22c98fe..c31d9c12d4a9 100644 > --- a/drivers/gpu/drm/mediatek/mtk_dsi.c > +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c > @@ -892,7 +892,8 @@ static int mtk_dsi_create_conn_enc(struct drm_device = *drm, struct mtk_dsi *dsi) > * Currently display data paths are statically assigned to a crtc= each. > * crtc 0 is OVL0 -> COLOR0 -> AAL -> OD -> RDMA0 -> UFOE -> DSI0 > */ > - dsi->encoder.possible_crtcs =3D 1; > + dsi->encoder.possible_crtcs =3D > + mtk_drm_find_possible_crtc_by_comp(drm, dsi->ddp_comp); > > /* If there's a bridge, attach to it and let it create the connec= tor */ > if (dsi->bridge) { > -- > 2.25.1 >