diff options
author | Maxime Ripard <mripard@kernel.org> | 2024-02-22 19:13:49 +0100 |
---|---|---|
committer | Maxime Ripard <mripard@kernel.org> | 2024-02-28 16:36:25 +0100 |
commit | 7a48da0febd5113d9de6f51592a09825ebd8415c (patch) | |
tree | 0748f016d9363066534d5742431018dbc54f59d5 /include/drm | |
parent | 66671944e17644804cb0886489e1b8fde924e9b9 (diff) |
drm/tests: Add helper to create mock plane
We're going to need a full-blown, functional, KMS device to test more
components of the atomic modesetting infrastructure.
Let's add a new helper to create a dumb, mocked, primary plane. By
default, it will create a linear XRGB8888 plane, using the default
helpers.
Reviewed-by: MaĆra Canal <mcanal@igalia.com>
Signed-off-by: Maxime Ripard <mripard@kernel.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20240222-kms-hdmi-connector-state-v7-3-8f4af575fce2@kernel.org
Diffstat (limited to 'include/drm')
-rw-r--r-- | include/drm/drm_kunit_helpers.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/drm/drm_kunit_helpers.h b/include/drm/drm_kunit_helpers.h index 3ae19892229d..38667d624aa8 100644 --- a/include/drm/drm_kunit_helpers.h +++ b/include/drm/drm_kunit_helpers.h @@ -10,6 +10,8 @@ #include <kunit/test.h> struct drm_device; +struct drm_plane_funcs; +struct drm_plane_helper_funcs; struct kunit; struct device *drm_kunit_helper_alloc_device(struct kunit *test); @@ -99,4 +101,13 @@ drm_kunit_helper_atomic_state_alloc(struct kunit *test, struct drm_device *drm, struct drm_modeset_acquire_ctx *ctx); +struct drm_plane * +drm_kunit_helper_create_primary_plane(struct kunit *test, + struct drm_device *drm, + const struct drm_plane_funcs *funcs, + const struct drm_plane_helper_funcs *helper_funcs, + const uint32_t *formats, + unsigned int num_formats, + const uint64_t *modifiers); + #endif // DRM_KUNIT_HELPERS_H_ |