Commit 74bd3c26 authored by Francisco Jerez's avatar Francisco Jerez Committed by Dave Airlie

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: default avatarFrancisco Jerez <currojerez@riseup.net>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 2066facc
...@@ -146,6 +146,7 @@ static struct drm_conn_prop_enum_list drm_connector_enum_list[] = ...@@ -146,6 +146,7 @@ static struct drm_conn_prop_enum_list drm_connector_enum_list[] =
{ DRM_MODE_CONNECTOR_DisplayPort, "DisplayPort", 0 }, { DRM_MODE_CONNECTOR_DisplayPort, "DisplayPort", 0 },
{ DRM_MODE_CONNECTOR_HDMIA, "HDMI Type A", 0 }, { DRM_MODE_CONNECTOR_HDMIA, "HDMI Type A", 0 },
{ DRM_MODE_CONNECTOR_HDMIB, "HDMI Type B", 0 }, { DRM_MODE_CONNECTOR_HDMIB, "HDMI Type B", 0 },
{ DRM_MODE_CONNECTOR_TV, "TV", 0 },
}; };
static struct drm_prop_enum_list drm_encoder_enum_list[] = static struct drm_prop_enum_list drm_encoder_enum_list[] =
......
...@@ -247,6 +247,7 @@ static ssize_t subconnector_show(struct device *device, ...@@ -247,6 +247,7 @@ static ssize_t subconnector_show(struct device *device,
case DRM_MODE_CONNECTOR_Composite: case DRM_MODE_CONNECTOR_Composite:
case DRM_MODE_CONNECTOR_SVIDEO: case DRM_MODE_CONNECTOR_SVIDEO:
case DRM_MODE_CONNECTOR_Component: case DRM_MODE_CONNECTOR_Component:
case DRM_MODE_CONNECTOR_TV:
prop = dev->mode_config.tv_subconnector_property; prop = dev->mode_config.tv_subconnector_property;
is_tv = 1; is_tv = 1;
break; break;
...@@ -287,6 +288,7 @@ static ssize_t select_subconnector_show(struct device *device, ...@@ -287,6 +288,7 @@ static ssize_t select_subconnector_show(struct device *device,
case DRM_MODE_CONNECTOR_Composite: case DRM_MODE_CONNECTOR_Composite:
case DRM_MODE_CONNECTOR_SVIDEO: case DRM_MODE_CONNECTOR_SVIDEO:
case DRM_MODE_CONNECTOR_Component: case DRM_MODE_CONNECTOR_Component:
case DRM_MODE_CONNECTOR_TV:
prop = dev->mode_config.tv_select_subconnector_property; prop = dev->mode_config.tv_select_subconnector_property;
is_tv = 1; is_tv = 1;
break; break;
...@@ -385,6 +387,7 @@ int drm_sysfs_connector_add(struct drm_connector *connector) ...@@ -385,6 +387,7 @@ int drm_sysfs_connector_add(struct drm_connector *connector)
case DRM_MODE_CONNECTOR_Composite: case DRM_MODE_CONNECTOR_Composite:
case DRM_MODE_CONNECTOR_SVIDEO: case DRM_MODE_CONNECTOR_SVIDEO:
case DRM_MODE_CONNECTOR_Component: case DRM_MODE_CONNECTOR_Component:
case DRM_MODE_CONNECTOR_TV:
for (i = 0; i < ARRAY_SIZE(connector_attrs_opt1); i++) { for (i = 0; i < ARRAY_SIZE(connector_attrs_opt1); i++) {
ret = device_create_file(&connector->kdev, &connector_attrs_opt1[i]); ret = device_create_file(&connector->kdev, &connector_attrs_opt1[i]);
if (ret) if (ret)
......
...@@ -155,6 +155,7 @@ struct drm_mode_get_encoder { ...@@ -155,6 +155,7 @@ struct drm_mode_get_encoder {
#define DRM_MODE_CONNECTOR_DisplayPort 10 #define DRM_MODE_CONNECTOR_DisplayPort 10
#define DRM_MODE_CONNECTOR_HDMIA 11 #define DRM_MODE_CONNECTOR_HDMIA 11
#define DRM_MODE_CONNECTOR_HDMIB 12 #define DRM_MODE_CONNECTOR_HDMIB 12
#define DRM_MODE_CONNECTOR_TV 13
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