]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
drm/bridge: analogix_dp: Support PSR-exit to disable transition
authorBrian Norris <briannorris@chromium.org>
Mon, 28 Feb 2022 20:25:31 +0000 (12:25 -0800)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 26 Aug 2022 08:53:14 +0000 (10:53 +0200)
commit88f27d9e4fc09f14ac9f3bf2650ff0a86bae6578
treeeae01d5ee6bf1eecb13c464dc204613c2da0b91b
parent99b5749eb8e0cb95ccc7b5792ccce7c0abcbead3
drm/bridge: analogix_dp: Support PSR-exit to disable transition

BugLink: https://bugs.launchpad.net/bugs/1982968
commit ca871659ec1606d33b1e76de8d4cf924cf627e34 upstream.

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 846c7dfc1193 ("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: 6c836d965bad ("drm/rockchip: Use the helpers for PSR")
Signed-off-by: Brian Norris <briannorris@chromium.org>
Reviewed-by: Sean Paul <seanpaul@chromium.org>
Signed-off-by: Douglas Anderson <dianders@chromium.org>
Link: https://patchwork.freedesktop.org/patch/msgid/20220228122522.v2.1.I161904be17ba14526f78536ccd78b85818449b51@changeid
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/gpu/drm/bridge/analogix/analogix_dp_core.c