Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp383989imm; Wed, 13 Jun 2018 01:52:56 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJ6PXTy5ITQdHmtVFIpf/cjXfxBTtgDdn57f3TK2xFWoQnobQiN34FqZwQ7KeXtW2RvKdbT X-Received: by 2002:a63:b646:: with SMTP id v6-v6mr3281773pgt.276.1528879976521; Wed, 13 Jun 2018 01:52:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528879976; cv=none; d=google.com; s=arc-20160816; b=Lm4s7AkN+hb64APoewdFJL+YSpePboq20IcQlbFeSF5gvwfBYoo0Yb2ym7bYUs8n0I QyqYSp/VLXd8JZsD/QwZjD15CSnzhiFqBVANaZxNsU/yT01ioPGyrCodhzmy24t2nsCA n6MMyGMS8PL3EjMFCtLXFs6ewLkCPYhcjddXw+t/ArqmdeVf2mRGVZTbhOjFdufGrxfs 6phkvMib+nnm4+CjmcI3gcgYe5y1mZj51LcggIRGdQ9f4ZJ7lNpAwfowW3bMl9Qo2CEf P6s72J+cE4X24t0LdziPzH5pUTRn7icZoOCkJtDfGqFU7msS7J8KXah/ST47IJvG5kU/ SJgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :references:in-reply-to:date:cc:to:from:subject:message-id :arc-authentication-results; bh=z6q4c+J1b7858sNK0SVgcdRgCPuCCqtOu437aOG67SI=; b=r7RTNt23U6CP9Xh0wSVSJwA1WM19bjiqMYuBVcFHWNlGA+Ser1ABzFY2qWrMJ3TUI9 1q/jW6sjpHXi6GomFMjDOr5Vwi5nOaOniED2Js6+Y6Ek/pyw9Lmblzilx+of+dLnM+BV 9cDkqPN13/0BZXtIOKQMgQZuzdV04Y3f+8u/9EcltAsF4yPT99cVCjX5Pqp6Y8xdLgGG /Eij1MU8dlzR5/u7iMeqVDI6C9dfKcuZkD5f60uQd1iVfykIwuBzgtkdch/MPPTFr5uo tqIu8cYUBAECO8SoHNnv3JS6W+l9ukAXRA+MMGDtwxwV4DVCzx+BN4ZgJXQDOcZ4hT2H rzFg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w124-v6si2360243pfw.201.2018.06.13.01.52.41; Wed, 13 Jun 2018 01:52:56 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934854AbeFMIwO (ORCPT + 99 others); Wed, 13 Jun 2018 04:52:14 -0400 Received: from mailgw02.mediatek.com ([210.61.82.184]:14153 "EHLO mailgw02.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S933912AbeFMIwN (ORCPT ); Wed, 13 Jun 2018 04:52:13 -0400 X-UUID: 4ac543b8a64f4994b8e72572b99e009a-20180613 Received: from mtkexhb02.mediatek.inc [(172.21.101.103)] by mailgw02.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 386407530; Wed, 13 Jun 2018 16:52:10 +0800 Received: from mtkcas07.mediatek.inc (172.21.101.84) by mtkmbs01n2.mediatek.inc (172.21.101.79) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Wed, 13 Jun 2018 16:52:08 +0800 Received: from [172.21.84.99] (172.21.84.99) by mtkcas07.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Wed, 13 Jun 2018 16:52:08 +0800 Message-ID: <1528879928.11190.39.camel@mtksdccf07> Subject: Re: [PATCH 13/28] drm/mediatek: add connection from RDMA0 to DSI3 From: Stu Hsieh To: CK Hu CC: Philipp Zabel , David Airlie , Rob Herring , Mark Rutland , Matthias Brugger , , , , , , Date: Wed, 13 Jun 2018 16:52:08 +0800 In-Reply-To: <1528877112.30263.24.camel@mtksdaap41> References: <1528687580-549-1-git-send-email-stu.hsieh@mediatek.com> <1528687580-549-14-git-send-email-stu.hsieh@mediatek.com> <1528868751.15127.10.camel@mtksdaap41> <1528875983.11190.29.camel@mtksdccf07> <1528877112.30263.24.camel@mtksdaap41> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.2.3-0ubuntu6 Content-Transfer-Encoding: 7bit MIME-Version: 1.0 X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, CK: On Wed, 2018-06-13 at 16:05 +0800, CK Hu wrote: > Hi, Stu: > > On Wed, 2018-06-13 at 15:46 +0800, Stu Hsieh wrote: > > Hi, CK: > > > > On Wed, 2018-06-13 at 13:45 +0800, CK Hu wrote: > > > Hi, Stu: > > > > > > Two inline comment. > > > > > > On Mon, 2018-06-11 at 11:26 +0800, Stu Hsieh wrote: > > > > This patch add the connection from RDMA0 to DSI3 > > > > > > > > Signed-off-by: Stu Hsieh > > > > --- > > > > drivers/gpu/drm/mediatek/mtk_drm_ddp.c | 4 ++++ > > > > drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c | 2 +- > > > > 2 files changed, 5 insertions(+), 1 deletion(-) > > > > > > > > diff --git a/drivers/gpu/drm/mediatek/mtk_drm_ddp.c b/drivers/gpu/drm/mediatek/mtk_drm_ddp.c > > > > index c08aed8dae44..fed1b5704355 100644 > > > > --- a/drivers/gpu/drm/mediatek/mtk_drm_ddp.c > > > > +++ b/drivers/gpu/drm/mediatek/mtk_drm_ddp.c > > > > @@ -83,6 +83,7 @@ > > > > #define GAMMA_MOUT_EN_RDMA1 0x1 > > > > #define RDMA0_MOUT_DPI0 0x2 > > > > #define RDMA0_MOUT_DSI2 0x4 > > > > +#define RDMA0_MOUT_DSI3 0x5 > > > > > > Usually, each bit of a mout register represent a output enable. Is this > > > value 0x5 is a correct value? > > > > In hw CONFIG SPEC show as following: > > Bit(s) Name Description > > 2:0 DISP_PATH0_SOUT_SEL_IN 0 : Output to DSI0 > > 1: Ooutput to DSI1 > > 2: Ooutput to DPI > > 3: Ooutput to DPI1 > > 4: Ooutput to DSI2 > > 5: Ooutput to DSI3 > > 6 : reserved > > 7: Ooutput to DISP_UFOE > > So, the value 0x5 is correct value. > > > > From the definition, it looks like that RDMA0 could only single output > (output to only one destination at one moment). The register naming > 'DISP_REG_CONFIG_DISP_RDMA0_MOUT_EN' (MOUT means output to multiple > destination simultaneously) would confuse me. If the data sheet use the > confused naming, I think I could just accept it. > > Regards, > CK > OK, I would change the definition name from DISP_REG_CONFIG_DISP_RDMA0_MOUT_EN to DISP_REG_CONFIG_DISP_RDMA0_SOUT_EN > > Regard, > > Stu > > > > > > > > > #define RDMA1_MOUT_DPI0 0x2 > > > > #define DPI0_SEL_IN_RDMA1 0x1 > > > > #define COLOR1_SEL_IN_OVL1 0x1 > > > > @@ -164,6 +165,9 @@ static unsigned int mtk_ddp_mout_en(enum mtk_ddp_comp_id cur, > > > > } else if (cur == DDP_COMPONENT_RDMA0 && next == DDP_COMPONENT_DSI2) { > > > > *addr = DISP_REG_CONFIG_DISP_RDMA0_MOUT_EN; > > > > value = RDMA0_MOUT_DSI2; > > > > + } else if (cur == DDP_COMPONENT_RDMA0 && next == DDP_COMPONENT_DSI3) { > > > > + *addr = DISP_REG_CONFIG_DISP_RDMA0_MOUT_EN; > > > > + value = RDMA0_MOUT_DSI3; > > > > } else if (cur == DDP_COMPONENT_RDMA1 && next == DDP_COMPONENT_DPI0) { > > > > *addr = DISP_REG_CONFIG_DISP_RDMA1_MOUT_EN; > > > > value = RDMA1_MOUT_DPI0; > > > > diff --git a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c > > > > index fe6fdc021fc7..22f4c72fa785 100644 > > > > --- a/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c > > > > +++ b/drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.c > > > > @@ -228,7 +228,7 @@ static const struct mtk_ddp_comp_match mtk_ddp_matches[DDP_COMPONENT_ID_MAX] = { > > > > [DDP_COMPONENT_DSI0] = { MTK_DSI, 0, NULL }, > > > > [DDP_COMPONENT_DSI1] = { MTK_DSI, 1, NULL }, > > > > [DDP_COMPONENT_DSI2] = { MTK_DSI, 2, NULL }, > > > > - [DDP_COMPONENT_DSI2] = { MTK_DSI, 3, NULL }, > > > > + [DDP_COMPONENT_DSI3] = { MTK_DSI, 3, NULL }, > > > > > > I think this is not related to this patch. > > OK > > > > > > > > Regards, > > > CK > > > > > > > [DDP_COMPONENT_GAMMA] = { MTK_DISP_GAMMA, 0, &ddp_gamma }, > > > > [DDP_COMPONENT_OD0] = { MTK_DISP_OD, 0, &ddp_od }, > > > > [DDP_COMPONENT_OD1] = { MTK_DISP_OD, 1, &ddp_od }, > > > > > > > > > > > >