From patchwork Wed Feb 7 14:53:03 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: AngeloGioacchino Del Regno X-Patchwork-Id: 13548610 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 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 227F5C4829B for ; Wed, 7 Feb 2024 14:53:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 64672113294; Wed, 7 Feb 2024 14:53:27 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=collabora.com header.i=@collabora.com header.b="quFidrzv"; dkim-atps=neutral Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) by gabe.freedesktop.org (Postfix) with ESMTPS id DEC1610EEA1 for ; Wed, 7 Feb 2024 14:53:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1707317599; bh=FiS8mUqacAQe89zDNq0f1XThl37jG415BRlGEjthz3s=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=quFidrzvgOMNyNGO8uk50aUtnYd/jjBrVroNsjFupIrKXJjidt4USkkWePzqEfV3z uaWkKcZGWbrWcijUHy5OBKbH8Kz+xByeHUd/Plb51UVr77D75e/eZ5OKIArE6yhmbW pEwB0wapDN2Y0SYh9pmiGvQi9Cmia/Xe6BoKq0rfagkSuux1xyb4yxk7bxJc4ohI/o U1Bc5EA5vSuWqrY7bN6N7mkkf2VX9iEQnGvlLXPY6ZfH7PLjbqhlep4emvb1z/cPYM DwyOxAjh/YIgf7qlWuJlt4huPJVrDpZbLGQIqHBDpadlHmUs36VUth9KJR75b/LcOo 23ci/V5sLA3fA== Received: from IcarusMOD.eternityproject.eu (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madrid.collaboradmins.com (Postfix) with ESMTPSA id E3A35378207B; Wed, 7 Feb 2024 14:53:18 +0000 (UTC) From: AngeloGioacchino Del Regno To: chunkuang.hu@kernel.org Cc: fshao@chromium.org, p.zabel@pengutronix.de, airlied@gmail.com, daniel@ffwll.ch, matthias.bgg@gmail.com, angelogioacchino.delregno@collabora.com, dri-devel@lists.freedesktop.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@collabora.com, Alexandre Mergnat Subject: [PATCH v5 5/9] drm/mediatek: dsi: Replace open-coded instance of HZ_PER_MHZ Date: Wed, 7 Feb 2024 15:53:03 +0100 Message-ID: <20240207145307.1626009-6-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240207145307.1626009-1-angelogioacchino.delregno@collabora.com> References: <20240207145307.1626009-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" In mtk_dsi_phy_timconfig(), we're dividing the `data_rate` variable, expressed in Hz to retrieve a value in MHz: instead of open-coding, use the HZ_PER_MHZ definition, available in linux/units.h. Reviewed-by: Alexandre Mergnat Signed-off-by: AngeloGioacchino Del Regno Reviewed-by: CK Hu --- drivers/gpu/drm/mediatek/mtk_dsi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c index a330bb94c44a..52758cab0abf 100644 --- a/drivers/gpu/drm/mediatek/mtk_dsi.c +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c @@ -13,6 +13,7 @@ #include #include #include +#include #include