Mesa (master): st/xorg: Support more then one output of a given type

Jakob Bornecrantz wallbraker at kemper.freedesktop.org
Mon Oct 19 21:09:16 UTC 2009


Module: Mesa
Branch: master
Commit: b8843c60565094be311e3b31c0826a3035627a3e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=b8843c60565094be311e3b31c0826a3035627a3e

Author: Jakob Bornecrantz <jakob at vmware.com>
Date:   Sun Oct 18 15:25:30 2009 +0200

st/xorg: Support more then one output of a given type

---

 src/gallium/state_trackers/xorg/xorg_output.c |   23 +++++++++++++----------
 1 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/src/gallium/state_trackers/xorg/xorg_output.c b/src/gallium/state_trackers/xorg/xorg_output.c
index 26f45f8..964d959 100644
--- a/src/gallium/state_trackers/xorg/xorg_output.c
+++ b/src/gallium/state_trackers/xorg/xorg_output.c
@@ -56,17 +56,17 @@
 static char *connector_enum_list[] = {
     "Unknown",
     "VGA",
-    "DVI-I",
-    "DVI-D",
-    "DVI-A",
+    "DVI",
+    "DVI",
+    "DVI",
     "Composite",
     "SVIDEO",
     "LVDS",
-    "Component",
-    "9-pin DIN",
-    "DisplayPort",
-    "HDMI Type A",
-    "HDMI Type B",
+    "CTV",
+    "DIN",
+    "DP",
+    "HDMI",
+    "HDMI",
 };
 
 static void
@@ -240,7 +240,7 @@ output_init(ScrnInfoPtr pScrn)
     drmModeResPtr res;
     drmModeConnectorPtr drm_connector = NULL;
     drmModeEncoderPtr drm_encoder = NULL;
-    char *name;
+    char name[32];
     int c, v, p;
 
     res = drmModeGetResources(ms->fd);
@@ -273,7 +273,10 @@ output_init(ScrnInfoPtr pScrn)
 	(void)v;
 #endif
 
-	name = connector_enum_list[drm_connector->connector_type];
+	snprintf(name, 32, "%s%d",
+		 connector_enum_list[drm_connector->connector_type],
+		 drm_connector->connector_type_id);
+
 
 	output = xf86OutputCreate(pScrn, &output_funcs, name);
 	if (!output)




More information about the mesa-commit mailing list