Message ID | 1672974321-18947-2-git-send-email-xinlei.lee@mediatek.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp611766wrt; Thu, 5 Jan 2023 19:11:31 -0800 (PST) X-Google-Smtp-Source: AMrXdXuNN43NXtR6+SU8YFD40UwDSLL+bGnKmbJtt73ktTn/DJmVDgFlp7atp/+8xH4UCCXyxfT+ X-Received: by 2002:a05:6402:2214:b0:47e:6b3c:9319 with SMTP id cq20-20020a056402221400b0047e6b3c9319mr42992090edb.5.1672974691242; Thu, 05 Jan 2023 19:11:31 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672974691; cv=none; d=google.com; s=arc-20160816; b=CjH2RAafFLGGXnrQexep0DZ0wZERXldcH1bzkUV3pINRhfah0p1Ltd5lJR8cQs3Ozr 9NZOdh5WYAbukSuSL3S2PQhwxozyR/x5+PPYM2B9Hc5RAPuC5UiZVmldX7WPXytjrjJ4 Nh7d09OHU52y79em39/M9nOl4uDOZDxJXF+h6nZmgPZFhirpyktZ0PyYHT2DglPRvY+I 2iGN8+IaqvT1poXeFAagAPZ5tmJXI9Aj0dgwdPmdIfgdXNGmiE1OSZY0mSQs59zrniNo qexx6totLpM9tiTlaw43dI5/3Zb2PyG8b6oU/TVQugCS669N2eeSuRjIO3R/koQOE0t9 +j5A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=vjjQa6tfGqAYgeZlc/YDNnK2piaGCELP74Iq2RoJg9U=; b=ujypYzxon1Bmf6xFWC91UCvnZonY+dYiyowAPwLLXzq4lvDsOB3lakziyzIsKwSbNN AKU/4Mgi6ia6fUm18mmaO2vmpd3AGKO6UdMw+5LTt8r6qyQDlLu2QAWSTLxUFYLt0NPK O9/QkU4cTGXysF10FUQOgNn5g8RJl5Mjv7w3PbcOSB26EL7DP5URIdKNhji/LbmxJIWB xqDxE34PPjOqwOXa9lRKUJSP1gGp0T/9wGB6Zt6K3bYKhYdo2PPSe2XzZaDWulsQQ0Zj LvgZzajlBTQltlGKfCO5inpm9WtyPdaQvIBwyyJCsXjDADy1VY5Q0QPVQUH19JQkaqs1 H6yQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=eLa6Q+Ge; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id f20-20020a056402355400b0048c0b5672cesi156467edd.552.2023.01.05.19.11.06; Thu, 05 Jan 2023 19:11:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@mediatek.com header.s=dk header.b=eLa6Q+Ge; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=mediatek.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231474AbjAFDFo (ORCPT <rfc822;tmhikaru@gmail.com> + 99 others); Thu, 5 Jan 2023 22:05:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230182AbjAFDFh (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Thu, 5 Jan 2023 22:05:37 -0500 Received: from mailgw02.mediatek.com (unknown [210.61.82.184]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7FEE4F8 for <linux-kernel@vger.kernel.org>; Thu, 5 Jan 2023 19:05:36 -0800 (PST) X-UUID: f65cad4b7d694fb9b51fd19c05521070-20230106 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=vjjQa6tfGqAYgeZlc/YDNnK2piaGCELP74Iq2RoJg9U=; b=eLa6Q+GeXAaIjv3urHuHTkZjc0fqxuAmBaJRT9bdsCPpeOzT6mLmrk6c7U7SWIRBVQCRmuQwAAZc0T4KhryNE/ItFF/+A6SL/lzICLrpIyWaz2K9a+9geCbYDuDp/+PBfBqBziAp7Ya8l2MZ668Vvxp+xXd+8o4QR2ol1aXEg98=; X-CID-P-RULE: Release_Ham X-CID-O-INFO: VERSION:1.1.17,REQID:f7352c0c-78e5-4c84-9c76-0bdecc274a8b,IP:0,U RL:0,TC:0,Content:0,EDM:0,RT:0,SF:0,FILE:0,BULK:0,RULE:Release_Ham,ACTION: release,TS:0 X-CID-META: VersionHash:543e81c,CLOUDID:f566698b-8530-4eff-9f77-222cf6e2895b,B ulkID:nil,BulkQuantity:0,Recheck:0,SF:102,TC:nil,Content:0,EDM:-3,IP:nil,U RL:0,File:nil,Bulk:nil,QS:nil,BEC:nil,COL:0,OSI:0,OSA:0 X-CID-BVR: 0 X-UUID: f65cad4b7d694fb9b51fd19c05521070-20230106 Received: from mtkmbs13n2.mediatek.inc [(172.21.101.108)] by mailgw02.mediatek.com (envelope-from <xinlei.lee@mediatek.com>) (Generic MTA with TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 256/256) with ESMTP id 631864107; Fri, 06 Jan 2023 11:05:29 +0800 Received: from mtkmbs11n2.mediatek.inc (172.21.101.187) by mtkmbs10n1.mediatek.inc (172.21.101.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.792.15; Fri, 6 Jan 2023 11:05:27 +0800 Received: from mszsdaap41.gcn.mediatek.inc (10.16.6.141) by mtkmbs11n2.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.2.792.15 via Frontend Transport; Fri, 6 Jan 2023 11:05:26 +0800 From: <xinlei.lee@mediatek.com> To: <chunkuang.hu@kernel.org>, <p.zabel@pengutronix.de>, <airlied@linux.ie>, <daniel@ffwll.ch>, <matthias.bgg@gmail.com>, <angelogioacchino.delregno@collabora.com>, <jitao.shi@mediatek.com>, <thierry.reding@gmail.com>, <sam@ravnborg.org> CC: <dri-devel@lists.freedesktop.org>, <linux-kernel@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <linux-mediatek@lists.infradead.org>, <Project_Global_Chrome_Upstream_Group@mediatek.com>, Xinlei Lee <xinlei.lee@mediatek.com> Subject: [PATCH 1/2] drm/mediatek: dsi: Reduce the time of dsi from LP11 to sending cmd Date: Fri, 6 Jan 2023 11:05:20 +0800 Message-ID: <1672974321-18947-2-git-send-email-xinlei.lee@mediatek.com> X-Mailer: git-send-email 2.6.4 In-Reply-To: <1672974321-18947-1-git-send-email-xinlei.lee@mediatek.com> References: <1672974321-18947-1-git-send-email-xinlei.lee@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain X-MTK: N X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754241109419814758?= X-GMAIL-MSGID: =?utf-8?q?1754241109419814758?= |
Series |
Reduce lcm_reset to DSI LP11 send cmd time
|
|
Commit Message
Xinlei Lee (李昕磊)
Jan. 6, 2023, 3:05 a.m. UTC
From: Xinlei Lee <xinlei.lee@mediatek.com> According to Figure 16 Turnaround Procedure on page 36 in [1], you can see the status of LP-00 -> LP10 -> LP11. This state can correspond to the state of DSI from LP00 -> LP11 in mtk_dsi_lane_ready function in mtk_dsi.c. LP-00 -> LP10 -> LP11 takes about 2*TLPX time (refer to [1] page 51 to see that TLPX is 50ns). The delay at the end of the mtk_dsi_lane_ready function should be greater than the 2*TLPX specified by the DSI spec, and less than the time specified by the DSI_RX (generally 6ms to 40ms), to avoid problems caused by the RX specification. [1]:mipi_D-PHY_specification_v1-1 Fixes: 39e8d062b03c ("drm/mediatek: Keep dsi as LP00 before dcs cmds transfer") Signed-off-by: Xinlei Lee <xinlei.lee@mediatek.com> --- drivers/gpu/drm/mediatek/mtk_dsi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
Comments
On Fri, Jan 06, 2023 at 11:05:20AM +0800, xinlei.lee@mediatek.com wrote: > From: Xinlei Lee <xinlei.lee@mediatek.com> > > According to Figure 16 Turnaround Procedure on page 36 in [1], you > can see the status of LP-00 -> LP10 -> LP11. This state can correspond > to the state of DSI from LP00 -> LP11 in mtk_dsi_lane_ready function > in mtk_dsi.c. > > LP-00 -> LP10 -> LP11 takes about 2*TLPX time (refer to [1] page 51 > to see that TLPX is 50ns). > > The delay at the end of the mtk_dsi_lane_ready function should be > greater than the 2*TLPX specified by the DSI spec, and less than > the time specified by the DSI_RX (generally 6ms to 40ms), to avoid > problems caused by the RX specification. > > [1]:mipi_D-PHY_specification_v1-1 > > Fixes: 39e8d062b03c ("drm/mediatek: Keep dsi as LP00 before dcs cmds transfer") > Signed-off-by: Xinlei Lee <xinlei.lee@mediatek.com> Seems OK. Acked-by: Sam Ravnborg <sam@ravnborg.org> > --- > drivers/gpu/drm/mediatek/mtk_dsi.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c > index 3b7d13028fb6..9e1363c9fcdb 100644 > --- a/drivers/gpu/drm/mediatek/mtk_dsi.c > +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c > @@ -721,7 +721,7 @@ static void mtk_dsi_lane_ready(struct mtk_dsi *dsi) > mtk_dsi_clk_ulp_mode_leave(dsi); > mtk_dsi_lane0_ulp_mode_leave(dsi); > mtk_dsi_clk_hs_mode(dsi, 0); > - msleep(20); > + usleep_range(1000, 3000); > /* The reaction time after pulling up the mipi signal for dsi_rx */ > } > } > -- > 2.18.0
Il 06/01/23 04:05, xinlei.lee@mediatek.com ha scritto: > From: Xinlei Lee <xinlei.lee@mediatek.com> > > According to Figure 16 Turnaround Procedure on page 36 in [1], you > can see the status of LP-00 -> LP10 -> LP11. This state can correspond > to the state of DSI from LP00 -> LP11 in mtk_dsi_lane_ready function > in mtk_dsi.c. > > LP-00 -> LP10 -> LP11 takes about 2*TLPX time (refer to [1] page 51 > to see that TLPX is 50ns). > > The delay at the end of the mtk_dsi_lane_ready function should be > greater than the 2*TLPX specified by the DSI spec, and less than > the time specified by the DSI_RX (generally 6ms to 40ms), to avoid > problems caused by the RX specification. > > [1]:mipi_D-PHY_specification_v1-1 > > Fixes: 39e8d062b03c ("drm/mediatek: Keep dsi as LP00 before dcs cmds transfer") > Signed-off-by: Xinlei Lee <xinlei.lee@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c index 3b7d13028fb6..9e1363c9fcdb 100644 --- a/drivers/gpu/drm/mediatek/mtk_dsi.c +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c @@ -721,7 +721,7 @@ static void mtk_dsi_lane_ready(struct mtk_dsi *dsi) mtk_dsi_clk_ulp_mode_leave(dsi); mtk_dsi_lane0_ulp_mode_leave(dsi); mtk_dsi_clk_hs_mode(dsi, 0); - msleep(20); + usleep_range(1000, 3000); /* The reaction time after pulling up the mipi signal for dsi_rx */ } }