linux-stable/drivers/gpu/drm/selftests
Daniel Vetter 2f425cf524 drm: Fix oops in damage self-tests by mocking damage property
I've added a new check to make sure that drivers which insepct the
damage property have it set up correctly, but somehow missed that this
borke the damage selftest in the CI result noise.

Fix it up by mocking enough of drm_device and drm_plane so we can call
drm_plane_enable_fb_damage_clips() to make the new check happy.

Since there's a lot of duplicated mock code already copy-pasted into
each test I've also refactored this a bit to trim it down.

v2: Squash in fixup from 0day for

drivers/gpu/drm/selftests/test-drm_damage_helper.c:15:19: warning: symbol 'mock_device' was not declared. Should it be static?
drivers/gpu/drm/selftests/test-drm_damage_helper.c:16:30: warning: symbol 'mock_obj_props' was not declared. Should it be static?
drivers/gpu/drm/selftests/test-drm_damage_helper.c:17:18: warning: symbol 'mock_plane' was not declared. Should it be static?
drivers/gpu/drm/selftests/test-drm_damage_helper.c:18:21: warning: symbol 'mock_prop' was not declared. Should it be static?

Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>

Reviewed-by: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@intel.com>
Fixes: c7fcbf2513 ("drm/plane: check that fb_damage is set up when used")
Cc: José Roberto de Souza <jose.souza@intel.com> (v1)
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Cc: Gwan-gyeong Mun <gwan-gyeong.mun@intel.com>
Cc: José Roberto de Souza <jose.souza@intel.com>
Cc: Hans de Goede <hdegoede@redhat.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Thomas Zimmermann <tzimmermann@suse.de>
Link: https://patchwork.freedesktop.org/patch/msgid/20210730095251.4343-1-daniel.vetter@ffwll.ch
Link: https://patchwork.freedesktop.org/patch/msgid/20210730141948.GA11955@243d74413310
2021-08-02 11:15:11 +02: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: Add drm_rect selftests 2019-11-28 13:33:43 +02: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: Fix oops in damage self-tests by mocking damage property 2021-08-02 11:15:11 +02:00
test-drm_dp_mst_helper.c drm/selftests/test-drm_dp_mst_helper: Move 'sideband_msg_req_encode_decode' onto the heap 2020-11-17 20:08:29 +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: allow drm_atomic_print_state() to accept any drm_printer 2021-06-23 07:32:13 -07: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
test-drm_rect.c drm/selftests: Add drm_rect selftests 2019-11-28 13:33:43 +02:00