Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp1678314ybi; Sat, 1 Jun 2019 02:27:56 -0700 (PDT) X-Google-Smtp-Source: APXvYqxHkkVpmbwHIuz3p+NkENDdTT/2W9qSJVPxc8Matpk8zKt30JxFoyzaNXEPJBL3M6iD5lBU X-Received: by 2002:a17:90a:207:: with SMTP id c7mr14696141pjc.94.1559381276127; Sat, 01 Jun 2019 02:27:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559381276; cv=none; d=google.com; s=arc-20160816; b=SEKAgr0CXbgddl6MPKN6Fw58Leul2Tj/P3QbR7OQD7UAAFiwmMmDDkbCiP2oGVTCYz XM+g0sqXVGtRW+QSODFTyh8XJJxub9LK3w7YkDEpjJF5vFBcaXdDEbXThe2VZ+ZGLDuY sWxvXYp1JjIxTPjSTYDqbReKmRpfE6y9/rjVXXiyUfCJ1lQjKBxec597t3+rM41rgFwr ojqEuUgfXCKxcnhXK7ciD1YY5NDJ8RhE2kbp3xlahjBJ8LCDjPZyPb0rjfgiQCNM9qH6 U4uzJLI6TtVzR9rHP/UyajKT9CRW2hLLhkwvkftb6VaDtGVjq5G7FOWhBc+sCcG2JQBn HC0w== 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; bh=vQ8mkO91R3S3O0RchMzt1pXdCfgoGjL916N7woi1KsM=; b=kw1ajFjLAWYzz6Mq2cB/eMWZLC3MDWARPvaMJHVGXDmIN27B7es7bRff/KpXUc84iE dpyNfUZBc3Xk9LQIQN7eJqIDn7gsKHQCyUfKOZTYXXMtI3ffIdZx2eiwCW+yh640SnTJ Xsa6l7Ql4vtTGsrj+Z17YH0+qCHs15GkPnfDWooZfnOdzyD4aUhhSfLmTQr9RlfSoDFu z7MyQ1wt1axfHW9fTkT5i2KYmcY1r+oPgI6hredBxcRL27obrDGjZrIJ/aSNVOI04E9K to1qQWlRKPSDLPXnnuehbHCdB4kGCThj1oskdCwOIk7NH1hT1fN1w6xGSohW3CU0xXMH LHqw== 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 m14si4394450pfh.99.2019.06.01.02.27.41; Sat, 01 Jun 2019 02:27: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 S1727175AbfFAJ0i (ORCPT + 99 others); Sat, 1 Jun 2019 05:26:38 -0400 Received: from Mailgw01.mediatek.com ([1.203.163.78]:57734 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1727053AbfFAJ0f (ORCPT ); Sat, 1 Jun 2019 05:26:35 -0400 X-UUID: e961f31d0b3c4b55a4de8a894ad30ce3-20190601 X-UUID: e961f31d0b3c4b55a4de8a894ad30ce3-20190601 Received: from mtkcas36.mediatek.inc [(172.27.4.253)] by mailgw01.mediatek.com (envelope-from ) (mailgw01.mediatek.com ESMTP with TLS) with ESMTP id 261343506; Sat, 01 Jun 2019 17:26:26 +0800 Received: from MTKCAS36.mediatek.inc (172.27.4.186) by MTKMBS33DR.mediatek.inc (172.27.6.106) with Microsoft SMTP Server (TLS) id 15.0.1395.4; Sat, 1 Jun 2019 17:26:24 +0800 Received: from mszsdclx1018.gcn.mediatek.inc (172.27.4.253) by MTKCAS36.mediatek.inc (172.27.4.170) with Microsoft SMTP Server id 15.0.1395.4 via Frontend Transport; Sat, 1 Jun 2019 17:26:23 +0800 From: Jitao Shi To: Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , , David Airlie , Matthias Brugger CC: Jitao Shi , Thierry Reding , Ajay Kumar , Inki Dae , Rahul Sharma , Sean Paul , Vincent Palatin , Andy Yan , Philipp Zabel , Russell King , , , , , , , Sascha Hauer , , , , , , Subject: [v4 3/7] drm/mediatek: add dsi reg commit disable control Date: Sat, 1 Jun 2019 17:26:11 +0800 Message-ID: <20190601092615.67917-4-jitao.shi@mediatek.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190601092615.67917-1-jitao.shi@mediatek.com> References: <20190601092615.67917-1-jitao.shi@mediatek.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-MTK: N Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. 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); -- 2.21.0