OSDN Git Service

mock a drm_plane in igt_check_plane_state to make the test more robust
authorClaudio Suarez <cssk@net-c.es>
Thu, 2 Dec 2021 09:49:49 +0000 (10:49 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 20 Dec 2021 09:18:50 +0000 (10:18 +0100)
commit943e6a8beeac1b676265f2dd81a69d7bede5e41d
tree01236445da6edb28f02dc295a73906a61db66e5b
parent70704fbf67ddc07ffc81073a3af1f7b2171697eb
mock a drm_plane in igt_check_plane_state to make the test more robust

igt_check_plane_state test crashes in drm_atomic_helper_check_plane_state
when trying to de-reference drm_plane_state->plane->dev
due to the lack of a struct drm_plane in the mock struct drm_plane_state.
Since drm_plane_state always should contain a plane, the mock also
needs a plane to be the test more robust and realistic. Add it.

Signed-off-by: Claudio Suarez <cssk@net-c.es>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/YaiWvQESctDMipjh@gineta.localdomain
drivers/gpu/drm/selftests/test-drm_plane_helper.c