From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.3 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,UNPARSEABLE_RELAY,USER_AGENT_SANE_2 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B30C3C2D0DD for ; Thu, 2 Jan 2020 06:40:45 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 8530A21655 for ; Thu, 2 Jan 2020 06:40:45 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="i+dVo86g"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="rLXJCS4S" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 8530A21655 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Date:To:From:Subject:Message-ID:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=f8J2d1PAdJbmXLCLihXml2eA4APySlPfyrSRyQ9hoDY=; b=i+dVo86gWxTzHc RfeS8eapcJoqNttUy0TYmihuB+EQ3yDAjUDmtPT/jM9Cr7o0iUrnjM+j9+VbirpJ+AH0kCQc/Zcd1 vllJ8UoMK/0u+BR7NvwRiaGn/15QWWx7RX1etEdMCP881h4jWVuaauvB/cX63G0eobARDA1JOnJQf nsfcOmDEA1SZzl1FRuZ1EfqNOuu7Ufk0scLd/X4Wt8IbjUukHOOT3z43/AwVpTjibV3SCNQwyDY4c RLtrCf2qQMGOVPhlK/HcnlDkYkWXlgjTm1CH0LPwKTh/82mYMPfywNhjBIHaDe1qEQ5WbDqKWfvKW UqOhzBjxX64KVIG1YUJA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1imuA1-0002Hm-8R; Thu, 02 Jan 2020 06:40:45 +0000 Received: from mailgw01.mediatek.com ([216.200.240.184]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1imu9x-0002H1-Ta; Thu, 02 Jan 2020 06:40:43 +0000 X-UUID: b3b759d353bd481caa5a0aeec13915ed-20200101 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:MIME-Version:Content-Type:References:In-Reply-To:Date:CC:To:From:Subject:Message-ID; bh=XssQnV8CVAKLRbzGIfmtbhpXNMaK0W6w1OOKXrYbbt4=; b=rLXJCS4S5PntTciQ0VbV5AbQLbdcnzuso/mK1p/hjgdZYY3ojVtvXhV6BvhSjOA3HTScsnIMdkLryOFgI9Vdd62eDkjNVsqUqpb5SFdnEP9qvx5qX7t0DTXwS9uH0r/FP2mAwqTM6B1uFpchJ1kPtLPAr+0+03Kzzo2QgvBAyd4=; X-UUID: b3b759d353bd481caa5a0aeec13915ed-20200101 Received: from mtkcas68.mediatek.inc [(172.29.94.19)] by mailgw01.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 1899013100; Wed, 01 Jan 2020 22:40:39 -0800 Received: from MTKMBS31N2.mediatek.inc (172.27.4.87) by MTKMBS62N2.mediatek.inc (172.29.193.42) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 1 Jan 2020 22:40:59 -0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by MTKMBS31N2.mediatek.inc (172.27.4.87) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Thu, 2 Jan 2020 14:39:27 +0800 Received: from [172.21.77.4] (172.21.77.4) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Thu, 2 Jan 2020 14:40:37 +0800 Message-ID: <1577947234.4925.2.camel@mtksdaap41> Subject: Re: [PATCH v6, 02/14] drm/mediatek: move dsi/dpi select input into mtk_ddp_sel_in From: CK Hu To: Yongqiang Niu Date: Thu, 2 Jan 2020 14:40:34 +0800 In-Reply-To: <1577946073.15116.8.camel@mhfsdcap03> References: <1577937624-14313-1-git-send-email-yongqiang.niu@mediatek.com> <1577937624-14313-3-git-send-email-yongqiang.niu@mediatek.com> <1577941388.24650.2.camel@mtksdaap41> <1577943579.15116.1.camel@mhfsdcap03> <1577944949.32066.1.camel@mtksdaap41> <1577946073.15116.8.camel@mhfsdcap03> X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 X-TM-SNTS-SMTP: 3DAF5B765299B3D8444E42D119D503830C3F8456D6691FBEACE97524642F0F1F2000:8 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200101_224041_961275_E4C6F422 X-CRM114-Status: GOOD ( 18.67 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , devicetree@vger.kernel.org, Philipp Zabel , David Airlie , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Rob Herring , linux-mediatek@lists.infradead.org, Daniel Vetter , Matthias Brugger , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi, Yongqiang: On Thu, 2020-01-02 at 14:21 +0800, Yongqiang Niu wrote: > On Thu, 2020-01-02 at 14:02 +0800, CK Hu wrote: > > Hi, Yongqiang: > > > > On Thu, 2020-01-02 at 13:39 +0800, Yongqiang Niu wrote: > > > On Thu, 2020-01-02 at 13:03 +0800, CK Hu wrote: > > > > Hi, Yongqiang: > > > > > > > > On Thu, 2020-01-02 at 12:00 +0800, Yongqiang Niu wrote: > > > > > move dsi/dpi select input into mtk_ddp_sel_in > > > > > > > > > > Signed-off-by: Yongqiang Niu > > > > > --- > > > > > drivers/gpu/drm/mediatek/mtk_drm_ddp.c | 10 ++++++---- > > > > > 1 file changed, 6 insertions(+), 4 deletions(-) > > > > > > > > > > diff --git a/drivers/gpu/drm/mediatek/mtk_drm_ddp.c b/drivers/gpu/drm/mediatek/mtk_drm_ddp.c > > > > > index 39700b9..91c9b19 100644 > > > > > --- a/drivers/gpu/drm/mediatek/mtk_drm_ddp.c > > > > > +++ b/drivers/gpu/drm/mediatek/mtk_drm_ddp.c > > > > > @@ -376,6 +376,12 @@ static unsigned int mtk_ddp_sel_in(enum mtk_ddp_comp_id cur, > > > > > } else if (cur == DDP_COMPONENT_BLS && next == DDP_COMPONENT_DSI0) { > > > > > *addr = DISP_REG_CONFIG_DSI_SEL; > > > > > value = DSI_SEL_IN_BLS; > > > > > + } else if (cur == DDP_COMPONENT_RDMA1 && next == DDP_COMPONENT_DSI0) { > > > > > + *addr = DISP_REG_CONFIG_DSI_SEL; > > > > > + value = DSI_SEL_IN_RDMA; > > > > > > > > In original code, this is set when cur == DDP_COMPONENT_BLS and next == > > > > DDP_COMPONENT_DPI0. Why do you change the condition? > > > > > > > > Regards, > > > > CK > > > > > > if bls connect with dpi0, rdma1 should connect with dsi0, the condition > > > is same with before. > > > > You suggest that two crtcs are both enabled. If only one crtc is > > enabled, just one of these two would be set. > > > > Regards, > > CK > > OK, i will modify like this > else if (cur == DDP_COMPONENT_BLS && next == DDP_COMPONENT_DPI0) { > *addr = DISP_REG_CONFIG_DSI_SEL; > value = DPI_SEL_IN_RDMA; > } > in mtk_ddp_sel_in. > > don't set DISP_REG_CONFIG_DPI_SEL to DPI_SEL_IN_BLS anymore, because > DPI_SEL_IN_BLS is zero, it is same with hardware default setting. In Bibby's case, there is only the path from BLS to DPI0 and has no path from RDMA1 to DSI0, but it need to set these two register. Maybe its setting is just for some SoC, so you may use the compatible name to judge how to set this two register. Regards, CK > > > > > > > > > > > + } else if (cur == DDP_COMPONENT_BLS && next == DDP_COMPONENT_DPI0) { > > > > > + *addr = DISP_REG_CONFIG_DPI_SEL; > > > > > + value = DPI_SEL_IN_BLS; > > > > > } else { > > > > > value = 0; > > > > > } > > > > > @@ -393,10 +399,6 @@ static void mtk_ddp_sout_sel(struct regmap *config_regs, > > > > > } else if (cur == DDP_COMPONENT_BLS && next == DDP_COMPONENT_DPI0) { > > > > > regmap_write(config_regs, DISP_REG_CONFIG_OUT_SEL, > > > > > BLS_TO_DPI_RDMA1_TO_DSI); > > > > > - regmap_write(config_regs, DISP_REG_CONFIG_DSI_SEL, > > > > > - DSI_SEL_IN_RDMA); > > > > > - regmap_write(config_regs, DISP_REG_CONFIG_DPI_SEL, > > > > > - DPI_SEL_IN_BLS); > > > > > } > > > > > } > > > > > > > > > > > > > > > > > > > > > > > > > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel