]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/rockchip: lvds: switch to FIELD_PREP_WM16 macro
authorNicolas Frattaroli <nicolas.frattaroli@collabora.com>
Mon, 25 Aug 2025 08:28:25 +0000 (10:28 +0200)
committerYury Norov <yury.norov@gmail.com>
Wed, 3 Sep 2025 00:06:46 +0000 (20:06 -0400)
commitdcdcfd83b7b09f653dfddf89af206c6a9d4fbd62
treecd0c7e5574948c08647aba7391e0bb3ffd3c2923
parent7d5f75a9d413de35c376597ead4174081373644b
drm/rockchip: lvds: switch to FIELD_PREP_WM16 macro

The era of hand-rolled HIWORD_UPDATE macros is over, at least for those
drivers that use constant masks.

Remove rockchip_lvds.h's own HIWORD_UPDATE macro, and replace all
instances of it with hw_bitfield.h's FIELD_PREP_WM16 macro, which gives
us more error checking.

For the slightly-less-trivial case of the 2-bit width instance, the
results were checked during development to match all possible input
values (0 to 3, inclusive).

Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Yury Norov (NVIDIA) <yury.norov@gmail.com>
drivers/gpu/drm/rockchip/rockchip_lvds.h