• Ville Syrjälä's avatar
    drm/i915/bios: Use i915->vbt.ports[] for all g4x+ · 594c504d
    Ville Syrjälä authored
    Extend the vbt.ports[] stuff for all g4x+ platforms. We do need
    to drop the version check as some elk/ctg machines may have VBTs
    older than that. The oldest I know is an elk with version 142.
    But the child device stuff has had the correct size since at
    least version 125 (observed on my sdg), so from that angle this
    should be totally safe.
    
    This does couple of things:
    - Start using the aux_ch/ddc_pin from VBT instead of just the
      hardcoded defaults. Hopefully there are no VBTs with entirely
      bogus information here.
    - Start using i915->vbt.ports[] for intel_bios_is_port_dp_dual_mode().
      Should be fine as the logic doesn't actually change.
    - Start using i915->vbt.ports[] for intel_bios_is_port_edp().
      The old codepath only looks at the DP DVO ports, the new codepath
      looks at both DP and HDMI DVO ports. In principle that should not
      matter. We also stop looking at some of the other device type bits
      (eg. LVDS,MIPI,ANALOG,etc.). Hopefully no VBT is broken enough that
      it sets up totally conflicting device type bits (eg. LVDS+eDP at the
      same time). We also lose the "g4x->no eDP ever" hardcoding (shouldn't
      be hard to re-introduce that into eg. sanitize_device_type() if needed).
    
    Lightly smoke tested on a set of machines (one of ctg,ilk,snb,ivb each)
    with both DP and HDMI (DP++). Everything still worked as it should.
    Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
    Link: https://patchwork.freedesktop.org/patch/msgid/20211217155403.31477-4-ville.syrjala@linux.intel.comReviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
    594c504d
intel_bios.c 83.5 KB