[PATCH v3 12/16] drm/vkms: Introduce config for connector type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



To allow emulation of different kind of connector, make the connector type
configurable.

Signed-off-by: Louis Chauvet <louis.chauvet@xxxxxxxxxxx>
---
 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




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux