OSDN Git Service

drm/msm/a6xx: Add a helper for software-resetting the GPU
authorKonrad Dybcio <konrad.dybcio@linaro.org>
Thu, 15 Jun 2023 23:20:49 +0000 (01:20 +0200)
committerRob Clark <robdclark@chromium.org>
Sun, 18 Jun 2023 18:34:29 +0000 (11:34 -0700)
commit277b967829aad7b24327f246087805078a62076e
tree125b1a5d90fc3f07edd4a78ba34ab2c3d13220af
parent3773a57d9c55d77ad6615f7235b91fcac0e6c65e
drm/msm/a6xx: Add a helper for software-resetting the GPU

Introduce a6xx_gpu_sw_reset() in preparation for adding GMU wrapper
GPUs and reuse it in a6xx_gmu_force_off().

This helper, contrary to the original usage in GMU code paths, adds
a readback+delay sequence to ensure that the reset is never deasserted
too quickly due to e.g. OoO execution going crazy.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/542758/
Signed-off-by: Rob Clark <robdclark@chromium.org>
drivers/gpu/drm/msm/adreno/a6xx_gmu.c
drivers/gpu/drm/msm/adreno/a6xx_gpu.c
drivers/gpu/drm/msm/adreno/a6xx_gpu.h