1. 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
  2. 25 May, 2022 1 commit
  3. 21 May, 2022 1 commit
  4. 17 May, 2022 2 commits
  5. 13 May, 2022 1 commit
  6. 12 May, 2022 1 commit
    • Hui Tang's avatar
      drm/vc4: hdmi: Fix build error for implicit function declaration · 6fed53de
      Hui Tang authored
      drivers/gpu/drm/vc4/vc4_hdmi.c: In function ‘vc4_hdmi_connector_detect’:
      drivers/gpu/drm/vc4/vc4_hdmi.c:228:7: error: implicit declaration of function ‘gpiod_get_value_cansleep’; did you mean ‘gpio_get_value_cansleep’? [-Werror=implicit-function-declaration]
         if (gpiod_get_value_cansleep(vc4_hdmi->hpd_gpio))
             ^~~~~~~~~~~~~~~~~~~~~~~~
             gpio_get_value_cansleep
        CC [M]  drivers/gpu/drm/vc4/vc4_validate.o
        CC [M]  drivers/gpu/drm/vc4/vc4_v3d.o
        CC [M]  drivers/gpu/drm/vc4/vc4_validate_shaders.o
        CC [M]  drivers/gpu/drm/vc4/vc4_debugfs.o
      drivers/gpu/drm/vc4/vc4_hdmi.c: In function ‘vc4_hdmi_bind’:
      drivers/gpu/drm/vc4/vc4_hdmi.c:2883:23: error: implicit declaration of function ‘devm_gpiod_get_optional’; did you mean ‘devm_clk_get_optional’? [-Werror=implicit-function-declaration]
        vc4_hdmi->hpd_gpio = devm_gpiod_get_optional(dev, "hpd", GPIOD_IN);
                             ^~~~~~~~~~~~~~~~~~~~~~~
                             devm_clk_get_optional
      drivers/gpu/drm/vc4/vc4_hdmi.c:2883:59: error: ‘GPIOD_IN’ undeclared (first use in this function); did you mean ‘GPIOF_IN’?
        vc4_hdmi->hpd_gpio = devm_gpiod_get_optional(dev, "hpd", GPIOD_IN);
                                                                 ^~~~~~~~
                                                                 GPIOF_IN
      drivers/gpu/drm/vc4/vc4_hdmi.c:2883:59: note: each undeclared identifier is reported only once for each function it appears in
      cc1: all warnings being treated as errors
      
      Fixes: 6800234c ("drm/vc4: hdmi: Convert to gpiod")
      Signed-off-by: default avatarHui Tang <tanghui20@huawei.com>
      Signed-off-by: default avatarMaxime Ripard <maxime@cerno.tech>
      Link: https://patchwork.freedesktop.org/patch/msgid/20220510135148.247719-1-tanghui20@huawei.com
      6fed53de
  7. 11 May, 2022 1 commit
  8. 10 May, 2022 1 commit
  9. 08 May, 2022 24 commits
  10. 07 May, 2022 4 commits
  11. 06 May, 2022 2 commits