<html>
    <head>
      <base href="https://bugs.freedesktop.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [NVAC] Trying to register nv_backlight after NV96 did it"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=86539#c6">Comment # 6</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [NVAC] Trying to register nv_backlight after NV96 did it"
   href="https://bugs.freedesktop.org/show_bug.cgi?id=86539">bug 86539</a>
              from <span class="vcard"><a class="email" href="mailto:lukas@wunner.de" title="Lukas Wunner <lukas@wunner.de>"> <span class="fn">Lukas Wunner</span></a>
</span></b>
        <pre>To add to this discussion, radeon has a quirk for the MacBookPro8,1 wherein a
backlight is *not* registered since this machine has a gmux built in. See
radeon_atom_backlight_init  in atombios_encoders.c:

<a href="http://cgit.freedesktop.org/~airlied/linux/tree/drivers/gpu/drm/radeon/atombios_encoders.c?h=drm-next#n189">http://cgit.freedesktop.org/~airlied/linux/tree/drivers/gpu/drm/radeon/atombios_encoders.c?h=drm-next#n189</a>

    /* Mac laptops with multiple GPUs use the gmux driver for backlight
     * so don't register a backlight device
     */
    if ((rdev->pdev->subsystem_vendor == PCI_VENDOR_ID_APPLE) &&
        (rdev->pdev->device == 0x6741))
        return;

The code is wrong though in that it tries to recognize gmux by way of the
machine's PCI ID. The MacBookPro8,1 was available with multiple different AMD
GPUs and we'd need to hardcode all of their PCI IDs. Also, the MacBookPro 11,5
has an AMD GPU and we'd need to add its PCI ID as well.

A more sensible solution, as Pierre suggests, is to detect the presence of gmux
and not register a backlight if gmux is found. So basically a quirk specific to
all dual GPU MacBook Pros.

This patch adds a handy function to detect the presence of gmux. Unfortunately
noone has reviewed the series it belongs to so far:
<a href="http://lists.freedesktop.org/archives/dri-devel/2016-January/098403.html">http://lists.freedesktop.org/archives/dri-devel/2016-January/098403.html</a></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>