[PATCH v3 09/14] drm/vkms: Allow to configure multiple CRTCs

Louis Chauvet louis.chauvet at bootlin.com
Mon Feb 17 15:45:38 UTC 2025



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 at bootlin.com>
> Signed-off-by: Louis Chauvet <louis.chauvet at bootlin.com>
> Signed-off-by: José Expósito <jose.exposito89 at gmail.com>
> ---
>   .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 at bootlin.com>

-- 
Louis Chauvet, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



More information about the dri-devel mailing list