Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp218230ybg; Tue, 28 Jul 2020 04:20:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxtpg8rsJu1qDc1QHTsQ+VvILYiSknBm02MjiAM0DIPsefI4DQYkaoo2WBdvSDac7gPbIYR X-Received: by 2002:a50:af86:: with SMTP id h6mr24378411edd.132.1595935201260; Tue, 28 Jul 2020 04:20:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595935201; cv=none; d=google.com; s=arc-20160816; b=HEFtelz3shW+lLrACe5tzHSV9ukZVbPnCFKY6EcDSkh/UZ+i2zAVTHaY010K8fYUH7 C7OSPIyemtA3hrjzw4fGWetmqvDqtSaBzd3yfbFlmArdDL86D6Q+S/WVNVZgLXIH9CVL BiPg/u+qtS+MeEzyEvaDm5J0DKR1xXsA5KkqyQo5DymrROCdnEyVUfjKpqod6jsDHhvf wwt7h2LjFm0cI0DAGb8WvA2IMNVnHH95nx+4fzxfL1vF5gxYfepcfGYZ7My/eFmgIRUl XykkCUOzTt2Fq8HWfyhbUD9HWohclZxehkBvs91Kah9wGv3O63BTFS1Ct5C/0Cp/fvON 2l+Q== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=JjwWFddAdWynk3ZYwPqAbvNXk1S91CACAkdFq8ZgUhU=; b=WGCGv4WtNnagH608vFMDM4xzqLwE7vxEixgIJKRpi1H88HZPDoNwzsgGPaS+4arcoL E25LtKzMqDnQY512UtOiZQs81tSN3Pya83D0E46oj7MJ7atjpO3Xf20GG7ojRVECA8wY mGA1sChTjvhNAKviM3S3SFd/r7QNfnMrdsOJc3psDDa42vAf8+UruTlrWWrQq+9itjav I2XesGa3Ke0n4//Bgfx5jYkBP4bWA1btq6UBi9j3RxLmptrhbirVgrqYumOQw9YN0Xge TU6d32s+ZEzai/0W1j0f/TbXhyAxzSFS3vum2KLCw7HvyqOFhO1Ww64PlwYUY7xxehjg Bbiw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=Y4T5TGaB; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id w17si7106996ejq.743.2020.07.28.04.19.39; Tue, 28 Jul 2020 04:20:01 -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=@gmx.net header.s=badeba3b8450 header.b=Y4T5TGaB; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729035AbgG1LSv (ORCPT + 99 others); Tue, 28 Jul 2020 07:18:51 -0400 Received: from mout.gmx.net ([212.227.17.22]:38251 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728934AbgG1LSu (ORCPT ); Tue, 28 Jul 2020 07:18:50 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1595935105; bh=nn4BkbW0oeEmcmd3H6QHuJO7LEA/snDXKRVANzx14BY=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=Y4T5TGaBuRt3b8kV1LyAkiduwg0Pe2qyX/uDh1A70EFNHcoeRo3AbL84Ed0E5L4Ci 9fy+P7/8/XbZytNcRLfs+Qbbe4Ek/IWc2C/s8d2pS0lPw2nRyjbKLn4LWt/DJmpdnH AxxaiKJ+plcgGAPLFxsWaaQRXl+ctR610QqCPuXE= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.localdomain ([80.208.215.239]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MBDj4-1jvSko3s5u-00CiFj; Tue, 28 Jul 2020 13:18:25 +0200 From: Frank Wunderlich To: linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Chun-Kuang Hu , Philipp Zabel , David Airlie , Daniel Vetter , Matthias Brugger , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Jitao Shi Subject: [PATCH v2 4/5] drm/mediatek: dpi/dsi: change the getting possible_crtc way Date: Tue, 28 Jul 2020 13:17:59 +0200 Message-Id: <20200728111800.77641-5-frank-w@public-files.de> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200728111800.77641-1-frank-w@public-files.de> References: <20200728111800.77641-1-frank-w@public-files.de> MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:rTF2GSs7JL/heYwGA7znoUaELcob0GxZ4gZI2tIFt+A0aSnsby8 0XUoXibUcKWysOwTn/CZlW9rpuGJK1GojEZyc2C44706GSiy8/tpQFVhRWP45HlMen+R/4e 1n7CdNSfTDuS/oJ9dYALJKe0JKchcLjuEAMsxGJNZA1wxc1ce6AFpbtSXwwPzaHP1HtCNqi 1X/DLBRAf1lZTLoCXaovQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:RV7oFfUX3MU=:M/4aNAEJjpZZJa0cjUuRDy L+eM2xGQG0RnqgxzoVd6drELeZaZId4oJe/xJyShs0HwkT2wheosTwwuILnf2RQBc0brb0ZAN 3kgK0FgC2+33+gDvC7Sn1sdVkvxbaTnc2WsBgkTgbmpxUHcRcwk7pdZZkxImMFVL6PnNmfoHl S3r9AuBOJ+GDA1ZOXLXiAq7+BnBnUPM3YY6kjC/yqaZMlh6sDb9CFbMfCPB/1QP4Mus62JlAp nKHOFpKDIB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ernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jitao Shi [Detail] dpi/dsi get the possible_crtc by mtk_drm_find_possible_crtc_by_comp(*drm_dev, ddp_comp) Test: build pass and boot to logo Signed-off-by: Jitao Shi =2D-- 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/mediatek= /mtk_dpi.c index d4f0fb7ad312..e43977015843 100644 =2D-- 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 dev= ice *master, void *data) drm_encoder_helper_add(&dpi->encoder, &mtk_dpi_encoder_helper_funcs); /* 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/mediatek= /mtk_dsi.c index 270bf22c98fe..c31d9c12d4a9 100644 =2D-- 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 connector */ if (dsi->bridge) { =2D- 2.25.1