Le 17/02/2025 à 11:01, José Expósito a écrit :
Add a list of CRTCs to vkms_config and helper functions to add and
remove as many CRTCs as wanted.
For backwards compatibility, add one CRTC to the default configuration.
A future patch will allow to attach planes and CRTCs, but for the
moment there are no changes in the way the output is configured.
Co-developed-by: Louis Chauvet <louis.chauvet@xxxxxxxxxxx>
Signed-off-by: Louis Chauvet <louis.chauvet@xxxxxxxxxxx>
Signed-off-by: José Expósito <jose.exposito89@xxxxxxxxx>
---
.clang-format | 1 +
drivers/gpu/drm/vkms/tests/vkms_config_test.c | 73 ++++++++++++++++-
drivers/gpu/drm/vkms/vkms_config.c | 63 ++++++++++++++-
drivers/gpu/drm/vkms/vkms_config.h | 80 +++++++++++++++++++
4 files changed, 212 insertions(+), 5 deletions(-)
diff --git a/.clang-format b/.clang-format
index c585d2a5b395..e7a901c3617d 100644
--- a/.clang-format
+++ b/.clang-format
@@ -690,6 +690,7 @@ ForEachMacros:
- 'v4l2_m2m_for_each_src_buf'
- 'v4l2_m2m_for_each_src_buf_safe'
- 'virtio_device_for_each_vq'
+ - 'vkms_config_for_each_crtc'
- 'vkms_config_for_each_plane'
- 'while_for_each_ftrace_op'
- 'xa_for_each'
diff --git a/drivers/gpu/drm/vkms/tests/vkms_config_test.c b/drivers/gpu/drm/vkms/tests/vkms_config_test.c
index fe6f079902fd..6a89361601a0 100644
--- a/drivers/gpu/drm/vkms/tests/vkms_config_test.c
+++ b/drivers/gpu/drm/vkms/tests/vkms_config_test.c
@@ -25,6 +25,7 @@ static void vkms_config_test_empty_config(struct kunit *test)
KUNIT_EXPECT_STREQ(test, vkms_config_get_device_name(config), "test");
KUNIT_EXPECT_TRUE(test, list_empty(&config->planes));
+ KUNIT_EXPECT_TRUE(test, list_empty(&config->crtcs));
Ditto, with this modification:
Reviewed-by: Louis Chauvet <louis.chauvet@xxxxxxxxxxx>
--
Louis Chauvet, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com