1. 19 Apr, 2023 1 commit
  2. 18 Apr, 2023 5 commits
    • Ville Syrjälä's avatar
      drm/i915: Reuse <platform>_hotplug_mask() in .hpd_detection_setup() · a823c5a8
      Ville Syrjälä authored
      Replace the hardcoded masks with just a loop over all hpd
      pins using the <platform>_hotplug_mask() functions.
      
      v2: Deal with mtp
      
      Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com> #v1
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20230417131728.7705-5-ville.syrjala@linux.intel.com
      a823c5a8
    • Ville Syrjälä's avatar
      drm/i915: Check HPD live state during eDP probe · cfe5bdfb
      Ville Syrjälä authored
      We need to untangle the mess where some SKL machines (at least)
      declare both DDI A and DDI E to be present in their VBT, and
      both using AUX A. DDI A is a ghost eDP, wheres DDI E may be a
      real DP->VGA converter.
      
      Currently that is handled by checking the VBT child devices
      for conflicts before output probing. But that kind of solution
      will not work for the ADL phantom dual eDP VBTs. I think on
      those we just have to probe the eDP first. And would be nice
      to use the same probe scheme for everything.
      
      On these SKL systems if we probe DDI A first (which is only
      natural given it's declared by VBT first) we will get an answer
      via AUX, but it came from the DP->VGA converter hooked to the
      DDI E, not DDI A. Thus we mistakenly register eDP on DDI A
      and screw up the real DP device in DDI E.
      
      To fix this let's check the HPD live state during the eDP probe.
      If we got an answer via DPCD but HPD is still down let's assume
      we got the answer from someone else.
      
      Smoke tested on all my eDP machines (ilk,hsw-ult,tgl,adl) and
      I also tested turning off all HPD hardware prior to loading
      i915 to make sure it all comes up properly. And I simulated
      the failure path too by not turning on HPD sense and that
      correctly gave up on eDP.
      
      I *think* Windows might just fully depend on HPD here. I
      couldn't really find any other way they probe displays. And
      I did find code where they also check the live state prior
      to AUX transfers (something Imre and I have also talked
      about perhaps doing). That would also solve this as we'd
      not succeed in the eDP probe DPCD reads.
      
      Other solutions I've considered:
      
      - Reintrduce DDI strap checks on SKL. Unfortunately we just
        don't have any idea how reliable they are on real production
        hardware, and commit 5a2376d1 ("drm/i915/skl: WaIgnoreDDIAStrap
        is forever, always init DDI A") does suggest that not very.
        Sadly that commit is very poor in details :/
      
        Also the systems (Asrock B250M-HDV at least) fixed by commit
        41e35ffb ("drm/i915: Favor last VBT child device with
        conflicting AUX ch/DDC pin") might still not work since we
        don't know what their straps indicate. Stupid me for not
        asking the reporter to check those at the time :(
      
        We have currently two CI machines (fi-cfl-guc,fi-cfl-8700k
        both MS-7B54/Z370M) that also declare both DDI A and DDI E
        in VBT to use AUX A, and on these the DDI A strap is also
        set. There doesn't seem to be anything hooked up to either
        DDI however. But given the DDI A strap is wrong on these it
        might well be wrong on the Asrock too.
      
        Most other CI machines seem to have straps that generally
        match the VBT. fi-kbl-soraka is an exception though as DDI D
        strap is not set, but it is declared in VBT as a DP++ port.
        No idea if there's a real physical port to go with it or not.
      
      - Some kind of quirk just for the cases where both DDI A and DDI E
        are present in VBT. Might be feasible given we've ignored
        DDI A in these cases up to now successfully. But feels rather
        unsatisfactory, and not very future proof against funny VBTs.
      
      References: https://bugs.freedesktop.org/show_bug.cgi?id=111966Reviewed-by: default avatarVinod Govindapillai <vinod.govindapillai@intel.com>
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20230417131728.7705-4-ville.syrjala@linux.intel.com
      cfe5bdfb
    • Ville Syrjälä's avatar
      drm/i915: Introduce intel_hpd_enable_detection() · d28cdc43
      Ville Syrjälä authored
      Add a mechanism by which we can enable the HPD sense for
      individual encoders.
      
      This will be used during eDP probing to figure out if
      anything is actually connected. The normal intel_hpd_irq_setup()
      thing doesn't work since we only do that after probing the
      outputs, and we only enable HPD sense for encoders that were
      successfully probed.
      
      The other idea that crossed my minds was to just turn on
      HPD sense for all pins before output probing and let hpd_irq_setup()
      clean it up afterwards. But that doesn't work for BXT/GLK where
      the HPD invert information comes from the VBT child device.
      So looks like this really needs to be per-encoder.
      
      v2: Give it a better name (Jani)
      v3: Deal with mtl
      
      Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com> #v2
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20230417131728.7705-3-ville.syrjala@linux.intel.com
      d28cdc43
    • Ville Syrjälä's avatar
      drm/i915: Introduce <platform>_hotplug_mask() · 40d06b0f
      Ville Syrjälä authored
      Pair each <platform>_hotplug_enables() function with
      a corresponding <platform>_hotplug_mask() function so that
      we can determine right bits to clear on a per hpd_pin basis.
      We'll need this for turning on HPD sense for a specific
      encoder rather than just all of them.
      
      v2: Drop the unused 'i915' param (Jani)
      v3: Drop the _foo_hotplug_enables() redirection too
      v4: Deal with mtp
      
      Cc: Jani Nikula <jani.nikula@intel.com>
      Reviewed-by: Vinod Govindapillai <vinod.govindapillai@intel.com> #v3
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20230417131728.7705-2-ville.syrjala@linux.intel.com
      40d06b0f
    • Jani Nikula's avatar
  3. 17 Apr, 2023 10 commits
  4. 15 Apr, 2023 1 commit
  5. 14 Apr, 2023 12 commits
  6. 13 Apr, 2023 5 commits
  7. 12 Apr, 2023 6 commits