Skip to content

Commit 6667194

Browse files
committed
drm/tests: helpers: Add atomic helpers
The mock device we were creating was missing any of the driver-wide helpers. That was fine before since we weren't testing the atomic state path, but we're going to start, so let's use the default implementations. Reviewed-by: Maíra Canal <[email protected]> Signed-off-by: Maxime Ripard <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 73984da commit 6667194

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/gpu/drm/tests/drm_kunit_helpers.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// SPDX-License-Identifier: GPL-2.0
22

33
#include <drm/drm_atomic.h>
4+
#include <drm/drm_atomic_helper.h>
45
#include <drm/drm_drv.h>
56
#include <drm/drm_kunit_helpers.h>
67
#include <drm/drm_managed.h>
@@ -14,6 +15,8 @@
1415
#define KUNIT_DEVICE_NAME "drm-kunit-mock-device"
1516

1617
static const struct drm_mode_config_funcs drm_mode_config_funcs = {
18+
.atomic_check = drm_atomic_helper_check,
19+
.atomic_commit = drm_atomic_helper_commit,
1720
};
1821

1922
/**

0 commit comments

Comments
 (0)