From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E9EF7EB64DD for ; Tue, 1 Aug 2023 09:49:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:Reply-To:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:References:Cc:To:Subject: From:MIME-Version:Date:Message-ID:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=HINFFtfNSa3B+OqY91iORO7Oor4HuTKAN8C0KvP7UJs=; b=LfR8I+QeEE9M4fIZGjrdDeXsAN N9qwhDT1zfKA26t7Z0tUtQtGw3M6BBTskCMMM8E775RxhlIK2MX4C/2GAlPHTlkpkdygCVzIZJJ8Z CGEfSa6eZ33BW6bmvD7JXB0ujW4C+ouOeNVJtJOqC3D7HGRkk+1BSvcdtOXicmVKFnbEoThl2nILk 1H6S6p3uhiS4E1qBwNSPElinKvmXepLf1ZDT6BTiaR65l/AKd2JRn2p1/P1aMczNpnkHRLJFTXYTi Em/3+y8U9c6qduLc2YseSq+j7xnxkgWFUOfXo01oci7VJu4oeThzGDNlyKU/NvRS3uull9+moPXct 5W2G118w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qQlu8-001e4p-0E; Tue, 01 Aug 2023 09:43:00 +0000 Received: from mail-wr1-x42a.google.com ([2a00:1450:4864:20::42a]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qQlu2-001e1T-1S for linux-arm-kernel@lists.infradead.org; Tue, 01 Aug 2023 09:42:58 +0000 Received: by mail-wr1-x42a.google.com with SMTP id ffacd0b85a97d-31765792c7cso5683208f8f.0 for ; Tue, 01 Aug 2023 02:42:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1690882971; x=1691487771; h=content-transfer-encoding:in-reply-to:organization:references:cc:to :content-language:subject:reply-to:from:user-agent:mime-version:date :message-id:from:to:cc:subject:date:message-id:reply-to; bh=7ZHtkQBwYJWC3v3bJWmfz/i0gWwYwgp5p+j4xvyTGTE=; b=RCuElZ03uOIXpeiisCk+hSTxfkXSgPS06OqCadIKp0yk3xf00FqESa8DG4xLQk+HuW 329VXl9xTia4AwNFJPcr3K9Sieub8uRG+f1U3FDPIA7F9gdfwVVN00pDMnlQFcC4Mqkg Z2OjpIR31igB6ZhoCj0xVXYiXZQ24q2/O/mBDdcw74IAJntuZosDT4GGfu2uOmOHTIdU luXDBCKxTVOgwc7GHYB/DIRKBhhZPzPh1vsSK+40kzOJdhbVfarliq+0wMwNzkSKjJFn MuY9GiCTi8iqcefvIlatigbi3jvTT/kw/bZL7WLgrpBEv35R/mG8Nc8Crv/H/SwOjDp2 +irg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1690882971; x=1691487771; h=content-transfer-encoding:in-reply-to:organization:references:cc:to :content-language:subject:reply-to:from:user-agent:mime-version:date :message-id:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=7ZHtkQBwYJWC3v3bJWmfz/i0gWwYwgp5p+j4xvyTGTE=; b=DcPK+mCBTagNOfJGClj7UHOVg9gvHzMXDHIJyWmI+pVFqIbc1o1OgYOdz+sd82BefE hp4zFmHb89m10ObvRvWg1J77mo/lOnKkPpkybY032kbnAcW1/PL5z++RO6GiLrPo13+y l37p1tVjWjygG9WnWyUjI/DGtAeKFmSeUwFuBne+QsX7WGQHIV35VG+akB/kBIP8ZP8y DBE9r+am5t9CTH9RGZEpkmNOfENJ00apMBhlqeVp//rNUk5Hv70czYVYsiHnNLSLQAXE 4EbRKBeSqlF+zfd8SvKbSFdn08cp6+3gzVnCt+Ub8JzcEsumHLgsAO+Uf7dS6W5RJ8xu fhqw== X-Gm-Message-State: ABy/qLYR0dYqiyLYVPuns5+Wfo96HQpmpYsRnTFR023lRi5XG6oKsWIM RzsJxL4reE+7E2Pf/lr3sl2/Ig== X-Google-Smtp-Source: APBJJlFnFH+EEEeNtiva1AIY578o6dsghC4jMpKOnKQ79gJShSS2WayhhW4ndyjf9hsAO2wSLswejg== X-Received: by 2002:adf:e946:0:b0:317:4cf8:35f9 with SMTP id m6-20020adfe946000000b003174cf835f9mr1888323wrn.16.1690882971601; Tue, 01 Aug 2023 02:42:51 -0700 (PDT) Received: from ?IPV6:2a01:e0a:982:cbb0:b92a:81a9:df6e:1e3? ([2a01:e0a:982:cbb0:b92a:81a9:df6e:1e3]) by smtp.gmail.com with ESMTPSA id x1-20020a5d60c1000000b00317afc7949csm1091567wrt.50.2023.08.01.02.42.50 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Tue, 01 Aug 2023 02:42:51 -0700 (PDT) Message-ID: <95dc8275-feae-fd03-48bb-5f27e619c021@linaro.org> Date: Tue, 1 Aug 2023 11:42:50 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.12.0 From: neil.armstrong@linaro.org Subject: Re: [PATCH 7/9] drm/bridge: synopsys: dw-mipi-dsi: Disable HSTX and LPRX timeout check Content-Language: en-US To: Liu Ying , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: andrzej.hajda@intel.com, rfoss@kernel.org, Laurent.pinchart@ideasonboard.com, jonas@kwiboo.se, jernej.skrabec@gmail.com, airlied@gmail.com, daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com References: <20230717061831.1826878-1-victor.liu@nxp.com> <20230717061831.1826878-8-victor.liu@nxp.com> Organization: Linaro Developer Services In-Reply-To: <20230717061831.1826878-8-victor.liu@nxp.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230801_024254_488039_BFC2538A X-CRM114-Status: GOOD ( 20.85 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: neil.armstrong@linaro.org Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On 17/07/2023 08:18, Liu Ying wrote: > According to Synopsys DW MIPI DSI host databook, HSTX and LPRX timeout > contention detections are measured in TO_CLK_DIVISION cycles. However, > the current driver programs magic values to TO_CLK_DIVISION, HSTX_TO_CNT > and LPRX_TO_CNT register fields, which makes timeout error event wrongly > happen for some video modes, at least for the typical 1920x1080p@60 video > mode read from a HDMI monitor driven by ADV7535 DSI to HDMI bridge. > While at it, the current driver doesn't enable interrupt to handle or > complain about the error status, so true error just happens silently > except for display distortions by visual check. > > Disable the timeout check by setting those timeout register fields to > zero for now until someone comes along with better computations for the > timeout values. Although the databook doesn't mention what happens when > they are set to zero, it turns out the false error doesn't happen for > the 1920x1080p@60 video mode at least. > > Signed-off-by: Liu Ying > --- > drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c > index 536306ccea5a..0fcadf99e783 100644 > --- a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c > +++ b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c > @@ -684,7 +684,7 @@ static void dw_mipi_dsi_init(struct dw_mipi_dsi *dsi) > * timeout clock division should be computed with the > * high speed transmission counter timeout and byte lane... > */ > - dsi_write(dsi, DSI_CLKMGR_CFG, TO_CLK_DIVISION(10) | > + dsi_write(dsi, DSI_CLKMGR_CFG, TO_CLK_DIVISION(0) | > TX_ESC_CLK_DIVISION(esc_clk_division)); > } > > @@ -747,7 +747,7 @@ static void dw_mipi_dsi_command_mode_config(struct dw_mipi_dsi *dsi) > * compute high speed transmission counter timeout according > * to the timeout clock division (TO_CLK_DIVISION) and byte lane... > */ > - dsi_write(dsi, DSI_TO_CNT_CFG, HSTX_TO_CNT(1000) | LPRX_TO_CNT(1000)); > + dsi_write(dsi, DSI_TO_CNT_CFG, HSTX_TO_CNT(0) | LPRX_TO_CNT(0)); > /* > * TODO dw drv improvements > * the Bus-Turn-Around Timeout Counter should be computed Reviewed-by: Neil Armstrong _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel