Message ID | 20230821034008.3876938-7-victor.liu@nxp.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <dri-devel-bounces@lists.freedesktop.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 gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 3F63AEE49A6 for <dri-devel@archiver.kernel.org>; Mon, 21 Aug 2023 03:37:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9548C10E17E; Mon, 21 Aug 2023 03:37:32 +0000 (UTC) Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2060.outbound.protection.outlook.com [40.107.104.60]) by gabe.freedesktop.org (Postfix) with ESMTPS id D6B2410E17E for <dri-devel@lists.freedesktop.org>; Mon, 21 Aug 2023 03:37:29 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jg1XhwC4o+eWCuR3XKQFTvN3Yv5ym5YwWwCbh7x8zs/1o77A8JMv6Nthazgq2qt0SW35ILOV6eK8NfiNcpV4uATr/+SWZRH5zDR+EeuQcoydcCNeMFVDenmPNeaz36jh3C5VRCCx2HfzKa6SO+bNm2e+JdvbJOsjypqtG+eoczsy3an2TMEs8VnQERhcR1uc8Zk5/IvlMCwGawaUM58bdw0XaeqhvGlFxi8qrPIYsJ7J4iO8uRs5rMDq1ILvt/SMdKoFlc51dIbIZ70h1obolH4gXgqYIE31XNvsS011moO0N90gsBgVbSI0Uc0AR7U34ZBHog+2w0kg1ZmX8hBShA== 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=MT32ykjmXob2U8ilTeXW2ZG+9MRcznifpijOIBI7G+Q=; b=kAWdxTSIstEAMrtM8wShgxBivFlL30EeGdUq7cJdcm80RH/Xjfetq+jkAkghSYGc1PKw5gPGnAfi0avzRV+V9mQXq0xVmDTBQTVJmXqnFHqmuGfggc8Qsdj8p+Ziwjyz9PL00tvUq7URlyZhW3Mcz/LgktMxnBAy3qHX21IIFn9whZMrNudbZExAVj0l0kFUnGLImw0bVSMk1nmiM5jkLTJ5DfmE2fp8xLEzZWObQ1marEMaCv9hRCaZaI3JuooJ1ghf+iVB1pjvbZL9MzwpwFgk0LVeIvaKJfaE8VZH/yHTOMFT6muRfwsYb1EQm3TMyKNxYiIjKm5+JsqN8BCppg== 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=MT32ykjmXob2U8ilTeXW2ZG+9MRcznifpijOIBI7G+Q=; b=JQkMpXnQDyBi5XUiwFbxoYMFFfD1EzirKU85PMoEox+drBIJmRqHb2A/qX/36rIF78UfcGgk/FZzynxPd5FJWRaXyzBPgJCWWGEc6v2IYj2WXysgg11IgHLkdSg4ASGefTVc0fOESfFS03MER21wiFyDaCBUe19nf9GqiKPxD/k= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) by PA4PR04MB7758.eurprd04.prod.outlook.com (2603:10a6:102:c4::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6699.20; Mon, 21 Aug 2023 03:37:27 +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.6699.022; Mon, 21 Aug 2023 03:37:27 +0000 From: Liu Ying <victor.liu@nxp.com> To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 RESEND 6/9] drm/bridge: synopsys: dw-mipi-dsi: Set minimum lane byte clock cycles for HSA and HBP Date: Mon, 21 Aug 2023 11:40:05 +0800 Message-Id: <20230821034008.3876938-7-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230821034008.3876938-1-victor.liu@nxp.com> References: <20230821034008.3876938-1-victor.liu@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SI2P153CA0025.APCP153.PROD.OUTLOOK.COM (2603:1096:4:190::12) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|PA4PR04MB7758:EE_ X-MS-Office365-Filtering-Correlation-Id: e9dc83ac-1fb7-4b08-cbd3-08dba1f7f0ab X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: aQuSJqnJ/Hn3x1JkqnVvDwFUiSr4cLyGKatVbL7ZBYVrHjN31EVdQIqpsAFzKnKHkCYxXT44lslMfTKPpjMe2kpXFTWp3DJr8+tAhRTeKWg3X9V4hBcjmqW3oT11W/9yPdw39rF3uP2xDlyk/j55BIEH1z83zdoRbJaPMf/HBAkBtkThCEURXAlDfDKpDOzcDVdhuGGkhnbWawzs8YTr31mtAoO5DHQ45GgKhbFA4JFwPZkGNpOSgxy3L/bqMagMDdxunGD9ouYpvDatcUswVQvA6k9nja5c/guvgNVUHPZYajycVkWZQLHoZbS3eNZlE37Rp7il+VWrkx79rhWlxTi5esSQxrf7wdaPIJOgc3Lj0RxE5LYOjTTz6WHtU38W04B6E58R9q2FZ5agZOIGFyRMhMIhNFidsuBbEaw8n58fdmVkGjCdOt1v8mhUvuebSkZlfaEXtg1nHjcRvRruVSTF8jYAYw3vqYATT3w8YOMZEUpLxYDS9QdFAR/BB8EFxycuvfBjJvSIVSwlXgs5pEyMjWJsgXYq/GGYqapUy+sdV3MhBnBxXwYe3lViS7gliy0KxeQCJsTOXoWxNbfcXXrOFwd1hWjZlc+MM69xFpwBpL0gPYfE65EzkEN3Bg18 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:(13230031)(376002)(39860400002)(136003)(396003)(366004)(346002)(186009)(1800799009)(451199024)(1076003)(2616005)(26005)(6512007)(38350700002)(38100700002)(36756003)(86362001)(83380400001)(316002)(8936002)(8676002)(41300700001)(66476007)(66556008)(66946007)(2906002)(4326008)(478600001)(7416002)(6506007)(6486002)(6666004)(52116002)(5660300002); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: YbY9VrsfI8IAEkygQUNLhL6FSPk+XtVqwEro4S5Ws8aVNWbbnaW5g1veaTx/oiRaaS8KhrdQlgQef6bqwNQZROYCc6fTakNnu5IqdIgRhW4SCrAmJH82epKtdVyP/3KShYg/WJwxC1U2isHrwDVAEIZ/kIqs1Unc7uYQwQE8560LZDPpc9tYchXMsLqYGNP7+fRi9xDp7pOLQhyGArsdya2lWQ/LjRxvlqwuiB4Dnihwyn0kn6JC1kTGcckAnc66UVK2ZEOLSDQPJFEjS61gBudAOmMfHyjl1zFEd1HixgbEv7FSVwwybneMOe/g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Cl3dMgOgy0QqBA8WUN4UFLstMa/VP9KtkRNvr9vPQ3vy3JJ/5vbj7qJuW30s9sKsdnt9gNNtY+tnHHGl5p/oi3vKY9z4m7uUH5P20RzY+11OZswcoQOnOtzfhR4X+prerVpGX2ChygF8nS1lFWhxRgcXxhYBcLI4khpmN9BlSp3/yhw/I/Nua3BRNCwLZhw9TV9wswcf3j4ll/Ozjm0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e9dc83ac-1fb7-4b08-cbd3-08dba1f7f0ab X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Aug 2023 03:37:27.2478 (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: fABbwaGZzHd+s34v0uniyn9mGuCMaI04cEGmtFMGFjUj0KnN/80J766fTZmM79YGbFSGsAaJ0nVhsTDdIbJp+g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7758 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development <dri-devel.lists.freedesktop.org> List-Unsubscribe: <https://lists.freedesktop.org/mailman/options/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=unsubscribe> List-Archive: <https://lists.freedesktop.org/archives/dri-devel> List-Post: <mailto:dri-devel@lists.freedesktop.org> List-Help: <mailto:dri-devel-request@lists.freedesktop.org?subject=help> List-Subscribe: <https://lists.freedesktop.org/mailman/listinfo/dri-devel>, <mailto:dri-devel-request@lists.freedesktop.org?subject=subscribe> Cc: andrzej.hajda@intel.com, alexander.stein@ew.tq-group.com, Laurent.pinchart@ideasonboard.com, krzysztof.kozlowski+dt@linaro.org, zyw@rock-chips.com, rfoss@kernel.org, sam@ravnborg.org, raphael.gallais-pou@foss.st.com, jernej.skrabec@gmail.com, jagan@amarulasolutions.com, linux-imx@nxp.com, conor+dt@kernel.org, kernel@pengutronix.de, jonas@kwiboo.se, s.hauer@pengutronix.de, robh+dt@kernel.org, neil.armstrong@linaro.org, yannick.fertre@foss.st.com, hjc@rock-chips.com, philippe.cornu@foss.st.com, shawnguo@kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" <dri-devel-bounces@lists.freedesktop.org> |
Series |
drm/bridge: imx: Add i.MX93 MIPI DSI support
|
expand
|
diff --git a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c index 18e7d64b0216..c10ca32dff0b 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c @@ -759,12 +759,19 @@ static void dw_mipi_dsi_command_mode_config(struct dw_mipi_dsi *dsi) dsi_write(dsi, DSI_MODE_CFG, ENABLE_CMD_MODE); } +static const u32 minimum_lbccs[] = {10, 5, 4, 3}; + +static inline u32 dw_mipi_dsi_get_minimum_lbcc(struct dw_mipi_dsi *dsi) +{ + return minimum_lbccs[dsi->lanes - 1]; +} + /* Get lane byte clock cycles. */ static u32 dw_mipi_dsi_get_hcomponent_lbcc(struct dw_mipi_dsi *dsi, const struct drm_display_mode *mode, u32 hcomponent) { - u32 frac, lbcc; + u32 frac, lbcc, minimum_lbcc; int bpp; bpp = mipi_dsi_pixel_format_to_bpp(dsi->format); @@ -780,6 +787,11 @@ static u32 dw_mipi_dsi_get_hcomponent_lbcc(struct dw_mipi_dsi *dsi, if (frac) lbcc++; + minimum_lbcc = dw_mipi_dsi_get_minimum_lbcc(dsi); + + if (lbcc < minimum_lbcc) + lbcc = minimum_lbcc; + return lbcc; }