Message ID | 20230720071430.259892-8-victor.liu@nxp.com |
---|---|
State | Superseded |
Headers | show
Return-Path: <devicetree-owner@vger.kernel.org> X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 08DA6EB64DD for <linux-devicetree@archiver.kernel.org>; Thu, 20 Jul 2023 07:12:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230345AbjGTHMW (ORCPT <rfc822;linux-devicetree@archiver.kernel.org>); Thu, 20 Jul 2023 03:12:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230297AbjGTHLx (ORCPT <rfc822;devicetree@vger.kernel.org>); Thu, 20 Jul 2023 03:11:53 -0400 Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2057.outbound.protection.outlook.com [40.107.247.57]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D36E12726 for <devicetree@vger.kernel.org>; Thu, 20 Jul 2023 00:10:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IbCJ9kWD2576lAbJvOqOc96c7JpFbErWnoQg1deS8kRDIi6Ios6M8b3lmOy1NmsZXLRxqrYbH6zBlBvcI9nP8YsiTlan957NQMDdyOyhaI81d5qhSOt8FDPTHm7IYqsbLSCuwHArGNzG27scNkZ+y+hJq88QlL/bBr8eTOqLA7vSyWpzXbEfx6Duu/eHp7+Xn3JEEr1vFn4zYlQMhkGeqaBwgBpuEa/zyIA9kRJRcixnnc6wVztW64RTQxPz6PE7uA6/iqbWtSoEjBHKyNVUgAhm8QN1jrTIl4DnbJZ6cBfTOjIwRAhkLJNfxTNQZr/nf796gqu5nYf6kWdEt7Shlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=Ro5EOp6mEkZd6S0WaGYqv9gtqvuAyxqa35OiIznoIJM=; b=aRyBzTpAqz60XTbrMF6FH2g01fRPjL5bwbZ7U7Rr2yrJvJjC4YEDH+N5pxgr8n64Uf6BNxEvSrDVGKw8/GwN5pyGMox4ptZfZxzlbIzCqQGfDO+a0RPOCb6oESxTXlUuGzTGS1cz+qd6FbK5K2LA/A+hWlkc8G7rrjKlmqCNCe6NDg2ghTeSRG8lwqmqfHhCVQeS2AgiUSEkviXpyDJe7Z3NjlbT8EVCw8XpjsbVfVrCpCRP+22e3zMylOPqLEmwdbNPYzFwIxNo/E2cjj5mKuCXku7DwT2MZyv/cJ69bVXxQWsyB8NJPZmaUasRw6qlEzjryUdUFnm+XmJ95DSi0g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Ro5EOp6mEkZd6S0WaGYqv9gtqvuAyxqa35OiIznoIJM=; b=gP5Pv9/8giUgjPKf9juczSRwGAZ9QONFVE7ZUSydo0yCkNKoZITS04244VquGNNS1k5AXjV6WI4RClLEUGG69yZUDLTm2pZOiaj/bKRTvdnfYD9TwvFYLj/7HjmhDS1c3TTwuyCCHHDv8rtI/SmyOukdFo4HgJjO04Z7w7OEyA8= Received: from AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) by AM9PR04MB8415.eurprd04.prod.outlook.com (2603:10a6:20b:3b5::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.24; Thu, 20 Jul 2023 07:10:32 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::9018:e395:332c:e24b]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::9018:e395:332c:e24b%4]) with mapi id 15.20.6609.022; Thu, 20 Jul 2023 07:10:32 +0000 From: Ying Liu <victor.liu@nxp.com> To: "dri-devel@lists.freedesktop.org" <dri-devel@lists.freedesktop.org>, "devicetree@vger.kernel.org" <devicetree@vger.kernel.org>, "linux-arm-kernel@lists.infradead.org" <linux-arm-kernel@lists.infradead.org> CC: "andrzej.hajda@intel.com" <andrzej.hajda@intel.com>, "neil.armstrong@linaro.org" <neil.armstrong@linaro.org>, "rfoss@kernel.org" <rfoss@kernel.org>, "Laurent.pinchart@ideasonboard.com" <Laurent.pinchart@ideasonboard.com>, "jonas@kwiboo.se" <jonas@kwiboo.se>, "jernej.skrabec@gmail.com" <jernej.skrabec@gmail.com>, "airlied@gmail.com" <airlied@gmail.com>, "daniel@ffwll.ch" <daniel@ffwll.ch>, "robh+dt@kernel.org" <robh+dt@kernel.org>, "krzysztof.kozlowski+dt@linaro.org" <krzysztof.kozlowski+dt@linaro.org>, "conor+dt@kernel.org" <conor+dt@kernel.org>, "shawnguo@kernel.org" <shawnguo@kernel.org>, "s.hauer@pengutronix.de" <s.hauer@pengutronix.de>, "kernel@pengutronix.de" <kernel@pengutronix.de>, "festevam@gmail.com" <festevam@gmail.com>, dl-linux-imx <linux-imx@nxp.com>, "alexander.stein@ew.tq-group.com" <alexander.stein@ew.tq-group.com>, "sam@ravnborg.org" <sam@ravnborg.org>, "jagan@amarulasolutions.com" <jagan@amarulasolutions.com> Subject: [PATCH v2 7/9] drm/bridge: synopsys: dw-mipi-dsi: Disable HSTX and LPRX timeout check Thread-Topic: [PATCH v2 7/9] drm/bridge: synopsys: dw-mipi-dsi: Disable HSTX and LPRX timeout check Thread-Index: Adm62UWNCyqQxjzgdUmjJHPwqEPmsA== Date: Thu, 20 Jul 2023 07:10:32 +0000 Message-ID: <20230720071430.259892-8-victor.liu@nxp.com> References: <20230720071430.259892-1-victor.liu@nxp.com> In-Reply-To: <20230720071430.259892-1-victor.liu@nxp.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: SI2PR01CA0039.apcprd01.prod.exchangelabs.com (2603:1096:4:193::16) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) x-mailer: git-send-email 2.37.1 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: AM7PR04MB7046:EE_|AM9PR04MB8415:EE_ x-ms-office365-filtering-correlation-id: 69888b05-0bd7-4453-d394-08db88f0680e x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: LKldNpDWd3hmOB/Bpr6a/6F+3FGySCfQn0aNbYMoMxq7aYZ+Rht1uBeeIySt+V2g6bK4KY7nvLgBwcPbgnA5f9PsECC4un7UtJAS7k/v8xep9ERrzTBpd1OiGeicnFolVXyUY0EPdOIwN7r5OISl6Hs3OTqTbgHw64yzdf9cEGU8DlFrMg91u6E4/XdkNcXNezZJ4HbbDxeA1bMXgRBBWjReMAP2KPB6eq3IwpES3bRjOiW+dGS6C31IoEU8KVDzzBhK1H4aiZLJnlPLjuGWXe53KZ3twYzSS6l62ZyI33n0kojVGjPBNzh60uU3a1l17XYFCsDRsJkAAuNCJmTS4aS1kSV6Yw8mXJB2yradc5fLPKfMHgzSr3h/jgP5J7+X8dFpNrA+cC1mpD0j8h4NrJGU8GyI9R4hOuF4Xu/9+3p/8hckFxiRCxCb8M/p1u5TNKpEerJAmcpIRvKCUbMsFdhS+0pHv2nN+Z6G1BMyPsZLHbazmOsmwPN1hulffMe9a/TYZenm3BvTijtTae23+DPeMtOsdOlnD7rPPZy7Tq6XP0ECzbqI+xq0y3sIALxDzz0XweBB4rMwshXZzMXP95JX4+/Svur4nK8dB6CZ+oQMrYW3z/SzoJkgcaZrFvPI x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM7PR04MB7046.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(366004)(136003)(376002)(39860400002)(346002)(396003)(451199021)(6506007)(478600001)(1076003)(26005)(6486002)(52116002)(2906002)(6512007)(71200400001)(4326008)(5660300002)(66556008)(316002)(66946007)(66476007)(83380400001)(66446008)(54906003)(110136005)(64756008)(38350700002)(36756003)(38100700002)(7416002)(8936002)(8676002)(86362001)(186003)(2616005)(41300700001)(122000001);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?R+gKqyyMBFptvoZofgvNiPp?= =?iso-8859-1?q?3Z0pBsgkrmLlzPqaRLdxtn7K7j8zGT9EolawKCCxcgf0O1DYFpT7ivr++f0f?= =?iso-8859-1?q?N5LKSiDQa+rykZz6zxMrZIQhN4mNefL/XlgF1m2ThxOnrKqPj/FuxsQc23Fm?= =?iso-8859-1?q?n3wpAfISldqhulFiusNuk/iKCnCHd8YdmU5fX94wdhSPa/9XEpYDpAS6+F5m?= =?iso-8859-1?q?oJ0eFNdLYngLkWHaGwtCN0CpmdJ4proZH96BBEtz0NkUgW0574veT8hiWYLX?= =?iso-8859-1?q?fxI0PQDoFFxz+o7Yr2t3oA8JnxAliaj6hv8E10Vdf0pCxOg/YEtUf6GleUU4?= =?iso-8859-1?q?zW5sM17pSQv4aGSgS58GnRzzJxdKEjYyUMRL5uy7ptRNHysSjr4ZKWlMjvGV?= =?iso-8859-1?q?0Wg2MrL9aiZR3ydczp6SI9QSd04F+d+Okj1SrTfF5j+VRN3W9ZT5Go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q?9VqOxRK+nSkHSK8NhufT+iL8V9jwdZG9p9jg8/F26Jf2XQGdEEJUFhp+AewD?= =?iso-8859-1?q?JlflX5ZUgGnx57R5GwsIU6EpWRxFG+i+mxL3pA5eV1WpXXf+J6wfTgT0YFlU?= =?iso-8859-1?q?eMg81Su9p/ahC7Ckg4YCepArYA1KOrpz2NfeRgZbTN+MM82LYMFlccvszliY?= =?iso-8859-1?q?tkvqATog/0UWehcvoi2Wpmtkgtd2/zHMpKX2jxAHHsY1ibtJkFy0pMB4vOHD?= =?iso-8859-1?q?4tFKn+Y5fOSDBlr2nXXiQGpjAQlTqC4uyGleO3ViZunhNZU4h3Nn7ER0nEd3?= =?iso-8859-1?q?0S/bcuj37+G/8ghLz?= Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 69888b05-0bd7-4453-d394-08db88f0680e X-MS-Exchange-CrossTenant-originalarrivaltime: 20 Jul 2023 07:10:32.1952 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: XUixrAXBC+LPWrgLCvV6MFuqbsLdl3WfEDdnZ2lRWIAs6kJbodURnp6wiF1XEWL2sLKanjt2MSd/Uu8z1lsppg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8415 Precedence: bulk List-ID: <devicetree.vger.kernel.org> X-Mailing-List: devicetree@vger.kernel.org |
Series |
[v2,1/9] drm/bridge: synopsys: dw-mipi-dsi: Add dw_mipi_dsi_get_bridge() helper
|
expand
|
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
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 <victor.liu@nxp.com> --- v1->v2: * No change. drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)