mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-27 01:11:14 +00:00
8c405cdccc
The patches were generated from the RPi repo with the following command: git format-patch v6.6.34..rpi-6.1.y Some patches needed rebasing and, as usual, the applied and reverted, wireless drivers, Github workflows, READMEs and defconfigs patches were removed. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
88 lines
2.8 KiB
Diff
88 lines
2.8 KiB
Diff
From 222226c0b1a941ebc01ab71ddcf5405f9103f9ab Mon Sep 17 00:00:00 2001
|
|
From: Maxime Ripard <maxime@cerno.tech>
|
|
Date: Fri, 17 Feb 2023 13:38:10 +0100
|
|
Subject: [PATCH 0626/1085] drm/vc4: tests: Add BCM2712 mock driver
|
|
|
|
The BCM2712 has a simpler pipeline that can only output to a writeback
|
|
connector and two HDMI controllers.
|
|
|
|
Let's allow our kunit tests to create a mock of that pipeline.
|
|
|
|
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
|
|
---
|
|
drivers/gpu/drm/vc4/tests/vc4_mock.c | 29 ++++++++++++++++++++++++++++
|
|
drivers/gpu/drm/vc4/tests/vc4_mock.h | 1 +
|
|
drivers/gpu/drm/vc4/vc4_drv.h | 2 ++
|
|
3 files changed, 32 insertions(+)
|
|
|
|
--- a/drivers/gpu/drm/vc4/tests/vc4_mock.c
|
|
+++ b/drivers/gpu/drm/vc4/tests/vc4_mock.c
|
|
@@ -106,6 +106,26 @@ static const struct vc4_mock_desc vc5_mo
|
|
DRM_MODE_CONNECTOR_HDMIA)),
|
|
);
|
|
|
|
+static const struct vc4_mock_desc vc6_mock =
|
|
+ VC4_MOCK_DESC(
|
|
+ VC4_MOCK_CRTC_DESC(&bcm2712_mop_data.base,
|
|
+ VC4_MOCK_OUTPUT_DESC(VC4_ENCODER_TYPE_TXP0,
|
|
+ DRM_MODE_ENCODER_VIRTUAL,
|
|
+ DRM_MODE_CONNECTOR_WRITEBACK)),
|
|
+ VC4_MOCK_CRTC_DESC(&bcm2712_moplet_data.base,
|
|
+ VC4_MOCK_OUTPUT_DESC(VC4_ENCODER_TYPE_TXP1,
|
|
+ DRM_MODE_ENCODER_VIRTUAL,
|
|
+ DRM_MODE_CONNECTOR_WRITEBACK)),
|
|
+ VC4_MOCK_PIXELVALVE_DESC(&bcm2712_pv0_data,
|
|
+ VC4_MOCK_OUTPUT_DESC(VC4_ENCODER_TYPE_HDMI0,
|
|
+ DRM_MODE_ENCODER_TMDS,
|
|
+ DRM_MODE_CONNECTOR_HDMIA)),
|
|
+ VC4_MOCK_PIXELVALVE_DESC(&bcm2712_pv1_data,
|
|
+ VC4_MOCK_OUTPUT_DESC(VC4_ENCODER_TYPE_HDMI1,
|
|
+ DRM_MODE_ENCODER_TMDS,
|
|
+ DRM_MODE_CONNECTOR_HDMIA)),
|
|
+);
|
|
+
|
|
static int __build_one_pipe(struct kunit *test, struct drm_device *drm,
|
|
const struct vc4_mock_pipe_desc *pipe)
|
|
{
|
|
@@ -178,6 +198,10 @@ static struct vc4_dev *__mock_device(str
|
|
drv = &vc5_drm_driver;
|
|
desc = &vc5_mock;
|
|
break;
|
|
+ case VC4_GEN_6:
|
|
+ drv = &vc5_drm_driver;
|
|
+ desc = &vc6_mock;
|
|
+ break;
|
|
|
|
default:
|
|
return NULL;
|
|
@@ -224,3 +248,8 @@ struct vc4_dev *vc5_mock_device(struct k
|
|
{
|
|
return __mock_device(test, VC4_GEN_5);
|
|
}
|
|
+
|
|
+struct vc4_dev *vc6_mock_device(struct kunit *test)
|
|
+{
|
|
+ return __mock_device(test, VC4_GEN_6);
|
|
+}
|
|
--- a/drivers/gpu/drm/vc4/tests/vc4_mock.h
|
|
+++ b/drivers/gpu/drm/vc4/tests/vc4_mock.h
|
|
@@ -55,6 +55,7 @@ struct vc4_dummy_output *vc4_dummy_outpu
|
|
|
|
struct vc4_dev *vc4_mock_device(struct kunit *test);
|
|
struct vc4_dev *vc5_mock_device(struct kunit *test);
|
|
+struct vc4_dev *vc6_mock_device(struct kunit *test);
|
|
|
|
struct vc4_dummy_output *
|
|
vc4_mock_atomic_add_output(struct kunit *test,
|
|
--- a/drivers/gpu/drm/vc4/vc4_drv.h
|
|
+++ b/drivers/gpu/drm/vc4/vc4_drv.h
|
|
@@ -555,6 +555,8 @@ struct vc4_txp_data {
|
|
unsigned int supports_40bit_addresses:1;
|
|
};
|
|
|
|
+extern const struct vc4_txp_data bcm2712_mop_data;
|
|
+extern const struct vc4_txp_data bcm2712_moplet_data;
|
|
extern const struct vc4_txp_data bcm2835_txp_data;
|
|
|
|
struct vc4_pv_data {
|