A recent commit moved enabling of runtime PM from adreno_gpu_init() to
adreno_load_gpu() (called on first open()), which means that unbind()
may now be called with runtime PM disabled in case the device was never
opened in between.
Make sure to only forcibly suspend and disable runtime PM at unbind() in
case runtime PM has been enabled to prevent a disable count imbalance.
This specifically avoids leaving runtime PM disabled when the device
is later opened after a successful bind:
msm_dpu ae01000.display-controller: [drm:adreno_load_gpu [msm]] *ERROR* Couldn't power up the GPU: -13
Fixes: 4b18299b3365 ("drm/msm/adreno: Defer enabling runpm until hw_init()")
Reported-by: Bjorn Andersson <quic_bjorande(a)quicinc.com>
Link: https://lore.kernel.org/lkml/20230203181245.3523937-1-quic_bjorande@quicinc…
Cc: stable(a)vger.kernel.org # 6.0
Signed-off-by: Johan Hovold <johan+linaro(a)kernel.org>
---
drivers/gpu/drm/msm/adreno/adreno_device.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/msm/adreno/adreno_device.c b/drivers/gpu/drm/msm/adreno/adreno_device.c
index 36f062c7582f..c5c4c93b3689 100644
--- a/drivers/gpu/drm/msm/adreno/adreno_device.c
+++ b/drivers/gpu/drm/msm/adreno/adreno_device.c
@@ -558,7 +558,8 @@ static void adreno_unbind(struct device *dev, struct device *master,
struct msm_drm_private *priv = dev_get_drvdata(master);
struct msm_gpu *gpu = dev_to_gpu(dev);
- WARN_ON_ONCE(adreno_system_suspend(dev));
+ if (pm_runtime_enabled(dev))
+ WARN_ON_ONCE(adreno_system_suspend(dev));
gpu->funcs->destroy(gpu);
priv->gpu_pdev = NULL;
--
2.39.2
On Wed, 1 Mar 2023 at 22:31, Daniel Díaz <daniel.diaz(a)linaro.org> wrote:
> Hello!
>
> Would the stable maintainers please consider backporting the following
> commit to the 5.15, 6.1, and 6.2 stable branches? It's been
> build-tested and verified it fixes the problem described therein.
>
> commit d78c8e32890ef7eca79ffd67c96022c7f9d8cce4
> Author: Anders Roxell <anders.roxell(a)linaro.org>
> Date: Wed Aug 10 13:43:18 2022 +0200
>
> powerpc/mm: Rearrange if-else block to avoid clang warning
>
> Clang (13, 14, 15, 16, nightly) warns as follows:
> -----8<----------8<----------8<-----
> arch/powerpc/mm/book3s64/radix_tlb.c:1191:23: error: variable 'hstart'
> is uninitialized when used here
> __tlbiel_va_range(hstart, hend, pid,
> ^~~~~~
> arch/powerpc/mm/book3s64/radix_tlb.c:1191:31: error: variable 'hend'
> is uninitialized when used here
> __tlbiel_va_range(hstart, hend, pid,
> ^~~~
> ----->8---------->8---------->8-----
>
> Those warnings make the builds fail.
>
> The same patch applies to 5.10 with fuzz 2 (offset -243 lines).
> Attached is that updated patch.
>
> The code for 5.4 (and below) is different, so this patch would not apply there.
>
> Thanks and greetings!
>
> Daniel Díaz
> daniel.diaz(a)linaro.org
+ stable mailing list
--
ddiaz
[Public]
Hi,
There was a regression in 6.2-rc1 that caused amdgpu to not be able to load when IOMMU domain isn't set up properly
It was fixed by these four patches in 6.3.
080920e52148 ("iommu/amd: Fix error handling for pdev_pri_ats_enable()")
f451c7a5a3b8 ("iommu/amd: Skip attach device domain is same as new domain")
996d120b4de2 ("iommu/amd: Improve page fault error reporting")
2cc73c5712f9 ("iommu: Attach device group to old domain in error path")
Can you please bring them to 6.2.y?
Link: https://bugzilla.kernel.org/show_bug.cgi?id=216865
Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2319
Link: https://bugzilla.redhat.com/show_bug.cgi?id=2156691
Thanks,