mirror of
https://github.com/coolsnowwolf/lede.git
synced 2025-07-16 12:46:59 +08:00

These patches were generated from: https://github.com/raspberrypi/linux/commits/rpi-6.12.y With the following command: git format-patch -N v6.12.27..HEAD (HEAD -> 8d3206ee456a5ecdf9ddbfd8e5e231e4f0cd716e) Exceptions: - (def)configs patches - github workflows patches - applied & reverted patches - readme patches - wireless patches Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
41 lines
1.1 KiB
Diff
41 lines
1.1 KiB
Diff
From c1bd20bc26c5f46052286e800139600a806e7c0a Mon Sep 17 00:00:00 2001
|
|
From: Maxime Ripard <maxime@cerno.tech>
|
|
Date: Fri, 14 Apr 2023 11:26:58 +0200
|
|
Subject: [PATCH] drm/vc4: tests: Add function to lookup a plane for a CRTC
|
|
|
|
Some tests will need to find a plane to run a test on for a given CRTC.
|
|
Let's create a small helper to do that.
|
|
|
|
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
|
---
|
|
drivers/gpu/drm/vc4/tests/vc4_mock.h | 18 ++++++++++++++++++
|
|
1 file changed, 18 insertions(+)
|
|
|
|
--- a/drivers/gpu/drm/vc4/tests/vc4_mock.h
|
|
+++ b/drivers/gpu/drm/vc4/tests/vc4_mock.h
|
|
@@ -21,6 +21,24 @@ struct drm_crtc *vc4_find_crtc_for_encod
|
|
return NULL;
|
|
}
|
|
|
|
+static inline
|
|
+struct drm_plane *vc4_mock_find_plane_for_crtc(struct kunit *test,
|
|
+ struct drm_crtc *crtc)
|
|
+{
|
|
+ struct drm_device *drm = crtc->dev;
|
|
+ struct drm_plane *plane;
|
|
+
|
|
+ drm_for_each_plane(plane, drm)
|
|
+ if (plane->possible_crtcs & drm_crtc_mask(crtc))
|
|
+ return plane;
|
|
+
|
|
+ return NULL;
|
|
+}
|
|
+
|
|
+struct vc4_dummy_plane {
|
|
+ struct vc4_plane plane;
|
|
+};
|
|
+
|
|
struct drm_plane *vc4_dummy_plane(struct kunit *test, struct drm_device *drm,
|
|
enum drm_plane_type type);
|
|
|