Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3621668ybi; Sun, 2 Jun 2019 19:21:13 -0700 (PDT) X-Google-Smtp-Source: APXvYqwcBfY/oTPnbA5ixMtSyjSj8QIksgXILfKjtZObFrtiwcKrOsdHebvvwj33pX0eRm3QApG7 X-Received: by 2002:a63:27c7:: with SMTP id n190mr25682067pgn.250.1559528473137; Sun, 02 Jun 2019 19:21:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559528473; cv=none; d=google.com; s=arc-20160816; b=xDt/pa0W3dfFhdfJq5WIQqwU2v8mSqRmCAUGd/Mpq0OLY2XAj8MDMv6Hnwc9iC+rSZ 9TtAEwexmy/2cTs0BYfCirtuUzb6T6tkhOgktRZMWEd5jH4K1Ni+QsJP7ruRjvIDI5oI eIoJVnx2QGVhmxf2/B5jtU3NqIqDY/3O15lyeV07TOAdrKZZCGSZ8Mu915f7nz2Tna1r qLjlRqpqwPO2CebtTArNXdrSZE7DytfPMOpK7L6Y1OClXGtRA8zVidDONMDg7TvBDH8M skjhY/KjOdN1wlH5bQhW189dM1YDmMT1N7TLD2YPpyc5+ZQ+HugHdYD/gkqBNYr+vx5S ovCA== 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=BbV+Z2F13FzVU+eICi/6otcjVpe1M+B+StMJTbc0JBc=; b=ujpDeD0zM9XpPSQRvlfCo7UBDAo/cwbd/u0vWtBN6bbCAb3s+3ZYpPzzVOu83LMz1H JHYZXlXbCTc6L6VHbAesCda/B2fsA9tJ97yS55jMJmYLkjK5YTeduQUzeo+riaP7mVmM mbiKVc4iERJyH+nw5aWjWuZNSm7uvZIQeSmnhbYX+FQRaYh4htu23SgfJCkod2XOYwNz Cpi8GtKUH5Nr9SPfdiPM2uqieZAjZ9Zma3rkPE39fYxhlQjkaxMVKXDptFDeCdLv0dna Kv1J/C4NBMH645bFN9qxb77UJ5hkv1sFYv6cvSjCaKRsEJoi6wQhRZOv9SeVBEuBKlt9 lgsQ== 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 f9si15824091pgs.115.2019.06.02.19.20.57; Sun, 02 Jun 2019 19:21:13 -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 S1726937AbfFCCTr (ORCPT + 99 others); Sun, 2 Jun 2019 22:19:47 -0400 Received: from Mailgw01.mediatek.com ([1.203.163.78]:48089 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726305AbfFCCTq (ORCPT ); Sun, 2 Jun 2019 22:19:46 -0400 X-UUID: 2a27758f1ed445d3ae430e40fa8cbcf4-20190603 X-UUID: 2a27758f1ed445d3ae430e40fa8cbcf4-20190603 Received: from mtkcas34.mediatek.inc [(172.27.4.253)] by mailgw01.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 1566463222; Mon, 03 Jun 2019 10:19:39 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by MTKMBS33N2.mediatek.inc (172.27.4.76) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Mon, 3 Jun 2019 10:19:36 +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; Mon, 3 Jun 2019 10:19:34 +0800 Message-ID: <1559528374.32185.4.camel@mtksdaap41> Subject: Re: [v4 3/7] drm/mediatek: add dsi reg commit disable control From: CK Hu To: Jitao Shi CC: Rob Herring , Pawel Moll , "Mark Rutland" , Ian Campbell , , 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: Mon, 3 Jun 2019 10:19:34 +0800 In-Reply-To: <20190601092615.67917-4-jitao.shi@mediatek.com> References: <20190601092615.67917-1-jitao.shi@mediatek.com> <20190601092615.67917-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 Sat, 2019-06-01 at 17:26 +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 fucntion is defualt on. But this driver doesn't use this > function. So add the disable control. Reviewed-by: CK Hu > > 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 a48db056df6c..eea47294079e 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); >