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
This commit is contained in:
parent
70704fbf67
commit
943e6a8bee
1 changed files with 4 additions and 0 deletions
|
@ -87,11 +87,15 @@ int igt_check_plane_state(void *ignored)
|
||||||
DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC)
|
DRM_MODE_FLAG_NHSYNC | DRM_MODE_FLAG_NVSYNC)
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
struct drm_plane plane = {
|
||||||
|
.dev = NULL
|
||||||
|
};
|
||||||
struct drm_framebuffer fb = {
|
struct drm_framebuffer fb = {
|
||||||
.width = 2048,
|
.width = 2048,
|
||||||
.height = 2048
|
.height = 2048
|
||||||
};
|
};
|
||||||
struct drm_plane_state plane_state = {
|
struct drm_plane_state plane_state = {
|
||||||
|
.plane = &plane,
|
||||||
.crtc = ZERO_SIZE_PTR,
|
.crtc = ZERO_SIZE_PTR,
|
||||||
.fb = &fb,
|
.fb = &fb,
|
||||||
.rotation = DRM_MODE_ROTATE_0
|
.rotation = DRM_MODE_ROTATE_0
|
||||||
|
|
Loading…
Add table
Reference in a new issue