Commit 6d5f26f
media: staging/intel-ipu3-v4l: reduce kernel stack usage
The v4l2_pix_format_mplane structure is too large to be put on the kernel
stack, as we can see in 32-bit builds:
drivers/staging/media/ipu3/ipu3-v4l2.c: In function 'imgu_fmt':
drivers/staging/media/ipu3/ipu3-v4l2.c:753:1: error: the frame size of 1028 bytes is larger than 1024 bytes [-Werror=frame-larger-than=]
By dynamically allocating this array, the stack usage goes down to an
acceptable 272 bytes for the same x86-32 configuration.
Fixes: a0ca162 ("media: staging/intel-ipu3: Add v4l2 driver based on media framework")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>1 parent 76eb24f commit 6d5f26f
1 file changed
+25
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
664 | 664 | | |
665 | 665 | | |
666 | 666 | | |
667 | | - | |
668 | 667 | | |
669 | 668 | | |
670 | 669 | | |
671 | 670 | | |
672 | | - | |
| 671 | + | |
673 | 672 | | |
674 | 673 | | |
675 | 674 | | |
| |||
698 | 697 | | |
699 | 698 | | |
700 | 699 | | |
701 | | - | |
702 | | - | |
703 | | - | |
| 700 | + | |
| 701 | + | |
| 702 | + | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
704 | 707 | | |
705 | 708 | | |
706 | 709 | | |
| |||
730 | 733 | | |
731 | 734 | | |
732 | 735 | | |
733 | | - | |
734 | | - | |
735 | | - | |
736 | | - | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
737 | 741 | | |
738 | 742 | | |
739 | | - | |
| 743 | + | |
740 | 744 | | |
741 | | - | |
| 745 | + | |
742 | 746 | | |
743 | | - | |
744 | | - | |
745 | | - | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
746 | 750 | | |
747 | 751 | | |
748 | 752 | | |
749 | 753 | | |
750 | 754 | | |
751 | 755 | | |
752 | | - | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
753 | 763 | | |
754 | 764 | | |
755 | 765 | | |
| |||
0 commit comments