Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp375539pxa; Tue, 4 Aug 2020 07:43:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxeSk589K/9NU+l0qMgutC1tJ01yhDsSC3xA+MNsnf4Mw4uXIxmg7CoDI+dF9ZlMeauqxMN X-Received: by 2002:a17:907:4303:: with SMTP id nh3mr22568710ejb.520.1596552194046; Tue, 04 Aug 2020 07:43:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596552194; cv=none; d=google.com; s=arc-20160816; b=mevV8NN42ue6Ze9mRbhbY7hh2r9zNiQgdkPEymZF3WAToaL8tWPlQTck+Gwk18L+r1 UxHsvsGneTYSrOboS6KOTvg0FhMWeaiqL+WvqOF8BvR8dQXaXl/KwjOwg6fqcLH+7lq/ fQiepFbb4C41xyBwhUM/s22x1YA6jiUm6HcveOTN+IraMOgjvveS72UXKrb34+EmiQUx zQB/b2TZRVh/3MLypa9BtjZWUADi42EGQU+/nnQ+oYVoWUwD7ZWPh6ra4hQcrWS6KYj4 JunJQHElIsY0B/WAwNM1IVPneKmn0PeIhX6wDbYC93NxFnzNixzBVTBVocgqESZZg+3v JMBw== 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=4LMIRQx/KIXdCoEDKp7Aaa0LdnJxnh4CdctNcaWBJg4=; b=VEhShTFSmHTQS5Dc6dcXYrs9VeQbZDtnOBpc7AyIO/i6kTEQbutpAIHL2cRWuiC3b9 D4rUZxYiUDEAJCXq82sBsrnkhVqMM+23W7uuUAbtnGCwhXf5nbLjAxN25t0kqxwUNGDB KfQMP03yBnUKh54n5SU37sHoZA5VL7ip/sbEiVE8QRUu9l475edFOnEbTgfa23XU92jk SAyOR6Xhy2m2zwoBxr388Xue0B1P233we6jhjKCIdnaezcePwIjEcxvFpf3Dn2ie3+8y MqBxHLXxTMWm0IK3KIW/bTgGtcv0GpBKSD++budJVPZgbVJSfRqHafAuxkZp1axqxksj xUkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=SIo20VzQ; 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 qc15si4592620ejb.658.2020.08.04.07.42.51; Tue, 04 Aug 2020 07:43:14 -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=SIo20VzQ; 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 S1729113AbgHDOlx (ORCPT + 99 others); Tue, 4 Aug 2020 10:41:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:36502 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725904AbgHDOla (ORCPT ); Tue, 4 Aug 2020 10:41:30 -0400 Received: from mail-ej1-f48.google.com (mail-ej1-f48.google.com [209.85.218.48]) (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 77F0522CE3 for ; Tue, 4 Aug 2020 14:41:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1596552089; bh=49+4jaBGejOQEj2mBMoA+n/qjCxSINfX1ZlDTF4RB9g=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=SIo20VzQD1hcKkTqZ3z6GBe+Nk04OJx3rnyojyF0dO0yfKTibSzFTxzo9XexiAGpL 7kift6qM8OTaCC660NCKLt6bJH6Yq6r+KkBvLatUZlR7pHxBD1y4RuGzEjCe+xwcIQ /sG0jMIKiPHNmA+iSLJKMuPh+iI8pcYgGIjtOg34= Received: by mail-ej1-f48.google.com with SMTP id qc22so27910076ejb.4 for ; Tue, 04 Aug 2020 07:41:29 -0700 (PDT) X-Gm-Message-State: AOAM530cwXBizKcMlLCJoOnkVjoMStT7/uBkQco6d2PLaN+eYWIp1r8b eO4TSeJMUWReNI2145k6a+E1fz8jeu4GTonC2w== X-Received: by 2002:a17:906:d92c:: with SMTP id rn12mr21013338ejb.187.1596552088025; Tue, 04 Aug 2020 07:41:28 -0700 (PDT) MIME-Version: 1.0 References: <20200804105849.70876-1-linux@fw-web.de> <20200804105849.70876-5-linux@fw-web.de> In-Reply-To: <20200804105849.70876-5-linux@fw-web.de> From: Chun-Kuang Hu Date: Tue, 4 Aug 2020 22:41:16 +0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v3 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 , Jitao Shi , Philipp Zabel , Frank Wunderlich , David Airlie , linux-kernel , DRI Development , Daniel Vetter , Matthias Brugger , Linux ARM 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=B48=E6=9C=884=E6=97= =A5 =E9=80=B1=E4=BA=8C =E4=B8=8B=E5=8D=887:00=E5=AF=AB=E9=81=93=EF=BC=9A > > From: Jitao Shi > > 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. Reviewed-by: Chun-Kuang Hu > > Signed-off-by: Jitao Shi > Signed-off-by: Frank Wunderlich > --- > 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 > > > _______________________________________________ > Linux-mediatek mailing list > Linux-mediatek@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-mediatek