1. 19 Jul, 2016 3 commits
    • Lyude's avatar
      drm/i915/vlv: Disable HPD in valleyview_crt_detect_hotplug() · 21842ea8
      Lyude authored
      One of the things preventing us from using polling is the fact that
      calling valleyview_crt_detect_hotplug() when there's a VGA cable
      connected results in sending another hotplug. With polling enabled when
      HPD is disabled, this results in a scenario like this:
      
      - We enable power wells and reset the ADPA
      - output_poll_exec does force probe on VGA, triggering a hpd
      - HPD handler waits for poll to unlock dev->mode_config.mutex
      - output_poll_exec shuts off the ADPA, unlocks dev->mode_config.mutex
      - HPD handler runs, resets ADPA and brings us back to the start
      
      This results in an endless irq storm getting sent from the ADPA
      whenever a VGA connector gets detected in the middle of polling.
      
      Somewhat based off of the "drm/i915: Disable CRT HPD around force
      trigger" patch Ville Syrjälä sent a while back
      
      Cc: stable@vger.kernel.org
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Signed-off-by: default avatarLyude <cpaul@redhat.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      (cherry picked from commit b236d7c8)
      21842ea8
    • Lyude's avatar
      drm/i915/vlv: Reset the ADPA in vlv_display_power_well_init() · 4c732e6e
      Lyude authored
      While VGA hotplugging worked(ish) before, it looks like that was mainly
      because we'd unintentionally enable it in
      valleyview_crt_detect_hotplug() when we did a force trigger. This
      doesn't work reliably enough because whenever the display powerwell on
      vlv gets disabled, the values set in VLV_ADPA get cleared and
      consequently VGA hotplugging gets disabled. This causes bugs such as one
      we found on an Intel NUC, where doing the following sequence of
      hotplugs:
      
            - Disconnect all monitors
            - Connect VGA
            - Disconnect VGA
            - Connect HDMI
      
      Would result in VGA hotplugging becoming disabled, due to the powerwells
      getting toggled in the process of connecting HDMI.
      
      Changes since v3:
       - Expose intel_crt_reset() through intel_drv.h and call that in
         vlv_display_power_well_init() instead of
         encoder->base.funcs->reset(&encoder->base);
      
      Changes since v2:
       - Use intel_encoder structs instead of drm_encoder structs
      
      Changes since v1:
       - Instead of handling the register writes ourself, we just reuse
         intel_crt_detect()
       - Instead of resetting the ADPA during display IRQ installation, we now
         reset them in vlv_display_power_well_init()
      
      Cc: stable@vger.kernel.org
      Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: default avatarLyude <cpaul@redhat.com>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      [danvet: Rebase over dev_priv/drm_device embedding.]
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      (cherry picked from commit 9504a892)
      4c732e6e
    • Lyude's avatar
      drm/i915/vlv: Make intel_crt_reset() per-encoder · 4570d833
      Lyude authored
      This lets call intel_crt_reset() in contexts where IRQs are disabled and
      as such, can't hold the locks required to work with the connectors.
      
      Cc: stable@vger.kernel.org
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Signed-off-by: default avatarLyude <cpaul@redhat.com>
      Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      (cherry picked from commit 28cf71ce)
      4570d833
  2. 14 Jul, 2016 2 commits
  3. 11 Jul, 2016 1 commit
  4. 10 Jul, 2016 2 commits
  5. 08 Jul, 2016 1 commit
  6. 07 Jul, 2016 13 commits
  7. 06 Jul, 2016 4 commits
  8. 05 Jul, 2016 8 commits
  9. 04 Jul, 2016 6 commits