• Ville Syrjälä's avatar
    drm/i915: Consult VBT "LVDS config" bits to determine whether internal LVDS is present · ca3b3fa3
    Ville Syrjälä authored
    VBT seems to have some bits to tell us whether the internal LVDS port
    has something hooked up. In theory one might expect the VBT to not have
    a child device for the LVDS port if there's no panel hooked up, but
    in practice many VBTs still add the child device. The "LVDS config" bits
    seem more reliable though, so let's check those.
    
    So far we've used the "LVDS config" bits to check for eDP support on
    ILK+, and disable the internal LVDS when the value is 3. That value
    is actually documented as "Both internal LVDS and SDVO LVDS", but in
    practice it looks to mean "eDP" on all the ilk+ VBTs I've seen. So let's
    keep that interpretation, but for pre-ILK we will consider the value
    3 to also indicate the presence of the internal LVDS.
    
    Currently we have 25 DMI matches for the "no internal LVDS" quirk. In an
    effort to reduce that let's toss in a WARN when the DMI match and VBT
    both tell us that the internal LVDS is not present. The hope is that
    people will report a bug, and then we can just nuke the corresponding
    entry from the DMI quirk list. Credits to Jani for this idea.
    
    v2: Split the basic int_lvds_support thing to a separate patch (Jani)
    v3: Rebase
    v4: Limit this to VBT version >= 134
    
    Cc: Jani Nikula <jani.nikula@intel.com>
    Cc: Ondrej Zary <linux@rainbow-software.org>
    Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20180518150138.18361-1-ville.syrjala@linux.intel.comReviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
    ca3b3fa3
intel_lvds.c 34.2 KB