]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
media: rkvdec: Introduce a global bitwriter helper
authorDetlev Casanova <detlev.casanova@collabora.com>
Thu, 2 Apr 2026 14:06:36 +0000 (10:06 -0400)
committerHans Verkuil <hverkuil+cisco@kernel.org>
Mon, 4 May 2026 07:31:04 +0000 (09:31 +0200)
commit166ea048d9a3ae29248ed1ce0761b975bced76e0
tree3754ec37e5083420f4eb91ac8a41245c3d7cbf0a
parente0f5d6ae76423ec5b6f97c7c3e1f02187b988afd
media: rkvdec: Introduce a global bitwriter helper

The use of structures with bitfields is good when the values are
somewhat aligned.
More mis-alignement means that compilers need to do more gymnastics
to edit the fields values.

Some cases have been reported with CLang on specific architectures
like armhf and hexagon, where the compiler would allocate a bigger
local stack than needed or even completely freeze during compilation.

Some fixes have been provided to ease the issues, but the real fix
here is to use a bitwriter instead of heavily unaligned bitfields.

This is a preparation commit to provide a global bitwriter interface
for the whole driver.

Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
drivers/media/platform/rockchip/rkvdec/rkvdec-bitwriter.h [new file with mode: 0644]