<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - output name duplication for providers #1 and up"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=79531">79531</a>
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>xorg-driver-ati@lists.x.org
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>output name duplication for providers #1 and up
          </td>
        </tr>

        <tr>
          <th>QA Contact</th>
          <td>xorg-team@lists.x.org
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Linux (All)
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>gmt@be-evil.net
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>git
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Driver/Radeon
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>xorg
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Created <span class=""><a href="attachment.cgi?id=100274" name="attach_100274" title="churn_output_names.patch">attachment 100274</a> <a href="attachment.cgi?id=100274&action=edit" title="churn_output_names.patch">[details]</a></span>
churn_output_names.patch

Thanks to a Dave Airlie and others in irc for helping me get to the bottom of
this.

For cards other than "#0" (I'm still quite unclear on where exactly the
numbering comes from -- I presume it's the same place as the /dev/dri/card*
specials), it is still quite possible to get duplicated output names.

This is because the code identified in the source as "for compatibility with
UMS output names" does not run; instead, for these non-#0-cards, only the
human-readable output type name (i.e.: "DVI", "HDMI", etc.) differentiates the
various outputs.  Unfortunately these names are not at all unique:

const char *output_names[] = {
                   "None",
                   "VGA",
                   "DVI",
                   "DVI",
                   "DVI",
                   "Composite",
                   "S-video",
                   "LVDS",
                   "CTV",
                   "DIN",
                   "DisplayPort",
                   "HDMI",
                   "HDMI",
                   "TV",
                   "eDP"
};

The result, depending on your hardware: adding a second card results in 
duplicate output names in the global randr namespace.  Wouldn't be so terrible,
except it makes xrandr go utterly berzerk.*

Rather than pile more output numbering kludges on top of the ones already in
drmmode_output_init, folks in IRC seemed to agree that a better solution would
be to go ahead and allow the output names to churn and replace the duplicate
values in the above array with unique ones.

I posted this to the mailing list some days ago and no flame-war ensued.  But,
I'm new in town; perhaps bugzilla is a better way to get my patch looked at?

* This may represent a second bug in apps/xrandr, as I noticed several
third-party consumers of libXrandr continued to work correctly in spite of the
duplicate names; however, apps/xrandr always freaked out, even if I only fed it
XID's.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>