linux/drivers/gpu/drm/selftests
Nathan Chancellor a860f266a0
drm/selftest: plane_helper: Put test structures in static storage
Clang warns on certain 32-bit architectures:

  drivers/gpu/drm/selftests/test-drm_plane_helper.c:76:5: warning: stack frame size (1064) exceeds limit (1024) in 'igt_check_plane_state' [-Wframe-larger-than]
  int igt_check_plane_state(void *ignored)
      ^
  1 warning generated.

The structures in igt_check_plane_state() total 1008 bytes, so any small
amount of inlining will cause the stack frame to exceed the 32-bit limit
of 1024, triggering the warning.

Move these structures to static storage, which dramatically reduces the
amount of stack space in igt_check_plane_state(). There is no testing
impact, as igt_check_plane_state() is only called once in the driver.

Fixes: 943e6a8bee ("mock a drm_plane in igt_check_plane_state to make the test more robust")
Link: https://github.com/ClangBuiltLinux/linux/issues/1600
Reported-by: kernel test robot <lkp@intel.com>
Suggested-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20220302235909.784935-1-nathan@kernel.org
2022-03-21 11:05:05 +01:00
..
drm_buddy_selftests.h drm/selftests: add drm buddy pathological testcase 2022-02-23 10:46:32 +01:00
drm_cmdline_selftests.h drm/modes: Make sure to parse valid rotation value from cmdline 2020-02-12 18:32:54 +01:00
drm_mm_selftests.h drm/mm: add ig_frag selftest 2020-06-08 15:14:16 +02:00
drm_modeset_selftests.h drm/selftests: Add drm_rect selftests 2019-11-28 13:33:43 +02:00
drm_selftest.c
drm_selftest.h
Makefile drm/selftests: Move i915 buddy selftests into drm 2022-02-23 10:43:25 +01:00
test-drm_buddy.c drm/selftests: add drm buddy pathological testcase 2022-02-23 10:46:32 +01:00
test-drm_cmdline_parser.c drm/modes: Make sure to parse valid rotation value from cmdline 2020-02-12 18:32:54 +01:00
test-drm_damage_helper.c drm/i915/selftests: Properly reset mock object propers for each test 2021-10-22 11:09:45 +02:00
test-drm_dp_mst_helper.c drm/selftests/test-drm_dp_mst_helper: Fix memory leak in sideband_msg_req_encode_decode 2022-01-19 16:14:45 +01:00
test-drm_format.c drm/selftests: Add tests for drm_format_info* helpers 2018-11-02 09:57:58 +00:00
test-drm_framebuffer.c drm: remove allow_fb_modifiers 2022-01-31 21:45:24 +01:00
test-drm_mm.c drm/selftests/test-drm_mm: Mark 'hole_end' as always_unused 2020-11-17 20:05:05 +01:00
test-drm_modeset_common.c
test-drm_modeset_common.h drm/selftests: Add drm_rect selftests 2019-11-28 13:33:43 +02:00
test-drm_plane_helper.c drm/selftest: plane_helper: Put test structures in static storage 2022-03-21 11:05:05 +01:00
test-drm_rect.c drm/selftests: Add drm_rect selftests 2019-11-28 13:33:43 +02:00