Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp4484687yba; Tue, 7 May 2019 19:59:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqy40WQKhetGzFBprdjBYHZpe0gnVkxycUlupEa+ey9ffQkLWtCfQJ4ZyieT9ibZlpX7KT3K X-Received: by 2002:a17:902:a60e:: with SMTP id u14mr10828709plq.94.1557284373976; Tue, 07 May 2019 19:59:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557284373; cv=none; d=google.com; s=arc-20160816; b=T0mDyROMYkV6DwsH1GB/Rvpp8NEJpHmaAG+y1crSZU7zz1yKTF7yzE3rT32Pad1L4x GL5IXYg3YiGuhq1fp/6aBqT4LPCSs7twIl4QnWcKT/bzMqHyLbhxrFnrI1gzN+37SL1w BSrB8WncaiXVHw847H6Guvy3qrJZL4SwZEISt+VEl5ct+4twhPmrF8PlZ2ULNS/sT6G0 YVfhVHhSNe7e3A8F5O0yO/8shFtKNFkuk7lWpTbcZOYnQrxf1jhVITu/zCoZ9BN/BJsJ TjF0SCW1wahqujmO/tzzdMewCo7fXOPguESqrquw2sByzC+AwaWa74Aef4cx/66evBk8 KiVA== 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:date:cc:to:from:subject:message-id; bh=6NRjvHMOOoYfV0OitXBOohXh+laoAjj3Pqz8Y+1oUQI=; b=WupJx7R7ZzNKYGXxuGS8eOHCbaIpJ+msZKXWqEs4sjDiOlRKZLOi2hiAi1V1rP7bOF ezOgaflvzP8L2H4pvBvPXrOreW78xXWmYuZ9Ol4ek436pALezF9FmSUiK+d09lSHZw6R ZRx3HQ8Ei53rCFFx9KISX91XlST6NguoSUJFUJbwFBXwiXiDrhdK8lnrv+01yxjCxhbR OGuVo0b0srr8oVnf/EKwc/vdHUmUJph+mhHrFbn49w9mOsMmI2p6rLkCIUH2JmDABnUx nuyOhgqKUrnwzOsowFgUtMNRnIs/BDMr0ke5HS21VF0XHQaWBXOL1CgFCUUySwPswB3e 4EOw== 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 z22si18468038plo.171.2019.05.07.19.59.18; Tue, 07 May 2019 19:59:33 -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 S1727010AbfEHC4y (ORCPT + 99 others); Tue, 7 May 2019 22:56:54 -0400 Received: from Mailgw01.mediatek.com ([1.203.163.78]:16116 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726670AbfEHC4y (ORCPT ); Tue, 7 May 2019 22:56:54 -0400 X-UUID: 32694377cbc74a0cb64b2150d0736679-20190508 X-UUID: 32694377cbc74a0cb64b2150d0736679-20190508 Received: from mtkcas35.mediatek.inc [(172.27.4.253)] by mailgw01.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 1513612528; Wed, 08 May 2019 10:56:42 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by MTKMBS33N1.mediatek.inc (172.27.4.75) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Wed, 8 May 2019 10:56:40 +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; Wed, 8 May 2019 10:56:40 +0800 Message-ID: <1557284200.31731.8.camel@mtksdaap41> Subject: Re: [v2 3/5] drm/mediatek: add dsi reg commit control From: CK Hu To: Jitao Shi CC: Rob Herring , Pawel Moll , "Mark Rutland" , Ian Campbell , Kumar Gala , , David Airlie , "Matthias Brugger" , Thierry Reding , "Ajay Kumar" , Inki Dae , "Rahul Sharma" , Sean Paul , Vincent Palatin , Andy Yan , Philipp Zabel , "Russell King" , , , , , , , Sascha Hauer , , , , , Date: Wed, 8 May 2019 10:56:40 +0800 In-Reply-To: <20190416060501.76276-4-jitao.shi@mediatek.com> References: <20190416060501.76276-1-jitao.shi@mediatek.com> <20190416060501.76276-4-jitao.shi@mediatek.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.10.4-0ubuntu2 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Jitao: On Tue, 2019-04-16 at 14:04 +0800, Jitao Shi wrote: > New DSI IP has shadow register and working reg. The register > values are writen to shadow register. And then trigger with > commit reg, the register values will be moved working register. This patch looks good, but the message is not complete. The message make us believe you use shadow register to work, but actually, shadow register is default turn on in new DSI IP and you want to turn off it. Regards, CK > > Signed-off-by: Jitao Shi > --- > drivers/gpu/drm/mediatek/mtk_dsi.c | 10 ++++++++++ > 1 file changed, 10 insertions(+) > > diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c > index 573e6bec6d36..be42405a0a78 100644 > --- a/drivers/gpu/drm/mediatek/mtk_dsi.c > +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c > @@ -131,6 +131,10 @@ > #define VM_CMD_EN BIT(0) > #define TS_VFP_EN BIT(5) > > +#define DSI_SHADOW_DEBUG 0x190U > +#define FORCE_COMMIT BIT(0) > +#define BYPASS_SHADOW BIT(1) > + > #define CONFIG (0xff << 0) > #define SHORT_PACKET 0 > #define LONG_PACKET 2 > @@ -157,6 +161,7 @@ struct phy; > > struct mtk_dsi_driver_data { > const u32 reg_cmdq_off; > + bool has_shadow_ctl; > }; > > struct mtk_dsi { > @@ -594,6 +599,11 @@ static int mtk_dsi_poweron(struct mtk_dsi *dsi) > } > > mtk_dsi_enable(dsi); > + > + if (dsi->driver_data->has_shadow_ctl) > + writel(FORCE_COMMIT | BYPASS_SHADOW, > + dsi->regs + DSI_SHADOW_DEBUG); > + > mtk_dsi_reset_engine(dsi); > mtk_dsi_phy_timconfig(dsi); >