drm/msm: Don't overwrite hw fence in hw_init
authorRob Clark <robdclark@chromium.org>
Sat, 18 Jun 2022 16:11:19 +0000 (09:11 -0700)
committerRob Clark <robdclark@chromium.org>
Sat, 18 Jun 2022 16:13:33 +0000 (09:13 -0700)
commitc8af219d18502c52319df8d4e3dcfe29a3ca31ab
treee52b401b786a0aa0595f978be77603a5d9cf6723
parent3c7a52217a8c1e674a9e15b71a7239d71a4d9cfd
drm/msm: Don't overwrite hw fence in hw_init

Prior to the last commit, this could result in setting the GPU
written fence value back to an older value, if we had missed
updating completed_fence prior to suspend.  This was mostly
harmless as the GPU would eventually overwrite it again with
the correct value.  But we should just not do this.  Instead
just leave a sanity check that the fence looks plausible (in
case the GPU scribbled on memory).

Reported-by: Steev Klimaszewski <steev@kali.org>
Fixes: 95d1deb02a9c ("drm/msm/gem: Add fenced vma unpin")
Signed-off-by: Rob Clark <robdclark@chromium.org>
Tested-by: Steev Klimaszewski <steev@kali.org>
Patchwork: https://patchwork.freedesktop.org/patch/490138/
Link: https://lore.kernel.org/r/20220618161120.3451993-2-robdclark@gmail.com
drivers/gpu/drm/msm/adreno/adreno_gpu.c
drivers/gpu/drm/msm/msm_gpu.c