[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20250121-google-remove-crtc-index-from-parameter-v3-12-cac00a3c3544@bootlin.com>
Date: Tue, 21 Jan 2025 11:55:36 +0100
From: Louis Chauvet <louis.chauvet@...tlin.com>
To: MaĆra Canal <mairacanal@...eup.net>,
Haneen Mohammed <hamohammed.sa@...il.com>, Simona Vetter <simona@...ll.ch>,
Melissa Wen <melissa.srw@...il.com>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Maxime Ripard <mripard@...nel.org>, Thomas Zimmermann <tzimmermann@...e.de>,
David Airlie <airlied@...il.com>
Cc: arthurgrillo@...eup.net, jeremie.dautheribes@...tlin.com,
miquel.raynal@...tlin.com, thomas.petazzoni@...tlin.com,
seanpaul@...gle.com, nicolejadeyee@...gle.com, linux-kernel@...r.kernel.org,
dri-devel@...ts.freedesktop.org, Louis Chauvet <louis.chauvet@...tlin.com>
Subject: [PATCH v3 12/16] drm/vkms: Introduce config for connector type
To allow emulation of different kind of connector, make the connector type
configurable.
Signed-off-by: Louis Chauvet <louis.chauvet@...tlin.com>
---
drivers/gpu/drm/vkms/vkms_config.c | 1 +
drivers/gpu/drm/vkms/vkms_config.h | 1 +
drivers/gpu/drm/vkms/vkms_output.c | 2 +-
3 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/vkms/vkms_config.c b/drivers/gpu/drm/vkms/vkms_config.c
index f1f02c66755f9660b48dfa5cb786afa1e6ae553b..d2006d7b47f9cf21487659cc3eacb6272d1904b0 100644
--- a/drivers/gpu/drm/vkms/vkms_config.c
+++ b/drivers/gpu/drm/vkms/vkms_config.c
@@ -144,6 +144,7 @@ struct vkms_config_connector *vkms_config_create_connector(struct vkms_config *v
list_add(&vkms_config_connector->link, &vkms_config->connectors);
xa_init_flags(&vkms_config_connector->possible_encoders, XA_FLAGS_ALLOC);
+ vkms_config_connector->type = DRM_MODE_CONNECTOR_VIRTUAL;
return vkms_config_connector;
}
diff --git a/drivers/gpu/drm/vkms/vkms_config.h b/drivers/gpu/drm/vkms/vkms_config.h
index 584d015d6b8f420d82b2cfe38c991e93ad8288f3..18b8978b7b7b58c45fcf11f7130883013e34d8ed 100644
--- a/drivers/gpu/drm/vkms/vkms_config.h
+++ b/drivers/gpu/drm/vkms/vkms_config.h
@@ -100,6 +100,7 @@ struct vkms_config_connector {
struct list_head link;
struct xarray possible_encoders;
+ int type;
/* Internal usage */
struct drm_connector *connector;
diff --git a/drivers/gpu/drm/vkms/vkms_output.c b/drivers/gpu/drm/vkms/vkms_output.c
index 146ce254a027c662ae275dd2ec0024a46fa8119d..50aa802da479e5ba383e5db49dc2c7c6981f0bef 100644
--- a/drivers/gpu/drm/vkms/vkms_output.c
+++ b/drivers/gpu/drm/vkms/vkms_output.c
@@ -97,7 +97,7 @@ int vkms_output_init(struct vkms_device *vkmsdev)
if (!config_connector->connector)
return -ENOMEM;
ret = drmm_connector_init(&vkmsdev->drm, config_connector->connector,
- &vkms_connector_funcs, DRM_MODE_CONNECTOR_VIRTUAL, NULL);
+ &vkms_connector_funcs, config_connector->type, NULL);
if (ret)
return ret;
drm_connector_helper_add(config_connector->connector, &vkms_conn_helper_funcs);
--
2.47.1
Powered by blists - more mailing lists