]> git.baikalelectronics.ru Git - kernel.git/commit
drm/msm/a6xx: Clear shadow on suspend
authorRob Clark <robdclark@chromium.org>
Tue, 10 Nov 2020 18:23:06 +0000 (10:23 -0800)
committerRob Clark <robdclark@chromium.org>
Tue, 10 Nov 2020 19:05:23 +0000 (11:05 -0800)
commit93c49a534f25d5808c27c6ce58de3301cadd7718
treea4064b74ce1c33fc5d7036a4f0c55e6905817830
parent8fc6eaba9082ef98115a4bba1e4d7f8e74959d8c
drm/msm/a6xx: Clear shadow on suspend

Clear the shadow rptr on suspend.  Otherwise, when we resume, we can
have a stale value until CP_WHERE_AM_I executes.  If we suspend near
the ringbuffer wraparound point, this can lead to a chicken/egg
situation where we are waiting for ringbuffer space to write the
CP_WHERE_AM_I (or CP_INIT) packet, because we mistakenly believe that
the ringbuffer is full (due to stale rptr value in the shadow).

Fixes errors like:

  [drm:adreno_wait_ring [msm]] *ERROR* timeout waiting for space in ringbuffer 0

in the resume path.

Fixes: 9a71f9a16663 ("drm/msm: a6xx: Use WHERE_AM_I for eligible targets")
Signed-off-by: Rob Clark <robdclark@chromium.org>
drivers/gpu/drm/msm/adreno/a6xx_gpu.c