xserver: Branch 'master'

Adam Jackson ajax at kemper.freedesktop.org
Thu Sep 17 07:48:51 PDT 2015


 hw/xfree86/drivers/modesetting/drmmode_display.c |   20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

New commits:
commit 139e36dd5cbab80a9296129f3d25379dc01442b3
Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date:   Fri Sep 4 18:56:19 2015 -0400

    modesetting: fix up output naming convention
    
    A user on a nouveau-driven card ran into a problem where DVI-D-1 and
    DVI-I-1 were aliasing. The simplest fix is to provide the full connector
    names. While we're at it, rename the output names to match what is in
    the kernel, and start counting the connectors from 1 rather than 0. The
    only deviation is HDMI vs HDMI-A, which kept its original name.
    
    This will break backwards compatibility with existing xorg.conf's that
    reference output names, but the alternative is to create a separate
    counting system, further disconnecting from the kernel names.
    
    Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
    Reviewed-by: Dave Airlie <airlied at redhat.com>

diff --git a/hw/xfree86/drivers/modesetting/drmmode_display.c b/hw/xfree86/drivers/modesetting/drmmode_display.c
index 4d8892f..736bfc4 100644
--- a/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ b/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -1292,17 +1292,17 @@ static int subpixel_conv_table[7] = {
 static const char *const output_names[] = {
     "None",
     "VGA",
-    "DVI",
-    "DVI",
-    "DVI",
+    "DVI-I",
+    "DVI-D",
+    "DVI-A",
     "Composite",
-    "S-video",
+    "SVIDEO",
     "LVDS",
-    "CTV",
+    "Component",
     "DIN",
-    "DisplayPort",
-    "HDMI",
+    "DP",
     "HDMI",
+    "HDMI-B",
     "TV",
     "eDP",
     "Virtual",
@@ -1377,13 +1377,13 @@ drmmode_create_name(ScrnInfoPtr pScrn, drmModeConnectorPtr koutput, char *name,
 
  fallback:
     if (koutput->connector_type >= MS_ARRAY_SIZE(output_names))
-        snprintf(name, 32, "Unknown-%d", koutput->connector_type_id - 1);
+        snprintf(name, 32, "Unknown%d-%d", koutput->connector_type, koutput->connector_type_id);
 #ifdef MODESETTING_OUTPUT_SLAVE_SUPPORT
     else if (pScrn->is_gpu)
-        snprintf(name, 32, "%s-%d-%d", output_names[koutput->connector_type], pScrn->scrnIndex - GPU_SCREEN_OFFSET + 1, koutput->connector_type_id - 1);
+        snprintf(name, 32, "%s-%d-%d", output_names[koutput->connector_type], pScrn->scrnIndex - GPU_SCREEN_OFFSET + 1, koutput->connector_type_id);
 #endif
     else
-        snprintf(name, 32, "%s-%d", output_names[koutput->connector_type], koutput->connector_type_id - 1);
+        snprintf(name, 32, "%s-%d", output_names[koutput->connector_type], koutput->connector_type_id);
 }
 
 static unsigned int


More information about the xorg-commit mailing list