]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
drm/msm/adreno: fix runtime PM imbalance at gpu load
authorJohan Hovold <johan+linaro@kernel.org>
Fri, 3 Mar 2023 16:48:05 +0000 (17:48 +0100)
committerStefan Bader <stefan.bader@canonical.com>
Wed, 9 Aug 2023 09:37:46 +0000 (11:37 +0200)
commitd0c086575430eddc0811a0c47d8cb2db869c6ce3
tree0d1e402a58f32ace3ec638c018f4065e75ecfe61
parent5e8fea095355ed7168118a0176ec1e99e3a89ae1
drm/msm/adreno: fix runtime PM imbalance at gpu load

BugLink: https://bugs.launchpad.net/bugs/2028580
commit 0d997f95b70f98987ae031a89677c13e0e223670 upstream.

A recent commit moved enabling of runtime PM to GPU load time (first
open()) but failed to update the error paths so that runtime PM is
disabled if initialisation of the GPU fails. This would trigger a
warning about the unbalanced disable count on the next open() attempt.

Note that pm_runtime_put_noidle() is sufficient to balance the usage
count when pm_runtime_put_sync() fails (and is chosen over
pm_runtime_resume_and_get() for consistency reasons).

Fixes: 4b18299b3365 ("drm/msm/adreno: Defer enabling runpm until hw_init()")
Cc: stable@vger.kernel.org # 6.0
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Patchwork: https://patchwork.freedesktop.org/patch/524971/
Link: https://lore.kernel.org/r/20230303164807.13124-3-johan+linaro@kernel.org
Signed-off-by: Rob Clark <robdclark@chromium.org>
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/msm/adreno/adreno_device.c