1// SPDX-License-Identifier: GPL-2.0
2
3#include <drm/drm_kunit_helpers.h>
4#include <drm/drm_plane.h>
5
6#include <kunit/test.h>
7
8#include "vc4_mock.h"
9
10struct drm_plane *vc4_dummy_plane(struct kunit *test, struct drm_device *drm,
11 enum drm_plane_type type)
12{
13 struct drm_plane *plane;
14
15 KUNIT_ASSERT_EQ(test, type, DRM_PLANE_TYPE_PRIMARY);
16
17 plane = drm_kunit_helper_create_primary_plane(test, drm,
18 NULL,
19 NULL,
20 NULL, num_formats: 0,
21 NULL);
22 KUNIT_ASSERT_NOT_ERR_OR_NULL(test, plane);
23
24 return plane;
25}
26

source code of linux/drivers/gpu/drm/vc4/tests/vc4_mock_plane.c