From: "CK Hu (胡俊光)" <ck.hu@mediatek.com>
To: "angelogioacchino.delregno@collabora.com"
<angelogioacchino.delregno@collabora.com>,
"chunkuang.hu@kernel.org" <chunkuang.hu@kernel.org>
Cc: "linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-mediatek@lists.infradead.org"
<linux-mediatek@lists.infradead.org>,
"kernel@collabora.com" <kernel@collabora.com>,
"daniel@ffwll.ch" <daniel@ffwll.ch>,
"p.zabel@pengutronix.de" <p.zabel@pengutronix.de>,
"dri-devel@lists.freedesktop.org"
<dri-devel@lists.freedesktop.org>,
"amergnat@baylibre.com" <amergnat@baylibre.com>,
"airlied@gmail.com" <airlied@gmail.com>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"matthias.bgg@gmail.com" <matthias.bgg@gmail.com>
Subject: Re: [PATCH v5 5/9] drm/mediatek: dsi: Replace open-coded instance of HZ_PER_MHZ
Date: Thu, 15 Feb 2024 07:40:11 +0000 [thread overview]
Message-ID: <eb882267ee845fac3dc8905f46945e57afc38ffc.camel@mediatek.com> (raw)
In-Reply-To: <20240207145307.1626009-6-angelogioacchino.delregno@collabora.com>
Hi, Angelo:
On Wed, 2024-02-07 at 15:53 +0100, AngeloGioacchino Del Regno wrote:
> 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: CK Hu <ck.hu@mediatek.com>
>
> Reviewed-by: Alexandre Mergnat <amergnat@baylibre.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;
next prev parent reply other threads:[~2024-02-15 7:40 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-07 14:52 [PATCH v5 0/9] MediaTek DRM - DSI driver cleanups AngeloGioacchino Del Regno
2024-02-07 14:52 ` [PATCH v5 1/9] drm/mediatek: dsi: Use GENMASK() for register mask definitions AngeloGioacchino Del Regno
2024-02-15 6:02 ` CK Hu (胡俊光)
2024-02-07 14:53 ` [PATCH v5 2/9] drm/mediatek: dsi: Fix DSI RGB666 formats and definitions AngeloGioacchino Del Regno
2024-02-15 6:12 ` CK Hu (胡俊光)
2024-02-07 14:53 ` [PATCH v5 3/9] drm/mediatek: dsi: Cleanup functions mtk_dsi_ps_control{_vact}() AngeloGioacchino Del Regno
2024-02-15 7:07 ` CK Hu (胡俊光)
2024-02-07 14:53 ` [PATCH v5 4/9] drm/mediatek: dsi: Use bitfield macros where useful AngeloGioacchino Del Regno
2024-02-15 7:33 ` CK Hu (胡俊光)
2024-02-07 14:53 ` [PATCH v5 5/9] drm/mediatek: dsi: Replace open-coded instance of HZ_PER_MHZ AngeloGioacchino Del Regno
2024-02-15 7:40 ` CK Hu (胡俊光) [this message]
2024-02-07 14:53 ` [PATCH v5 6/9] drm/mediatek: dsi: Register DSI host after acquiring clocks and PHY AngeloGioacchino Del Regno
2024-02-07 14:53 ` [PATCH v5 7/9] drm/mediatek: dsi: Simplify with dev_err_probe and remove gotos AngeloGioacchino Del Regno
2024-02-07 14:53 ` [PATCH v5 8/9] drm/mediatek: dsi: Compress of_device_id entries and add sentinel AngeloGioacchino Del Regno
2024-02-07 14:53 ` [PATCH v5 9/9] drm/mediatek: dsi: Use mipi_dsi_pixel_format_to_bpp() helper function AngeloGioacchino Del Regno
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=eb882267ee845fac3dc8905f46945e57afc38ffc.camel@mediatek.com \
--to=ck.hu@mediatek.com \
--cc=airlied@gmail.com \
--cc=amergnat@baylibre.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=chunkuang.hu@kernel.org \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=kernel@collabora.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=matthias.bgg@gmail.com \
--cc=p.zabel@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®