1. 11 Feb, 2019 7 commits
  2. 09 Feb, 2019 1 commit
  3. 08 Feb, 2019 14 commits
  4. 07 Feb, 2019 13 commits
  5. 06 Feb, 2019 5 commits
    • Lyude Paul's avatar
      drm/i915: Don't send hotplug in intel_dp_check_mst_status() · 6cbb55c0
      Lyude Paul authored
      This hotplug also isn't needed: drm_dp_mst_topology_mgr_set_mst()
      already sends a hotplug on its own from drm_dp_destroy_connector_work()
      after destroying connectors in the MST topology.
      Signed-off-by: default avatarLyude Paul <lyude@redhat.com>
      Cc: Imre Deak <imre.deak@intel.com>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190129191001.442-4-lyude@redhat.com
      6cbb55c0
    • Lyude Paul's avatar
      drm/i915: Don't send MST hotplugs during resume · 6be1cf96
      Lyude Paul authored
      We have a bad habit of calling drm_fb_helper_hotplug_event() far more
      then we actually need to. MST appears to be one of these cases, where we
      call drm_fb_helper_hotplug_event() if we fail to resume a connected MST
      topology in intel_dp_mst_resume(). We don't actually need to do this at
      all though since hotplug events are already sent from
      drm_dp_connector_destroy_work() every time connectors are unregistered
      from userspace's PoV. Additionally, extra calls to
      drm_fb_helper_hotplug_event() also just mean more of a chance of doing a
      connector probe somewhere we shouldn't.
      
      So, don't send any hotplug events during resume if the MST topology
      fails to come up. Just rely on the DP MST helpers to send them for us.
      Signed-off-by: default avatarLyude Paul <lyude@redhat.com>
      Cc: Imre Deak <imre.deak@intel.com>
      Cc: Daniel Vetter <daniel@ffwll.ch>
      Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190129191001.442-3-lyude@redhat.com
      6be1cf96
    • Lyude Paul's avatar
      drm/i915: Block fbdev HPD processing during suspend · fe5ec656
      Lyude Paul authored
      When resuming, we check whether or not any previously connected
      MST topologies are still present and if so, attempt to resume them. If
      this fails, we disable said MST topologies and fire off a hotplug event
      so that userspace knows to reprobe.
      
      However, sending a hotplug event involves calling
      drm_fb_helper_hotplug_event(), which in turn results in fbcon doing a
      connector reprobe in the caller's thread - something we can't do at the
      point in which i915 calls drm_dp_mst_topology_mgr_resume() since
      hotplugging hasn't been fully initialized yet.
      
      This currently causes some rather subtle but fatal issues. For example,
      on my T480s the laptop dock connected to it usually disappears during a
      suspend cycle, and comes back up a short while after the system has been
      resumed. This guarantees pretty much every suspend and resume cycle,
      drm_dp_mst_topology_mgr_set_mst(mgr, false); will be caused and in turn,
      a connector hotplug will occur. Now it's Rute Goldberg time: when the
      connector hotplug occurs, i915 reprobes /all/ of the connectors,
      including eDP. However, eDP probing requires that we power on the panel
      VDD which in turn, grabs a wakeref to the appropriate power domain on
      the GPU (on my T480s, this is the PORT_DDI_A_IO domain). This is where
      things start breaking, since this all happens before
      intel_power_domains_enable() is called we end up leaking the wakeref
      that was acquired and never releasing it later. Come next suspend/resume
      cycle, this causes us to fail to shut down the GPU properly, which
      causes it not to resume properly and die a horrible complicated death.
      
      (as a note: this only happens when there's both an eDP panel and MST
      topology connected which is removed mid-suspend. One or the other seems
      to always be OK).
      
      We could try to fix the VDD wakeref leak, but this doesn't seem like
      it's worth it at all since we aren't able to handle hotplug detection
      while resuming anyway. So, let's go with a more robust solution inspired
      by nouveau: block fbdev from handling hotplug events until we resume
      fbdev. This allows us to still send sysfs hotplug events to be handled
      later by user space while we're resuming, while also preventing us from
      actually processing any hotplug events we receive until it's safe.
      
      This fixes the wakeref leak observed on the T480s and as such, also
      fixes suspend/resume with MST topologies connected on this machine.
      
      Changes since v2:
      * Don't call drm_fb_helper_hotplug_event() under lock, do it after lock
        (Chris Wilson)
      * Don't call drm_fb_helper_hotplug_event() in
        intel_fbdev_output_poll_changed() under lock (Chris Wilson)
      * Always set ifbdev->hpd_waiting (Chris Wilson)
      Signed-off-by: default avatarLyude Paul <lyude@redhat.com>
      Fixes: 0e32b39c ("drm/i915: add DP 1.2 MST support (v0.7)")
      Cc: Todd Previte <tprevite@gmail.com>
      Cc: Dave Airlie <airlied@redhat.com>
      Cc: Jani Nikula <jani.nikula@linux.intel.com>
      Cc: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: Imre Deak <imre.deak@intel.com>
      Cc: intel-gfx@lists.freedesktop.org
      Cc: <stable@vger.kernel.org> # v3.17+
      Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190129191001.442-2-lyude@redhat.com
      fe5ec656
    • Ville Syrjälä's avatar
      drm/i915: Just use icl+ definition for PLANE_WM blocks field · d7e449a8
      Ville Syrjälä authored
      The unused bits on PLANE_WM & co. are hardwired to zero. So no
      need to worry about reading the extra bit on pre-icl.
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190205205056.30081-2-ville.syrjala@linux.intel.comReviewed-by: default avatarJosé Roberto de Souza <jose.souza@intel.com>
      d7e449a8
    • Ville Syrjälä's avatar
      drm/i915: Bump skl+ wm blocks to 11 bits · c7e716b8
      Ville Syrjälä authored
      On icl the plane watermark blocks field is 11 bits. Bump our define to
      match so that readout won't ignore the extra bit. We can safely do this
      for older platforms too since the unused bits are hardwired to zero.
      
      Cc: José Roberto de Souza <jose.souza@intel.com>
      Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20190205205056.30081-1-ville.syrjala@linux.intel.comReviewed-by: default avatarJosé Roberto de Souza <jose.souza@intel.com>
      c7e716b8