drm/msm/a6xx: Poll for GBIF unhalt status in hw_init
authorKonrad Dybcio <konrad.dybcio@linaro.org>
Mon, 25 Sep 2023 14:50:39 +0000 (16:50 +0200)
committerRob Clark <robdclark@chromium.org>
Mon, 9 Oct 2023 18:22:05 +0000 (11:22 -0700)
commitb77532803d11f2b03efab2ebfd8c0061cd7f8b30
tree377bf449adfaba6817c71d1c52efa678a7940134
parent1f8c29e800661d522e3a6487c5435de28e44fd29
drm/msm/a6xx: Poll for GBIF unhalt status in hw_init

Some GPUs - particularly A7xx ones - are really really stubborn and
sometimes take a longer-than-expected time to finish unhalting GBIF.

Note that this is not caused by the request a few lines above.

Poll for the unhalt ack to make sure we're not trying to write bits to
an essentially dead GPU that can't receive data on its end of the bus.
Failing to do this will result in inexplicable GMU timeouts or worse.

This is a rather ugly hack which introduces a whole lot of latency.

Tested-by: Neil Armstrong <neil.armstrong@linaro.org> # on SM8550-QRD
Tested-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org> # sm8450
Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/559292/
Signed-off-by: Rob Clark <robdclark@chromium.org>
drivers/gpu/drm/msm/adreno/a6xx_gpu.c