aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrancisco Jerez <currojerez@riseup.net>2009-08-01 22:19:18 -0400
committerDave Airlie <airlied@redhat.com>2009-08-04 00:10:56 -0400
commit74bd3c26b90f39b9dcc05c471333da8998572b5d (patch)
tree4817775c9ca9798ed7b91d80da8f870d1b070d60
parent2066facca4c7dfe9f5068ece0200a4dbf10f49e1 (diff)
drm: Define DRM_MODE_CONNECTOR_TV
The existing TV connector types are often unsuitable either because there is no way to probe them until they're actually plugged in or because they can change during run time (e.g. 7-pin DIN connectors that behave as S-Video, Component, Composite or SCART depending on the adaptor plugged in). Signed-off-by: Francisco Jerez <currojerez@riseup.net> Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--drivers/gpu/drm/drm_crtc.c1
-rw-r--r--drivers/gpu/drm/drm_sysfs.c3
-rw-r--r--include/drm/drm_mode.h1
3 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/drm_crtc.c b/drivers/gpu/drm/drm_crtc.c
index 9c758305472c..c7ab80b45e3f 100644
--- a/drivers/gpu/drm/drm_crtc.c
+++ b/drivers/gpu/drm/drm_crtc.c
@@ -146,6 +146,7 @@ static struct drm_conn_prop_enum_list drm_connector_enum_list[] =
146 { DRM_MODE_CONNECTOR_DisplayPort, "DisplayPort", 0 }, 146 { DRM_MODE_CONNECTOR_DisplayPort, "DisplayPort", 0 },
147 { DRM_MODE_CONNECTOR_HDMIA, "HDMI Type A", 0 }, 147 { DRM_MODE_CONNECTOR_HDMIA, "HDMI Type A", 0 },
148 { DRM_MODE_CONNECTOR_HDMIB, "HDMI Type B", 0 }, 148 { DRM_MODE_CONNECTOR_HDMIB, "HDMI Type B", 0 },
149 { DRM_MODE_CONNECTOR_TV, "TV", 0 },
149}; 150};
150 151
151static struct drm_prop_enum_list drm_encoder_enum_list[] = 152static struct drm_prop_enum_list drm_encoder_enum_list[] =
diff --git a/drivers/gpu/drm/drm_sysfs.c b/drivers/gpu/drm/drm_sysfs.c
index 85ec31b3ff00..adc179459c25 100644
--- a/drivers/gpu/drm/drm_sysfs.c
+++ b/drivers/gpu/drm/drm_sysfs.c
@@ -247,6 +247,7 @@ static ssize_t subconnector_show(struct device *device,
247 case DRM_MODE_CONNECTOR_Composite: 247 case DRM_MODE_CONNECTOR_Composite:
248 case DRM_MODE_CONNECTOR_SVIDEO: 248 case DRM_MODE_CONNECTOR_SVIDEO:
249 case DRM_MODE_CONNECTOR_Component: 249 case DRM_MODE_CONNECTOR_Component:
250 case DRM_MODE_CONNECTOR_TV:
250 prop = dev->mode_config.tv_subconnector_property; 251 prop = dev->mode_config.tv_subconnector_property;
251 is_tv = 1; 252 is_tv = 1;
252 break; 253 break;
@@ -287,6 +288,7 @@ static ssize_t select_subconnector_show(struct device *device,
287 case DRM_MODE_CONNECTOR_Composite: 288 case DRM_MODE_CONNECTOR_Composite:
288 case DRM_MODE_CONNECTOR_SVIDEO: 289 case DRM_MODE_CONNECTOR_SVIDEO:
289 case DRM_MODE_CONNECTOR_Component: 290 case DRM_MODE_CONNECTOR_Component:
291 case DRM_MODE_CONNECTOR_TV:
290 prop = dev->mode_config.tv_select_subconnector_property; 292 prop = dev->mode_config.tv_select_subconnector_property;
291 is_tv = 1; 293 is_tv = 1;
292 break; 294 break;
@@ -385,6 +387,7 @@ int drm_sysfs_connector_add(struct drm_connector *connector)
385 case DRM_MODE_CONNECTOR_Composite: 387 case DRM_MODE_CONNECTOR_Composite:
386 case DRM_MODE_CONNECTOR_SVIDEO: 388 case DRM_MODE_CONNECTOR_SVIDEO:
387 case DRM_MODE_CONNECTOR_Component: 389 case DRM_MODE_CONNECTOR_Component:
390 case DRM_MODE_CONNECTOR_TV:
388 for (i = 0; i < ARRAY_SIZE(connector_attrs_opt1); i++) { 391 for (i = 0; i < ARRAY_SIZE(connector_attrs_opt1); i++) {
389 ret = device_create_file(&connector->kdev, &connector_attrs_opt1[i]); 392 ret = device_create_file(&connector->kdev, &connector_attrs_opt1[i]);
390 if (ret) 393 if (ret)
diff --git a/include/drm/drm_mode.h b/include/drm/drm_mode.h
index ae304cc73c90..c51e9f528c8f 100644
--- a/include/drm/drm_mode.h
+++ b/include/drm/drm_mode.h
@@ -155,6 +155,7 @@ struct drm_mode_get_encoder {
155#define DRM_MODE_CONNECTOR_DisplayPort 10 155#define DRM_MODE_CONNECTOR_DisplayPort 10
156#define DRM_MODE_CONNECTOR_HDMIA 11 156#define DRM_MODE_CONNECTOR_HDMIA 11
157#define DRM_MODE_CONNECTOR_HDMIB 12 157#define DRM_MODE_CONNECTOR_HDMIB 12
158#define DRM_MODE_CONNECTOR_TV 13
158 159
159struct drm_mode_get_connector { 160struct drm_mode_get_connector {
160 161