Skip to content
Commit 7ee8acd1 authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Mauro Carvalho Chehab
Browse files

media: verisilicon: fix excessive stack usage

In some configurations, gcc decides not to inline the register accessor
functions, which in turn leads to lots of temporary hantro_reg structures
on the stack that cannot be eliminated because they escape into an
uninlined function:

drivers/media/platform/verisilicon/rockchip_vpu981_hw_av1_dec.c:1022:1: warning: the frame size of 1112 bytes is larger than 1024 bytes [-Wframe-larger-than=]

Mark all of these as __always_inline so the compiler is able to completely
eliminate the temporary structures instead, which brings the stack usage
back down to just the normal local variables.

Closes: https://lore.kernel.org/oe-kbuild-all/202306151506.goHEegOd-lkp@intel.com/


[hverkuil: fix function prototype alignment, wrap commit log]

Reported-by: default avatarkernel test robot <lkp@intel.com>
Fixes: 727a4006 ("media: verisilicon: Add Rockchip AV1 decoder")
Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Reviewed-by: default avatarNicolas Dufresne <nicolas.dufresne@collabora.com>
Tested-by: default avatarNathan Chancellor <nathan@kernel.org>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent d05dea76
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment