diff options
Diffstat (limited to 'drivers/gpu/drm/drm_crtc.c')
-rw-r--r-- | drivers/gpu/drm/drm_crtc.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c index 711d9653abd0..405c63b9d539 100644 --- a/drivers/gpu/drm/drm_crtc.c +++ b/drivers/gpu/drm/drm_crtc.c | |||
@@ -163,6 +163,7 @@ static struct drm_conn_prop_enum_list drm_connector_enum_list[] = | |||
163 | { DRM_MODE_CONNECTOR_HDMIB, "HDMI-B", 0 }, | 163 | { DRM_MODE_CONNECTOR_HDMIB, "HDMI-B", 0 }, |
164 | { DRM_MODE_CONNECTOR_TV, "TV", 0 }, | 164 | { DRM_MODE_CONNECTOR_TV, "TV", 0 }, |
165 | { DRM_MODE_CONNECTOR_eDP, "eDP", 0 }, | 165 | { DRM_MODE_CONNECTOR_eDP, "eDP", 0 }, |
166 | { DRM_MODE_CONNECTOR_VIRTUAL, "Virtual", 0}, | ||
166 | }; | 167 | }; |
167 | 168 | ||
168 | static struct drm_prop_enum_list drm_encoder_enum_list[] = | 169 | static struct drm_prop_enum_list drm_encoder_enum_list[] = |
@@ -171,6 +172,7 @@ static struct drm_prop_enum_list drm_encoder_enum_list[] = | |||
171 | { DRM_MODE_ENCODER_TMDS, "TMDS" }, | 172 | { DRM_MODE_ENCODER_TMDS, "TMDS" }, |
172 | { DRM_MODE_ENCODER_LVDS, "LVDS" }, | 173 | { DRM_MODE_ENCODER_LVDS, "LVDS" }, |
173 | { DRM_MODE_ENCODER_TVDAC, "TV" }, | 174 | { DRM_MODE_ENCODER_TVDAC, "TV" }, |
175 | { DRM_MODE_ENCODER_VIRTUAL, "Virtual" }, | ||
174 | }; | 176 | }; |
175 | 177 | ||
176 | char *drm_get_encoder_name(struct drm_encoder *encoder) | 178 | char *drm_get_encoder_name(struct drm_encoder *encoder) |
@@ -464,8 +466,10 @@ void drm_connector_init(struct drm_device *dev, | |||
464 | list_add_tail(&connector->head, &dev->mode_config.connector_list); | 466 | list_add_tail(&connector->head, &dev->mode_config.connector_list); |
465 | dev->mode_config.num_connector++; | 467 | dev->mode_config.num_connector++; |
466 | 468 | ||
467 | drm_connector_attach_property(connector, | 469 | if (connector_type != DRM_MODE_CONNECTOR_VIRTUAL) |
468 | dev->mode_config.edid_property, 0); | 470 | drm_connector_attach_property(connector, |
471 | dev->mode_config.edid_property, | ||
472 | 0); | ||
469 | 473 | ||
470 | drm_connector_attach_property(connector, | 474 | drm_connector_attach_property(connector, |
471 | dev->mode_config.dpms_property, 0); | 475 | dev->mode_config.dpms_property, 0); |
@@ -2114,8 +2118,10 @@ struct drm_property *drm_property_create(struct drm_device *dev, int flags, | |||
2114 | property->num_values = num_values; | 2118 | property->num_values = num_values; |
2115 | INIT_LIST_HEAD(&property->enum_blob_list); | 2119 | INIT_LIST_HEAD(&property->enum_blob_list); |
2116 | 2120 | ||
2117 | if (name) | 2121 | if (name) { |
2118 | strncpy(property->name, name, DRM_PROP_NAME_LEN); | 2122 | strncpy(property->name, name, DRM_PROP_NAME_LEN); |
2123 | property->name[DRM_PROP_NAME_LEN-1] = '\0'; | ||
2124 | } | ||
2119 | 2125 | ||
2120 | list_add_tail(&property->head, &dev->mode_config.property_list); | 2126 | list_add_tail(&property->head, &dev->mode_config.property_list); |
2121 | return property; | 2127 | return property; |