1. 26 Jun, 2018 3 commits
    • Dhinakaran Pandiyan's avatar
      drm/i915/psr: Fix race in intel_psr_work() · c12e0643
      Dhinakaran Pandiyan authored
      Commit 5422b37c ("drm/i915/psr: Kill delays when activating psr
      back.") switched from delayed work to the plain variant and while doing so
      removed the check for work_busy() before scheduling a PSR activation.
      This appears to cause consecutive executions of psr_activate() in this
      scenario - after a worker picks up the PSR work item for execution and
      before the work function can acquire the PSR mutex, a psr_flush() can
      get hold of the mutex and schedule another PSR work. Without a psr_exit()
      between the two psr_activate() calls, warning messages get printed.
      Further, since we drop the mutex in the midst of psr_work() to wait for
      PSR to idle, another work item can also get scheduled. Fix this by
      returning if PSR was already active.
      
      Fixes: 5422b37c ("drm/i915/psr: Kill delays when activating psr back.")
      Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=106948
      Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
      Cc: Chris Wilson <chris@chris-wilson.co.uk>
      Cc: José Roberto de Souza <jose.souza@intel.com>
      Signed-off-by: default avatarDhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
      Reviewed-by: default avatarChris Wilson <chris@chris-wilson.co.uk>
      Reviewed-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180625054741.3919-1-dhinakaran.pandiyan@intel.com
      c12e0643
    • Rodrigo Vivi's avatar
      drm/i915/psr: Kill useless function pointers. · cf5d862d
      Rodrigo Vivi authored
      At some point we introduced the function pointers
      on PSR code to help with VLV/CHV separation logic
      because it had a different HW implementation from PSR.
      
      Since all converged to HSW PSR and we dropped the
      VLV/CHV support, let's also kill the useless function
      pointers and leave the code cleaner.
      
      Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
      Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
      Reviewed-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180626052536.15137-1-rodrigo.vivi@intel.com
      cf5d862d
    • Imre Deak's avatar
      drm/i915/ddi: Get AUX power domain for DP main link too · 52528055
      Imre Deak authored
      So far we got an AUX power domain reference only for the duration of DP
      AUX transfers. However, the following suggests that we also need these
      for main link functionality:
      - The specification doesn't state whether it's needed or not for main
        link functionality, but suggests that these power wells need to be
        enabled already during display core initialization (Sequences to
        Initialize Display).
      - For PSR we need to keep the AUX power well enabled.
      - On ICL combo PHY ports (non-TC) the AUX power well is needed for
        link training too: while the port is enabled with a DP link training
        test pattern trying to toggle the AUX power well will time out.
      - On ICL MG PHY ports (TC) the AUX power well is needed also for main
        link functionality (both in DP and HDMI modes).
      - Windows enables these power wells both for main and AUX lane
        functionality.
      
      Based on the above take an AUX power reference for main link
      functionality too. This makes a difference only on GEN10+ (GLK+)
      platforms, where we have separate port specific AUX power wells.
      
      For PSR we still need to distinguish between port A and the other
      ports, since on port A DC states must stay enabled for main link
      functionality, but DC states must be disabled for driver initiated
      AUX transfers. So re-use the corresponding helper from intel_psr.c.
      
      Since we take now a reference for main link functionality on all DP
      ports we can forgo taking the separate power ref for PSR functionality.
      
      v2:
      - Make sure DC states stay enabled when taking the ref on port A.
        (Ville)
      
      v3: (Ville)
      - Fix comment about logic for encoders without a crtc state and
        add FIXME note for a simplification to avoid calling get_power_domains
        in such cases.
      - Use intel_crtc_has_dp_encoder() instead !intel_crtc_has_type(HDMI).
      
      Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
      Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
      Cc: Paulo Zanoni <paulo.r.zanoni@intel.com>
      Signed-off-by: default avatarImre Deak <imre.deak@intel.com>
      [Clarified code comments in intel_ddi_main_link_aux_domain() and
       intel_ddi_get_power_domains() (Imre)]
      Reviewed-by: default avatarJosé Roberto de Souza <jose.souza@intel.com>
      Link: https://patchwork.freedesktop.org/patch/msgid/20180621184449.26634-1-imre.deak@intel.com
      52528055
  2. 25 Jun, 2018 3 commits
  3. 22 Jun, 2018 1 commit
  4. 21 Jun, 2018 6 commits
  5. 20 Jun, 2018 6 commits
  6. 19 Jun, 2018 8 commits
  7. 18 Jun, 2018 13 commits