Message ID | 20230807052608.3038698-7-victor.liu@nxp.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show
Return-Path: <linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 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 E8E02C04A6A for <linux-arm-kernel@archiver.kernel.org>; Mon, 7 Aug 2023 05:23: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-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=OqwKt14PM3S7u8oB5Mda/Gf1Y8sMysSQpcX/rhHb1/I=; b=ZoqphXk5zMKmk4 DpS7hoPiNVFtDTdEUY6LgJqP/vRNLSBtlRI907m96ywxZOGDwSIiwRNOpUaczja2+DTRkzaPUZfBO 41NoUykYO5ri+jfK0AKYHpMHs9udWT7MyiiQNz8xFtqteZuGMkAZ+5BJ+n9w1Vl3D1IWy5KQUtpjj CTgHnmri3GQACtmEUdO+etqAvxs9ITncWsVb4gmU5CQgOnGHr2g6YN39O8k94hgEqWGXJeiiIw9B4 1ABrCBjZZz4FaiIqT0j6w/qvcqNY4IDLgeBuj2nnvd7SDHKoldNhVRq3jKS10nXhsVMoeTDmG9BYL 4VdB3ba42pcKiVzG2irw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qSshS-00GAba-0w; Mon, 07 Aug 2023 05:22:38 +0000 Received: from mail-am7eur03on20625.outbound.protection.outlook.com ([2a01:111:f400:7eaf::625] helo=EUR03-AM7-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qSshP-00GAZE-0Z for linux-arm-kernel@lists.infradead.org; Mon, 07 Aug 2023 05:22:36 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ByWjAylLX62Cxye64VHA46WAfJJtMSeVJCx3fchDTSuzY1znOrwXc8C/QicNPq/Y+bxXv7KgKCzH0rVRQsVm8YyPCA4g0zQu8ne03VTNCZZMvW8wf7X2ePhYzx6VVzuQNlUalKDxBxWxk01U5nHPqBEPedQpH+yrv0OqiO5+Zz74VC73tN+aw2UJrTDuFQmMMVXmi+RSfwjLPG5jGtdFxllcG+XwzXEm6ssl+2KXqJdmJlOB2dIPxju0+IJobMUL+KqC7/E8+lUiTm9G/qbZdS0sU2Fk0mZFA2TvGWAGuE3hH9A+Y6EghzHdwGLNnSpx+BHzDLdUB15eDHkGVry0CQ== 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=HP+CSUUYPPxXfIYSwkFDGPmnNs8Dq19ovS0tsBKgpT8=; b=KLbUKS7mValfuZPLvUz4wL8TJzJMLTn16VsuDfG+sbG+pPHVITYv/f1nmDhe5hLZ/FctceaUKc+POatRWCX5jS6R7PfFI7YHEWQNfrxro3ZHjbBi/rqybw6fVeEa9Kj9K0t5IGV7vCHEx3BLfO5mYsC3SevLemXBne3Yri9Lfl06nJYSDkg497ghk0zMx83XRYewHsfZdu1wA0Pw42on4+D28X8cvdztmMom7O8eV7uvYq3EyqPWOzkonxzjjCJGAEAHs7Bx46ykzN9YPz0twQgPP6s8tG1QxlGksMsYoVBeSaam3d96EiMGAIoiUC3A27ncTyeFGIAwtx36svisUQ== 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=HP+CSUUYPPxXfIYSwkFDGPmnNs8Dq19ovS0tsBKgpT8=; b=ciESWa8Ck5BIApSLedJfyM2cum7VYJKZCnAqbhMYKVvrodNCTnMgEiv0PlxvO7h0QIKCUfaowhdoDI0ye8YCwvGm670ItM2TO6WYOJOhNn+8MxN6mgJQ6gbMg7JKVqE7pBxTkwt9Aq1Y+ooA/pJ1NvQfCMx3cYTe37h/1WDxbJU= 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 PA4PR04MB9390.eurprd04.prod.outlook.com (2603:10a6:102:2a9::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6652.25; Mon, 7 Aug 2023 05:22:31 +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.6652.026; Mon, 7 Aug 2023 05:22:31 +0000 From: Liu Ying <victor.liu@nxp.com> To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: andrzej.hajda@intel.com, neil.armstrong@linaro.org, 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, alexander.stein@ew.tq-group.com, sam@ravnborg.org, jagan@amarulasolutions.com, yannick.fertre@foss.st.com, raphael.gallais-pou@foss.st.com, philippe.cornu@foss.st.com, hjc@rock-chips.com, heiko@sntech.de, zyw@rock-chips.com Subject: [PATCH v3 6/9] drm/bridge: synopsys: dw-mipi-dsi: Set minimum lane byte clock cycles for HSA and HBP Date: Mon, 7 Aug 2023 13:26:05 +0800 Message-Id: <20230807052608.3038698-7-victor.liu@nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230807052608.3038698-1-victor.liu@nxp.com> References: <20230807052608.3038698-1-victor.liu@nxp.com> X-ClientProxiedBy: SI2PR01CA0006.apcprd01.prod.exchangelabs.com (2603:1096:4:191::14) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM7PR04MB7046:EE_|PA4PR04MB9390:EE_ X-MS-Office365-Filtering-Correlation-Id: 60175840-690e-4e27-07eb-08db97064c3f X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: hsKnxtTha/wnLGFbbqijg60wb40XGLWtM0p6PQDc8AsF4f4l/ncxFPyab4mBDn9i4vTG70sr7OLv0cIcUjKMxR0SRa5zHhBubF7SzU/yCz3BHZclnAgC0dY/2CFSRpMOOxTJ+MR12GuUwO++z17U57nsVjukgpRvYuRRE/i4zbBvU8XyH0l0k2/ZEuAmWgy8eO9wEPGokSUXK/Jj+4Ze1zwrrqzOKOk/Ns+u8GgW7PbIBhdaV4ogG5On+eoEPcehp7YQGse6ReNb/sw2OMwP4wfVqMB7gy+syQWMIxb73uuiNoaJhraHVkAkQKXYPJwXPU1azCcO6KgRK+tjTUlhIWN40ssG3C/XSolmOFgmVzrOUYFgDCLgCoAnEdsWJg3i7OG1+WQi/Ocuo10xX+6SVlDThN3dR1DD/hVNDjmp4Qp2okGuCIQWkNnmH5s1fh6vZvQkc1ArW1Z9b6AXQmRUXsOls3FyG104ORGv89XGQdk/6J9/NKP9ZWgMIMNVCEKT2nYWL8czYjxlJI1LVCXWwfc0TbxuMuSKOH2LrV5EkY31J88qMTvLHvXR4GR6igTm/AJ8ghtjKovHjDdcMFBSrStdjOzZFLpkF5LbkzyHkytHAZfEhGSud0CMuZpeQg+5 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)(136003)(39860400002)(376002)(366004)(396003)(346002)(451199021)(1800799003)(186006)(2616005)(6486002)(52116002)(6666004)(6512007)(478600001)(86362001)(26005)(36756003)(1076003)(6506007)(41300700001)(316002)(8936002)(5660300002)(8676002)(7416002)(38350700002)(4326008)(2906002)(66946007)(66556008)(66476007)(38100700002)(83380400001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: RaTG4Q4hyVPF+9bC16v/cNQDfzwsiQGJPQMQOM6a5NEd47TTcJmhNyudOMdpH4FGr8xajUJCq6WTt+wTAWNUnYeVqLaQEtSEtUKPcOWf8XnIRXVaxkX3efnC/RW50yDMZ0BTd6p3O072VZYyX5vrBdNyC/kPs070NhHHuIVH660V87P3hcnt4rvFb+e8HCYeS61TX4zNAc25iGV6j37mmc4iBKROQGAm+Xz9OmtXwU0oDNH3s3v9sLcWt1DVqqo7YhlKG5ak3N2B7cJP1rw3WlElod/OOYeXPLJtmTn/bg0o9Fy1sJFGAxcUJxXDlocjuUZZa0iJz2XkK8A4Y/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NQ7RkV1bFjqWNAz/xJRmGNWsSkuWLtUWvZtmqgNELYpsR/WUesg2xw+BhdPDErlE5apyAazMCaWfZWNYm2hDcVxoFNKOSHPl6DPoHzHsr1BswtgJRs4lZF1CtyPpvAvw3aoH+M53y3/X8yGWMNNvwtYDQpBbaT+AHyc5nTcpU/+DICmoZFA X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 60175840-690e-4e27-07eb-08db97064c3f X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Aug 2023 05:22:30.9663 (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: kPfTQJWj92wx2jvkBSNpDbShsNi3/G3TMR9yE5hKbxc3e9SpHoKubisFzde0Ox3BiZ0zXptgO9IknJ41TkudVg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB9390 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230806_222235_216970_286330F7 X-CRM114-Status: GOOD ( 14.35 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: <linux-arm-kernel.lists.infradead.org> List-Unsubscribe: <http://lists.infradead.org/mailman/options/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=unsubscribe> List-Archive: <http://lists.infradead.org/pipermail/linux-arm-kernel/> List-Post: <mailto:linux-arm-kernel@lists.infradead.org> List-Help: <mailto:linux-arm-kernel-request@lists.infradead.org?subject=help> List-Subscribe: <http://lists.infradead.org/mailman/listinfo/linux-arm-kernel>, <mailto:linux-arm-kernel-request@lists.infradead.org?subject=subscribe> Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" <linux-arm-kernel-bounces@lists.infradead.org> Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.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 332388fd86da..536306ccea5a 100644 --- a/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c +++ b/drivers/gpu/drm/bridge/synopsys/dw-mipi-dsi.c @@ -757,12 +757,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); @@ -778,6 +785,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; }