mirror of
https://github.com/Ysurac/openmptcprouter.git
synced 2025-03-09 15:40:20 +00:00
63 lines
2 KiB
Diff
63 lines
2 KiB
Diff
From a0bda02653b026d0a883df557093217284798d8a Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Ma=C3=ADra=20Canal?= <mcanal@igalia.com>
|
|
Date: Tue, 6 Aug 2024 12:02:52 -0300
|
|
Subject: [PATCH 677/697] drm/vc4: backport 27e0a194a256 and b3bf19552ea3
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
Get the KUnit tests passing.
|
|
|
|
Signed-off-by: Maíra Canal <mcanal@igalia.com>
|
|
---
|
|
drivers/gpu/drm/vc4/tests/vc4_mock.h | 12 +++++-------
|
|
drivers/gpu/drm/vc4/tests/vc4_mock_plane.c | 8 +++++---
|
|
2 files changed, 10 insertions(+), 10 deletions(-)
|
|
|
|
--- a/drivers/gpu/drm/vc4/tests/vc4_mock.h
|
|
+++ b/drivers/gpu/drm/vc4/tests/vc4_mock.h
|
|
@@ -35,16 +35,14 @@ struct drm_plane *vc4_mock_find_plane_fo
|
|
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;
|
|
};
|
|
--- a/drivers/gpu/drm/vc4/tests/vc4_mock_plane.c
|
|
+++ b/drivers/gpu/drm/vc4/tests/vc4_mock_plane.c
|
|
@@ -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_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);
|
|
|