]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
drm/msm: Be more robust when HFI response times out
authorConnor Abbott <cwabbott0@gmail.com>
Thu, 24 Apr 2025 13:30:17 +0000 (09:30 -0400)
committerRob Clark <robdclark@chromium.org>
Sun, 4 May 2025 16:20:28 +0000 (09:20 -0700)
commitc0134808a9d6c364b7568546be9489ce3337c7f8
treedf04cf288ecc004e27405ada8d28890569c91629
parentb71717735be48d7743a34897e9e44a0b53e30c0e
drm/msm: Be more robust when HFI response times out

If the GMU takes too long to respond to an HFI message, we may return
early. If the GMU does eventually respond, and then we send a second
message, we will see the response for the first, throw another error,
and keep going. But we don't currently wait for the interrupt from the
GMU again, so if the second response isn't there immediately we may
prematurely return. This can cause a continuous cycle of missed HFI
messages, and for reasons I don't quite understand the GMU does not shut
down properly when this happens.

Fix this by waiting for the GMU interrupt when we see an empty queue. If
the GMU never responds then the queue really is empty and we quit. We
can't wait for the interrupt when we see a wrong response seqnum because
the GMU might have already queued both responses by the time we clear
the interrupt the first time so we do need to check the queue before
waiting on the interrupt again.

Signed-off-by: Connor Abbott <cwabbott0@gmail.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/650013/
Signed-off-by: Rob Clark <robdclark@chromium.org>
drivers/gpu/drm/msm/adreno/a6xx_hfi.c