Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp4174875rwl; Sat, 7 Jan 2023 12:34:02 -0800 (PST) X-Google-Smtp-Source: AMrXdXv5T0mdDKFDf5TT2G260w1dIJP8oCTNb6xeTEQ0BoxTcA3EBqqYc+QLU+3/KfOvIu/bU91z X-Received: by 2002:a17:907:6ea9:b0:7c0:e7ad:5296 with SMTP id sh41-20020a1709076ea900b007c0e7ad5296mr65052954ejc.55.1673123642587; Sat, 07 Jan 2023 12:34:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673123642; cv=none; d=google.com; s=arc-20160816; b=tGY5/FHLx9o8n5+T61eGBTykNFoO7yS4FvWQICVh0UayK5DSeZuQawAcoqfwpuKMZv sxxqNGoclEeI5B9qfQ9srqFLT0WI675rUU7JMAL4e6tju3L+PI51Ikzzvabu7Ijefhg9 0C86OLPMsGYRdmta6RSJ5XDdsKQttqfRZ957aPFtUhg0noznMgH5rMtQgs+uVYRXKFsX ZQD6nxHPVpsKEq7wiYl6mXr0xkshPx1iLjSS4VkYv2r4MpNqG9qLocqDMpWga0fk9sd3 eZD2WmPwf/+EjI2PKXXg3695eTMX0ekAtCuyteEyB4CJwJcERSQ/xZFoKP5pQ+6kZC1v QmPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=rLc3YOYbPb9xwmyzxI6Lpp2PYUZ9uu8/nbksT8vM0m4=; b=xUFHBTReQJUp5MMfHrKACq+z0JzMUWvsuJyXMJ/+bT9vjtkJi7bbWtX/RqWYeu/Tvk nGeCR+1hDGB9JjqB93dk3BdtTr21VUFE9tftxLLiHil0D0Gu4tg60PTV2PmRQeDwtyzm 9LG0+ZVD8n8GFl3kYhqwfkM2P5pgGZqt5O4YgSVpa6eHFH4kGcggxHhhTsJ2MdCsXoB1 vEvBwpWtzY/EtLFcb3b3Phx90VuPsE9iwYXgT6pNGgUCOXNoLfbg1dHt8kJbGaNn/cHp Il0Y/7UjlHv7YQlZ8mDn9tzQC+8ALlkSPzwEpVoTitJuB+4tBPIahB84M3stMwbAOG6X BK6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ravnborg.org header.s=rsa2 header.b=wV1bp9q9; dkim=neutral (no key) header.i=@ravnborg.org; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id p20-20020a1709060dd400b007c0a88076d5si3655595eji.818.2023.01.07.12.33.49; Sat, 07 Jan 2023 12:34:02 -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=@ravnborg.org header.s=rsa2 header.b=wV1bp9q9; dkim=neutral (no key) header.i=@ravnborg.org; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232788AbjAGU3j (ORCPT + 53 others); Sat, 7 Jan 2023 15:29:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59474 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232862AbjAGU3f (ORCPT ); Sat, 7 Jan 2023 15:29:35 -0500 X-Greylist: delayed 113078 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Sat, 07 Jan 2023 12:29:33 PST Received: from mailrelay4-1.pub.mailoutpod2-cph3.one.com (mailrelay4-1.pub.mailoutpod2-cph3.one.com [IPv6:2a02:2350:5:403::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A7B614100C for ; Sat, 7 Jan 2023 12:29:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ravnborg.org; s=rsa2; h=in-reply-to:content-type:mime-version:references:message-id:subject:cc:to: from:date:from; bh=rLc3YOYbPb9xwmyzxI6Lpp2PYUZ9uu8/nbksT8vM0m4=; b=wV1bp9q9M9mWhrbjGKzzHREqP2xOnbX74ksjXsaLvEXewl2gCQHp2fpPRKdtvosNVstynBeW05VDI vL8aj2fKWtXR3etkNT6gVUeujgnN9DPXKS+ou1sukMlzERzI/8uszKIpimZOsBi//koZCR1AGZAi6T BVyQpARfE77gLhbcmuzbshuHmHlw1FHGzVuIdwFdEgmxysHwdCDipepnYLXQ319OL6j1OQaZYPYoKn wB9JcWZtiCooC278G3CuFJMHFIj9mb3Y615H4Af4QUR+Jfcj0foCcKpR/jUpDNiXc+7CIcz5vVePwn NPA4yrsm2tHjbcVQ/UaZJT0jBJeYOoA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ravnborg.org; s=ed2; h=in-reply-to:content-type:mime-version:references:message-id:subject:cc:to: from:date:from; bh=rLc3YOYbPb9xwmyzxI6Lpp2PYUZ9uu8/nbksT8vM0m4=; b=xr2GmnEO+b/JkiuLoADgRCNiswL18k4T0RfjpdzgokXtktLQVOjcPBMNfhD/w4BhyzamBF3viUlpL eh/wIqlBg== X-HalOne-ID: fc4bdb3e-8ec9-11ed-91a0-87783a957ad9 Received: from ravnborg.org (2-105-2-98-cable.dk.customer.tdc.net [2.105.2.98]) by mailrelay4 (Halon) with ESMTPSA id fc4bdb3e-8ec9-11ed-91a0-87783a957ad9; Sat, 07 Jan 2023 20:29:31 +0000 (UTC) Date: Sat, 7 Jan 2023 21:29:29 +0100 From: Sam Ravnborg To: xinlei.lee@mediatek.com Cc: 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, 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 Subject: Re: [PATCH 1/2] drm/mediatek: dsi: Reduce the time of dsi from LP11 to sending cmd Message-ID: References: <1672974321-18947-1-git-send-email-xinlei.lee@mediatek.com> <1672974321-18947-2-git-send-email-xinlei.lee@mediatek.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1672974321-18947-2-git-send-email-xinlei.lee@mediatek.com> X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_NONE, URIBL_BLACK autolearn=no 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: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jan 06, 2023 at 11:05:20AM +0800, xinlei.lee@mediatek.com wrote: > From: Xinlei Lee > > 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 Seems OK. Acked-by: Sam Ravnborg > --- > 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