From: Alexandre Mergnat <amergnat@baylibre.com>
To: AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
chunkuang.hu@kernel.org
Cc: p.zabel@pengutronix.de, linux-kernel@vger.kernel.org,
dri-devel@lists.freedesktop.org,
linux-mediatek@lists.infradead.org, daniel@ffwll.ch,
matthias.bgg@gmail.com, kernel@collabora.com, airlied@gmail.com,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH v4 1/9] drm/mediatek: dsi: Use GENMASK() for register mask definitions
Date: Tue, 6 Feb 2024 15:47:17 +0100 [thread overview]
Message-ID: <f91db779-ad94-4c18-9a06-1029da4edaab@baylibre.com> (raw)
In-Reply-To: <20240206120748.136610-2-angelogioacchino.delregno@collabora.com>
On 06/02/2024 13:07, AngeloGioacchino Del Regno wrote:
> Change magic numerical masks with usage of the GENMASK() macro
> to improve readability.
>
> While at it, also fix the DSI_PS_SEL mask to include all bits instead
> of just a subset of them.
>
> This commit brings no functional changes.
>
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> ---
> drivers/gpu/drm/mediatek/mtk_dsi.c | 45 +++++++++++++++---------------
> 1 file changed, 23 insertions(+), 22 deletions(-)
>
> diff --git a/drivers/gpu/drm/mediatek/mtk_dsi.c b/drivers/gpu/drm/mediatek/mtk_dsi.c
> index a2fdfc8ddb15..3b7392c03b4d 100644
> --- a/drivers/gpu/drm/mediatek/mtk_dsi.c
> +++ b/drivers/gpu/drm/mediatek/mtk_dsi.c
> @@ -58,18 +58,18 @@
>
...snip...
> #define DSI_PSCTRL 0x1c
> -#define DSI_PS_WC 0x3fff
> -#define DSI_PS_SEL (3 << 16)
> +#define DSI_PS_WC GENMASK(14, 0)
> +#define DSI_PS_SEL GENMASK(19, 16)
0011 0000 0000 0000 0000 => GENMASK(17, 16)
> #define PACKED_PS_16BIT_RGB565 (0 << 16)
> #define LOOSELY_PS_18BIT_RGB666 (1 << 16)
> #define PACKED_PS_18BIT_RGB666 (2 << 16)
> @@ -109,26 +109,26 @@
> #define LD0_WAKEUP_EN BIT(2)
--
Regards,
Alexandre
next prev parent reply other threads:[~2024-02-06 14:47 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-06 12:07 [PATCH v4 0/9] MediaTek DRM - DSI driver cleanups AngeloGioacchino Del Regno
2024-02-06 12:07 ` [PATCH v4 1/9] drm/mediatek: dsi: Use GENMASK() for register mask definitions AngeloGioacchino Del Regno
2024-02-06 14:47 ` Alexandre Mergnat [this message]
2024-02-06 15:53 ` AngeloGioacchino Del Regno
2024-02-07 9:55 ` Alexandre Mergnat
2024-02-06 12:07 ` [PATCH v4 2/9] drm/mediatek: dsi: Fix DSI RGB666 formats and definitions AngeloGioacchino Del Regno
2024-02-06 14:51 ` Alexandre Mergnat
2024-02-06 12:07 ` [PATCH v4 3/9] drm/mediatek: dsi: Cleanup functions mtk_dsi_ps_control{_vact}() AngeloGioacchino Del Regno
2024-02-06 14:57 ` Alexandre Mergnat
2024-02-06 12:07 ` [PATCH v4 4/9] drm/mediatek: dsi: Use bitfield macros where useful AngeloGioacchino Del Regno
2024-02-06 15:09 ` Alexandre Mergnat
2024-02-06 12:07 ` [PATCH v4 5/9] drm/mediatek: dsi: Replace open-coded instance of HZ_PER_MHZ AngeloGioacchino Del Regno
2024-02-06 15:11 ` Alexandre Mergnat
2024-02-06 12:07 ` [PATCH v4 6/9] drm/mediatek: dsi: Register DSI host after acquiring clocks and PHY AngeloGioacchino Del Regno
2024-02-06 15:13 ` Alexandre Mergnat
2024-02-06 12:07 ` [PATCH v4 7/9] drm/mediatek: dsi: Simplify with dev_err_probe and remove gotos AngeloGioacchino Del Regno
2024-02-06 15:20 ` Alexandre Mergnat
2024-02-06 12:07 ` [PATCH v4 8/9] drm/mediatek: dsi: Compress of_device_id entries and add sentinel AngeloGioacchino Del Regno
2024-02-06 15:21 ` Alexandre Mergnat
2024-02-06 12:07 ` [PATCH v4 9/9] drm/mediatek: dsi: Use mipi_dsi_pixel_format_to_bpp() helper function AngeloGioacchino Del Regno
2024-02-06 15:24 ` Alexandre Mergnat
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=f91db779-ad94-4c18-9a06-1029da4edaab@baylibre.com \
--to=amergnat@baylibre.com \
--cc=airlied@gmail.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