Jon Hunter b67df49181 nvdla: Fix build for CONFIG_FRAME_WARN=1024
Some 3rd party Linux distributions, set the kernel configuration option
"CONFIG_FRAME_WARN=1024" which will causes the compiler to generate
compilation errors when a functions stack frame size exceeds 1024 bytes.
When compiling the DLA driver on Fedora the compilation fails with the
following errors.

 drivers/video/tegra/host/nvdla/nvdla.o] Error 1
 drivers/video/tegra/host/nvdla/nvdla_ioctl.c: In function ‘nvdla_emu_task_submit’:
 build/drivers/video/tegra/host/nvdla/nvdla_ioctl.c:918:1: error: the frame size of
 	1456 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]

 drivers/video/tegra/host/nvdla/nvdla_ioctl.c: In function ‘nvdla_submit’:
 drivers/video/tegra/host/nvdla/nvdla_ioctl.c:1118:1: error: the frame size of 1440
 	bytes is larger than 1024 bytes [-Werror=frame-larger-than=]

Fix this by copying the user tasks from userspace one at a time and
allocating the structure nvdla_emu_task dynamically so that is it not
allocated on the stack.

Bug 3524939

Change-Id: If752423a170c46efd9b6cffc458a7c1db1984afe
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2694097
Tested-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Amit Sharma (SW-TEGRA) <amisharma@nvidia.com>
Reviewed-by: svc_kernel_abi <svc_kernel_abi@nvidia.com>
Reviewed-by: Arvind M <am@nvidia.com>
Reviewed-by: Praveen K <kpraveen@nvidia.com>
GVS: Gerrit_Virtual_Submit
2023-04-14 11:47:58 +00:00
2022-09-10 23:43:40 -07:00
2022-12-07 23:57:14 -08:00
2023-04-07 00:12:26 -07:00
Description
No description provided
34 MiB