1. 13 Nov, 2018 1 commit
  2. 12 Nov, 2018 4 commits
  3. 09 Nov, 2018 24 commits
  4. 08 Nov, 2018 7 commits
  5. 07 Nov, 2018 4 commits
    • Imre Deak's avatar
      drm/i915/icl: Fix power well 2 wrt. DC-off toggling order · a33e1ece
      Imre Deak authored
      To enable DC5/6 power well 2 has to be disabled as for previous
      platforms, so fix things up.
      
      Bspec: 4234
      Fixes: 67ca07e7 ("drm/i915/icl: Add power well support")
      Cc: Animesh Manna <animesh.manna@intel.com>
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20181102182200.17219-1-imre.deak@intel.com
      a33e1ece
    • Lyude Paul's avatar
      drm/i915: Add short HPD IRQ storm detection for non-MST systems · 9a64c650
      Lyude Paul authored
      Unfortunately, it seems that the HPD IRQ storm problem from the early
      days of Intel GPUs was never entirely solved, only mostly. Within the
      last couple of days, I got a bug report from one of our customers who
      had been having issues with their machine suddenly booting up very
      slowly after having updated. The amount of time it took to boot went
      from around 30 seconds, to over 6 minutes consistently.
      
      After some investigation, I discovered that i915 was reporting massive
      amounts of short HPD IRQ spam on this system from the DisplayPort port,
      despite there not being anything actually connected. The symptoms would
      start with one "long" HPD IRQ being detected at boot:
      
      [    1.891398] [drm:intel_get_hpd_pins [i915]] hotplug event received, stat 0x00440000, dig 0x00440000, pins 0x000000a0
      [    1.891436] [drm:intel_hpd_irq_handler [i915]] digital hpd port B - long
      [    1.891472] [drm:intel_hpd_irq_handler [i915]] Received HPD interrupt on PIN 5 - cnt: 0
      [    1.891508] [drm:intel_hpd_irq_handler [i915]] digital hpd port D - long
      [    1.891544] [drm:intel_hpd_irq_handler [i915]] Received HPD interrupt on PIN 7 - cnt: 0
      [    1.891592] [drm:intel_dp_hpd_pulse [i915]] got hpd irq on port B - long
      [    1.891628] [drm:intel_dp_hpd_pulse [i915]] got hpd irq on port D - long
      …
      
      followed by constant short IRQs afterwards:
      
      [    1.895091] [drm:intel_encoder_hotplug [i915]] [CONNECTOR:66:DP-1] status updated from unknown to disconnected
      [    1.895129] [drm:i915_hotplug_work_func [i915]] Connector DP-3 (pin 7) received hotplug event.
      [    1.895165] [drm:intel_dp_detect [i915]] [CONNECTOR:72:DP-3]
      [    1.895275] [drm:intel_get_hpd_pins [i915]] hotplug event received, stat 0x00200000, dig 0x00200000, pins 0x00000080
      [    1.895312] [drm:intel_hpd_irq_handler [i915]] digital hpd port D - short
      [    1.895762] [drm:intel_get_hpd_pins [i915]] hotplug event received, stat 0x00200000, dig 0x00200000, pins 0x00000080
      [    1.895799] [drm:intel_hpd_irq_handler [i915]] digital hpd port D - short
      [    1.896239] [drm:intel_dp_aux_xfer [i915]] dp_aux_ch timeout status 0x71450085
      [    1.896293] [drm:intel_get_hpd_pins [i915]] hotplug event received, stat 0x00200000, dig 0x00200000, pins 0x00000080
      [    1.896330] [drm:intel_hpd_irq_handler [i915]] digital hpd port D - short
      [    1.896781] [drm:intel_get_hpd_pins [i915]] hotplug event received, stat 0x00200000, dig 0x00200000, pins 0x00000080
      [    1.896817] [drm:intel_hpd_irq_handler [i915]] digital hpd port D - short
      [    1.897275] [drm:intel_get_hpd_pins [i915]] hotplug event received, stat 0x00200000, dig 0x00200000, pins 0x00000080
      
      The customer's system in question has a GM45 GPU, which is apparently
      well known for hotplugging storms.
      
      So, workaround this impressively broken hardware by changing the default
      HPD storm threshold from 5 to 50. Then, make long IRQs count for 10, and
      short IRQs count for 1. This makes it so that 5 long IRQs will trigger
      an HPD storm, and on systems with short HPD storm detection 50 short
      IRQs will trigger an HPD storm. 50 short IRQs amounts to 100ms of
      constant pulsing, which seems like a good middleground between being too
      sensitive and not being sensitive enough (which would cause visible
      stutters in userspace every time a storm occurs).
      
      And just to be extra safe: we don't enable this by default on systems
      with MST support. There's too high of a chance of MST support triggering
      storm detection, and systems that are new enough to support MST are a
      lot less likely to have issues with IRQ storms anyway.
      
      As a note: this patch was tested using a ThinkPad T450s and a Chamelium
      to simulate the short IRQ storms.
      
      Changes since v1:
      - Don't use two separate thresholds, just make long IRQs count for 10
        each and short IRQs count for 1. This simplifies the code a bit
        - Ville Syrjälä
      Changes since v2:
      - Document @long_hpd in intel_hpd_irq_storm_detect, no functional
        changes
      Changes since v4:
      - Remove !! in long_hpd assignment - Ville Syrjälä
      - queue_hp = true - Ville Syrjälä
      Signed-off-by: default avatarLyude Paul <lyude@redhat.com>
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20181106213017.14563-6-lyude@redhat.com
      9a64c650
    • Lyude Paul's avatar
      drm/i915: Clarify flow for disabling IRQs on storms · 0759af9e
      Lyude Paul authored
      This is rather confusing to look at as-is:
      dev_priv->display.hpd_irq_setup(dev_priv); in intel_hpd_irq_handler()
      handles disabling the actual HPD IRQ, while
      intel_hpd_irq_storm_disable() handles moving the HPD pin state over from
      MARK_DISABLED to DISABLED along with enabling polling for it.
      
      Changes since v3:
      - Rename i915_hpd_irq_storm_disable() to
        i915_hpd_irq_storm_switch_to_polling() - Rodrigo Vivi
      Signed-off-by: default avatarLyude Paul <lyude@redhat.com>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20181106213017.14563-5-lyude@redhat.com
      0759af9e
    • Lyude Paul's avatar
      drm/i915: Fix threshold check in intel_hpd_irq_storm_detect() · a4af7889
      Lyude Paul authored
      Currently in intel_hpd_irq_storm_detect() when we detect that the last
      recorded hotplug wasn't within the period defined by
      HPD_STORM_DETECT_DELAY, we make the mistake of resetting the HPD count
      to 0 without incrementing it. This results in us only enabling storm
      detection when we go +2 above the threshold, e.g. an HPD threshold of 5
      would not trigger a storm until we reach a total of 7 hotplugs.
      
      So: rework the code a bit so we reset the HPD count when
      HPD_STORM_DETECT_DELAY has passed, then increment the count afterwards.
      Also, clean things up a bit to make it easier to undertand.
      Signed-off-by: default avatarLyude Paul <lyude@redhat.com>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20181106213017.14563-4-lyude@redhat.com
      a4af7889