Commit a7331e5c authored by Thomas Hellstrom's avatar Thomas Hellstrom Committed by Dave Airlie

drm: Introduce "Virtual" connectors and encoders

This will allow us to attach various properties specific to virtual
monitors in the future.

Note that we don't export an EDID property for "Virtual" connectors.
Signed-off-by: default avatarThomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: default avatarJakob Bornecrantz <jakob@vmware.com>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 094803e0
...@@ -162,6 +162,7 @@ static struct drm_conn_prop_enum_list drm_connector_enum_list[] = ...@@ -162,6 +162,7 @@ static struct drm_conn_prop_enum_list drm_connector_enum_list[] =
{ DRM_MODE_CONNECTOR_HDMIB, "HDMI-B", 0 }, { DRM_MODE_CONNECTOR_HDMIB, "HDMI-B", 0 },
{ DRM_MODE_CONNECTOR_TV, "TV", 0 }, { DRM_MODE_CONNECTOR_TV, "TV", 0 },
{ DRM_MODE_CONNECTOR_eDP, "eDP", 0 }, { DRM_MODE_CONNECTOR_eDP, "eDP", 0 },
{ DRM_MODE_CONNECTOR_VIRTUAL, "Virtual", 0},
}; };
static struct drm_prop_enum_list drm_encoder_enum_list[] = static struct drm_prop_enum_list drm_encoder_enum_list[] =
...@@ -170,6 +171,7 @@ static struct drm_prop_enum_list drm_encoder_enum_list[] = ...@@ -170,6 +171,7 @@ static struct drm_prop_enum_list drm_encoder_enum_list[] =
{ DRM_MODE_ENCODER_TMDS, "TMDS" }, { DRM_MODE_ENCODER_TMDS, "TMDS" },
{ DRM_MODE_ENCODER_LVDS, "LVDS" }, { DRM_MODE_ENCODER_LVDS, "LVDS" },
{ DRM_MODE_ENCODER_TVDAC, "TV" }, { DRM_MODE_ENCODER_TVDAC, "TV" },
{ DRM_MODE_ENCODER_VIRTUAL, "Virtual" },
}; };
char *drm_get_encoder_name(struct drm_encoder *encoder) char *drm_get_encoder_name(struct drm_encoder *encoder)
...@@ -463,8 +465,10 @@ void drm_connector_init(struct drm_device *dev, ...@@ -463,8 +465,10 @@ void drm_connector_init(struct drm_device *dev,
list_add_tail(&connector->head, &dev->mode_config.connector_list); list_add_tail(&connector->head, &dev->mode_config.connector_list);
dev->mode_config.num_connector++; dev->mode_config.num_connector++;
drm_connector_attach_property(connector, if (connector_type != DRM_MODE_CONNECTOR_VIRTUAL)
dev->mode_config.edid_property, 0); drm_connector_attach_property(connector,
dev->mode_config.edid_property,
0);
drm_connector_attach_property(connector, drm_connector_attach_property(connector,
dev->mode_config.dpms_property, 0); dev->mode_config.dpms_property, 0);
......
...@@ -120,11 +120,12 @@ struct drm_mode_crtc { ...@@ -120,11 +120,12 @@ struct drm_mode_crtc {
struct drm_mode_modeinfo mode; struct drm_mode_modeinfo mode;
}; };
#define DRM_MODE_ENCODER_NONE 0 #define DRM_MODE_ENCODER_NONE 0
#define DRM_MODE_ENCODER_DAC 1 #define DRM_MODE_ENCODER_DAC 1
#define DRM_MODE_ENCODER_TMDS 2 #define DRM_MODE_ENCODER_TMDS 2
#define DRM_MODE_ENCODER_LVDS 3 #define DRM_MODE_ENCODER_LVDS 3
#define DRM_MODE_ENCODER_TVDAC 4 #define DRM_MODE_ENCODER_TVDAC 4
#define DRM_MODE_ENCODER_VIRTUAL 5
struct drm_mode_get_encoder { struct drm_mode_get_encoder {
__u32 encoder_id; __u32 encoder_id;
...@@ -162,6 +163,7 @@ struct drm_mode_get_encoder { ...@@ -162,6 +163,7 @@ struct drm_mode_get_encoder {
#define DRM_MODE_CONNECTOR_HDMIB 12 #define DRM_MODE_CONNECTOR_HDMIB 12
#define DRM_MODE_CONNECTOR_TV 13 #define DRM_MODE_CONNECTOR_TV 13
#define DRM_MODE_CONNECTOR_eDP 14 #define DRM_MODE_CONNECTOR_eDP 14
#define DRM_MODE_CONNECTOR_VIRTUAL 15
struct drm_mode_get_connector { struct drm_mode_get_connector {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment