[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <Z5uDM-AGkxoGcKPg@louis-chauvet-laptop>
Date: Thu, 30 Jan 2025 14:48:35 +0100
From: Louis Chauvet <louis.chauvet@...tlin.com>
To: José Expósito <jose.exposito89@...il.com>
Cc: hamohammed.sa@...il.com, simona@...ll.ch, melissa.srw@...il.com,
maarten.lankhorst@...ux.intel.com, mripard@...nel.org,
tzimmermann@...e.de, airlied@...il.com,
dri-devel@...ts.freedesktop.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 13/13] drm/vkms: Allow to attach connectors and encoders
On 29/01/25 - 12:00, José Expósito wrote:
> Add a list of possible encoders to the connector configuration and
> helpers to attach and detach them.
>
> Now that the default configuration has its connector and encoder
> correctly, configure the output following the configuration.
>
> Signed-off-by: Louis Chauvet <louis.chauvet@...tlin.com>
> Signed-off-by: José Expósito <jose.exposito89@...il.com>
Co-developped-by: Louis Chauvet <louis.chauvet@...tlin.com>
Signed-off-by: Louis Chauvet <louis.chauvet@...tlin.com>
Signed-off-by: José Expósito <jose.exposito89@...il.com>
> ---
> drivers/gpu/drm/vkms/tests/vkms_config_test.c | 62 +++++++++++++++++
> drivers/gpu/drm/vkms/vkms_config.c | 69 +++++++++++++++++++
> drivers/gpu/drm/vkms/vkms_config.h | 33 +++++++++
> drivers/gpu/drm/vkms/vkms_output.c | 57 +++++++++++----
> 4 files changed, 209 insertions(+), 12 deletions(-)
[...]
> +int __must_check vkms_config_connector_attach_encoder(struct vkms_config_connector *connector_cfg,
> + struct vkms_config_encoder *encoder_cfg)
> +{
> + struct vkms_config_encoder *possible_encoder;
> + unsigned long idx = 0;
> + u32 encoder_idx = 0;
> +
> + xa_for_each(&connector_cfg->possible_encoders, idx, possible_encoder) {
> + if (possible_encoder == encoder_cfg)
> + return -EINVAL;
Is this really an error? For me this should be valid: we want to attach
the connector and the encoder, it is already the case, so it is good.
> + }
> +
> + return xa_alloc(&connector_cfg->possible_encoders, &encoder_idx,
> + encoder_cfg, xa_limit_32b, GFP_KERNEL);
> +}
> +
[...]
Powered by blists - more mailing lists