]> git.ipfire.org Git - thirdparty/linux.git/commit
drm/rcar-du: dsi: Clean up handling of DRM mode flags
authorMarek Vasut <marek.vasut+renesas@mailbox.org>
Tue, 28 Oct 2025 23:28:19 +0000 (00:28 +0100)
committerTomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Wed, 29 Oct 2025 09:32:11 +0000 (11:32 +0200)
commit94fe479fae96ba9a31bd252782dcc06a15f33b22
tree56bfadf7be1dfb32d723b332e5f30a219069b836
parentdd3957e026c2379b073636b7ece053f22efa1608
drm/rcar-du: dsi: Clean up handling of DRM mode flags

Introduce TXVMVPRMSET0R_BPP_MASK macro and use FIELD_PREP() to generate
appropriate bitfield from mask and value without bitshift, assign this
value into vprmset0r. Remove TXVMVPRMSET0R_CSPC_RGB which is never used,
replace it with code comment next to TXVMVPRMSET0R_CSPC_YCbCr.

Replace (mode->flags & DRM_MODE_FLAG_P.SYNC) test with inverted conditional
(mode->flags & DRM_MODE_FLAG_N.SYNC) and bitwise orr vprmset0r with either
or both TXVMVPRMSET0R_HSPOL_LOW and TXVMVPRMSET0R_VSPOL_LOW if conditional
matches.

Do not convert bits and bitfields to BIT() and GENMASK() yet, to be
consisten with the current style. Conversion to BIT() and GENMASK()
macros is done at the very end of this series in the last two patches.

Reviewed-by: Tomi Valkeinen <tomi.valkeinen+renesas@ideasonboard.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Link: https://patch.msgid.link/20251028232959.109936-10-marek.vasut+renesas@mailbox.org
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi.c
drivers/gpu/drm/renesas/rcar-du/rcar_mipi_dsi_regs.h