1. 04 Jul, 2022 7 commits
  2. 01 Jul, 2022 1 commit
  3. 29 Jun, 2022 3 commits
  4. 27 Jun, 2022 1 commit
  5. 22 Jun, 2022 4 commits
  6. 19 Jun, 2022 1 commit
  7. 16 Jun, 2022 16 commits
  8. 14 Jun, 2022 1 commit
  9. 10 Jun, 2022 1 commit
  10. 09 Jun, 2022 2 commits
  11. 08 Jun, 2022 1 commit
  12. 06 Jun, 2022 2 commits
    • Brian Norris's avatar
      drm/atomic: Force bridge self-refresh-exit on CRTC switch · e54a4424
      Brian Norris authored
      It's possible to change which CRTC is in use for a given
      connector/encoder/bridge while we're in self-refresh without fully
      disabling the connector/encoder/bridge along the way. This can confuse
      the bridge encoder/bridge, because
      (a) it needs to track the SR state (trying to perform "active"
          operations while the panel is still in SR can be Bad(TM)); and
      (b) it tracks the SR state via the CRTC state (and after the switch, the
          previous SR state is lost).
      
      Thus, we need to either somehow carry the self-refresh state over to the
      new CRTC, or else force an encoder/bridge self-refresh transition during
      such a switch.
      
      I choose the latter, so we disable the encoder (and exit PSR) before
      attaching it to the new CRTC (where we can continue to assume a clean
      (non-self-refresh) state).
      
      This fixes PSR issues seen on Rockchip RK3399 systems with
      drivers/gpu/drm/bridge/analogix/analogix_dp_core.c.
      
      Change in v2:
      
      - Drop "->enable" condition; this could possibly be "->active" to
        reflect the intended hardware state, but it also is a little
        over-specific. We want to make a transition through "disabled" any
        time we're exiting PSR at the same time as a CRTC switch.
        (Thanks Liu Ying)
      
      Cc: Liu Ying <victor.liu@oss.nxp.com>
      Cc: <stable@vger.kernel.org>
      Fixes: 1452c25b ("drm: Add helpers to kick off self refresh mode in drivers")
      Signed-off-by: default avatarBrian Norris <briannorris@chromium.org>
      Reviewed-by: default avatarSean Paul <seanpaul@chromium.org>
      Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220228122522.v2.2.Ic15a2ef69c540aee8732703103e2cff51fb9c399@changeid
      e54a4424
    • Brian Norris's avatar
      drm/bridge: analogix_dp: Support PSR-exit to disable transition · ca871659
      Brian Norris authored
      Most eDP panel functions only work correctly when the panel is not in
      self-refresh. In particular, analogix_dp_bridge_disable() tends to hit
      AUX channel errors if the panel is in self-refresh.
      
      Given the above, it appears that so far, this driver assumes that we are
      never in self-refresh when it comes time to fully disable the bridge.
      Prior to commit 846c7dfc ("drm/atomic: Try to preserve the crtc
      enabled state in drm_atomic_remove_fb, v2."), this tended to be true,
      because we would automatically disable the pipe when framebuffers were
      removed, and so we'd typically disable the bridge shortly after the last
      display activity.
      
      However, that is not guaranteed: an idle (self-refresh) display pipe may
      be disabled, e.g., when switching CRTCs. We need to exit PSR first.
      
      Stable notes: this is definitely a bugfix, and the bug has likely
      existed in some form for quite a while. It may predate the "PSR helpers"
      refactor, but the code looked very different before that, and it's
      probably not worth rewriting the fix.
      
      Cc: <stable@vger.kernel.org>
      Fixes: 6c836d96 ("drm/rockchip: Use the helpers for PSR")
      Signed-off-by: default avatarBrian Norris <briannorris@chromium.org>
      Reviewed-by: default avatarSean Paul <seanpaul@chromium.org>
      Signed-off-by: default avatarDouglas Anderson <dianders@chromium.org>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220228122522.v2.1.I161904be17ba14526f78536ccd78b85818449b51@changeid
      ca871659