Message ID | 20240215085316.56835-6-angelogioacchino.delregno@collabora.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-66449-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:b825:b0:106:860b:bbdd with SMTP id da37csp270167dyb; Thu, 15 Feb 2024 01:20:08 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCX/Q3R1pKcMlcn+Mj5b0Haox5qHfVl7FE+COQmFbeQVW1Gv69WuPX42To2J32YfZAaqs3SoG1kanDCVdPZdRADwXcx9LA== X-Google-Smtp-Source: AGHT+IE6N8aIBrX72iSz5wH1Tt2y2qrIiArvDu03TYwjblFvqmMT0NOac4gVSx7vVcQegvzFmZ/F X-Received: by 2002:a05:6871:691:b0:219:a686:4b8f with SMTP id l17-20020a056871069100b00219a6864b8fmr1224633oao.32.1707988808332; Thu, 15 Feb 2024 01:20:08 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707988808; cv=pass; d=google.com; s=arc-20160816; b=XeusSTgM/Yt/uGUw7sBXiie55uyz+2LR28E0z7GrvM8M1OMDu1QSbAlCKCqFYuDCva i/8wRRN3M1Aj91j7K66n9hFkJA2iLyh0tixoCyVcAQJTl5plC89Z6d9eRctGgSmgCiFF L963EPV43tlq7OHkhwRVLMWWZ0dxQYlEJ0DhYXLXnWA41fvxOhLlUpOAb8XQ81pnuCbz 6DBs04w2xvUvwT3KJJpRdyKvMtcoS+sECGQOXE152PHeJpwM9A5bM6D8C/5zC9eyK3rp qvymYDU87ND9EwrOU3F9DTLxr9A2l1KEdX0VBmIip5XStXeyle/HcP5eyVvMQld/UEyj XEfg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=kI8E+cewE1wmo1HyE8GagdZvG0aogrlH+zFWOM03gFY=; fh=1mTP9a8EwjstuScCIXzFhy8YNI0WvYbCV0wPaHCSGlk=; b=U/E76mAKwKCMjxQtTcIw3skVxZhfoEcJ6KVo3P/oMY8zHUHItaz9O1rt72WNPnydOg 84PYIqPOMYsNfZD1TS4qDZRJUe3isS5B1EF9CP0nZv9H8hG/dLzPx+8d8WD2HtDJ+2em Q7HiJHS1y0/ck0ZdtiUOFWwKIfju+WUdxuU/jmQxx3vtSXPJSi6pMCCQaQ75OCi/3VMz TUd0/5xiF7n0VU12Y+BCQBz5hOPeJ5PBw5fADITe93h+FzDwC48EM+0PITGQmf/E5bkx H9YEgVDPCofEXSOiOnBUvLKot8gghtq+o2T/scNXRmdcqcYG6vMyN7q16dt1mqnX5ylM V3VA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=B3FPVJBT; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-66449-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66449-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id l4-20020a656804000000b005cf268638edsi834357pgt.177.2024.02.15.01.20.07 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 15 Feb 2024 01:20:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-66449-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=B3FPVJBT; arc=pass (i=1 spf=pass spfdomain=collabora.com dkim=pass dkdomain=collabora.com dmarc=pass fromdomain=collabora.com); spf=pass (google.com: domain of linux-kernel+bounces-66449-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-66449-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sy.mirrors.kernel.org (Postfix) with ESMTPS id E2E6DB2AD68 for <ouuuleilei@gmail.com>; Thu, 15 Feb 2024 08:54:59 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DEA3C1BC2C; Thu, 15 Feb 2024 08:53:31 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b="B3FPVJBT" Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id CCB551802B for <linux-kernel@vger.kernel.org>; Thu, 15 Feb 2024 08:53:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=46.235.227.194 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707987209; cv=none; b=NYuqfHx9FXyjrYp1GYmF1bN4xmzP+XCfh7oBojVJckWIy4D6C956CpyreZQ3Uqlcbyz6poJnOUA4/0QFb32FNFEBawKOsXgJQbU76JoRqM+9Ldwkwp07tPyx+BR+n05Y/v6GCpbvSTYl30eK2auYdTjSKLiDun90fVMbDN8GnJg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707987209; c=relaxed/simple; bh=2zkji/ritVm9wuEz/banneCsWweoQ6s31HP8aLRF9xQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=VJ980bI2mejthXyFHlejaVX+hKNUNhuyR2Ek9ogqYHRVGwcTkXo8srYM4PUzYi9uTdrtr3gXC9ffDgBPBMIyHhsaBLgXBjZfuBtEDpsXcqJylHQqsdfZOvTuntiJc7l7znxA7X2hlmSIsiWO3ZBueSit9Fcal+Keni3/xPgu6ic= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com; spf=pass smtp.mailfrom=collabora.com; dkim=pass (2048-bit key) header.d=collabora.com header.i=@collabora.com header.b=B3FPVJBT; arc=none smtp.client-ip=46.235.227.194 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=collabora.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=collabora.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1707987206; bh=2zkji/ritVm9wuEz/banneCsWweoQ6s31HP8aLRF9xQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=B3FPVJBTawSqDJcWvLw3Q8kBp2OJipJE9pJrhvYWXDAVyXNw/KezuIWCgwtSQ7ZH6 4hAzH9bVJ250wXNp0pWYGMxmi6SferqVOVNitib53vZKrjPzZSMBrZ72zE4I1ji/rH AG5Inyi1ay/fNhKqDSM3e+CGXsdHKRwQq0bPwFb52jdyfBLdIC+w7oD+JEUV3jyPkB wE4SotuZP2J+wE/pP2vff941VT6ToKR3bVNsQkFjfky5soMr9tHvyU6vGjcrpJ2saR d1v+gU8fIvnmWRn9ysVsxZLhtgY3FTv5RU47BvznyDda4+trjaHMIwKXQolVbEEVRF W1ij0e325/AQg== 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 235D737820AD; Thu, 15 Feb 2024 08:53:25 +0000 (UTC) From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> 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 <amergnat@baylibre.com>, CK Hu <ck.hu@mediatek.com> Subject: [PATCH v6 5/9] drm/mediatek: dsi: Replace open-coded instance of HZ_PER_MHZ Date: Thu, 15 Feb 2024 09:53:12 +0100 Message-ID: <20240215085316.56835-6-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240215085316.56835-1-angelogioacchino.delregno@collabora.com> References: <20240215085316.56835-1-angelogioacchino.delregno@collabora.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790956072707358809 X-GMAIL-MSGID: 1790956072707358809 |
Series |
MediaTek DRM - DSI driver cleanups
|
|
Commit Message
AngeloGioacchino Del Regno
Feb. 15, 2024, 8:53 a.m. UTC
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 <amergnat@baylibre.com> Reviewed-by: CK Hu <ck.hu@mediatek.com> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> --- 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 <linux/phy/phy.h> #include <linux/platform_device.h> #include <linux/reset.h> +#include <linux/units.h> #include <video/mipi_display.h> #include <video/videomode.h> @@ -238,7 +239,7 @@ static void mtk_dsi_mask(struct mtk_dsi *dsi, u32 offset, u32 mask, u32 data) static void mtk_dsi_phy_timconfig(struct mtk_dsi *dsi) { u32 timcon0, timcon1, timcon2, timcon3; - u32 data_rate_mhz = DIV_ROUND_UP(dsi->data_rate, 1000000); + u32 data_rate_mhz = DIV_ROUND_UP(dsi->data_rate, HZ_PER_MHZ); struct mtk_phy_timing *timing = &dsi->phy_timing; timing->lpx = (60 * data_rate_mhz / (8 * 1000)) + 1;