mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-06 01:49:46 +00:00
drm/vc4: backport 27e0a194a2 and b3bf19552e
Get the KUnit tests passing. Signed-off-by: Maíra Canal <mcanal@igalia.com>
This commit is contained in:
@@ -35,16 +35,14 @@ struct drm_plane *vc4_mock_find_plane_for_crtc(struct kunit *test,
|
||||
return NULL;
|
||||
}
|
||||
|
||||
struct vc4_dummy_plane {
|
||||
struct vc4_plane plane;
|
||||
};
|
||||
|
||||
struct vc4_dummy_plane *vc4_dummy_plane(struct kunit *test,
|
||||
struct drm_device *drm,
|
||||
enum drm_plane_type type);
|
||||
struct drm_plane *vc4_dummy_plane(struct kunit *test, struct drm_device *drm,
|
||||
enum drm_plane_type type);
|
||||
|
||||
struct drm_plane *
|
||||
vc4_mock_atomic_add_plane(struct kunit *test,
|
||||
struct drm_atomic_state *state,
|
||||
struct drm_crtc *crtc);
|
||||
|
||||
struct vc4_dummy_crtc {
|
||||
struct vc4_crtc crtc;
|
||||
};
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// SPDX-License-Identifier: GPL-2.0
|
||||
|
||||
#include <drm/drm_modeset_helper_vtables.h>
|
||||
#include <drm/drm_kunit_helpers.h>
|
||||
#include <drm/drm_atomic_uapi.h>
|
||||
#include <drm/drm_plane.h>
|
||||
@@ -33,9 +34,10 @@ struct drm_plane *vc4_dummy_plane(struct kunit *test, struct drm_device *drm,
|
||||
KUNIT_ASSERT_EQ(test, type, DRM_PLANE_TYPE_PRIMARY);
|
||||
|
||||
plane = drm_kunit_helper_create_primary_plane(test, drm,
|
||||
NULL,
|
||||
NULL,
|
||||
NULL, 0,
|
||||
&vc4_dummy_plane_funcs,
|
||||
&vc4_dummy_plane_helper_funcs,
|
||||
vc4_dummy_plane_formats,
|
||||
ARRAY_SIZE(vc4_dummy_plane_formats),
|
||||
NULL);
|
||||
KUNIT_ASSERT_NOT_ERR_OR_NULL(test, plane);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user