drm/msm: Trigger fence completion from GPU
authorBjorn Andersson <bjorn.andersson@linaro.org>
Wed, 14 Feb 2018 06:46:58 +0000 (22:46 -0800)
committerRob Clark <robdclark@gmail.com>
Mon, 19 Mar 2018 10:33:36 +0000 (06:33 -0400)
commit79d57bf6fa3bcc0ec5fc3b8140c4df1d696f593b
treec20212435e790f667767102715aed3eeaeb8bee3
parentd71b6bd80d96f15f4ae393d3bec0636c960e289a
drm/msm: Trigger fence completion from GPU

Interrupt commands causes the CP to trigger an interrupt as the command
is processed, regardless of the GPU being done processing previous
commands. This is seen by the interrupt being delivered before the
fence is written on 8974 and is likely the cause of the additional
CP_WAIT_FOR_IDLE workaround found for a306, which would cause the CP to
wait for the GPU to go idle before triggering the interrupt.

Instead we can set the (undocumented) BIT(31) of the CACHE_FLUSH_TS
which will cause a special CACHE_FLUSH_TS interrupt to be triggered from
the GPU as the write event is processed.

Add CACHE_FLUSH_TS to the IRQ masks of A3xx and A4xx and remove the
workaround for A306.

Suggested-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
drivers/gpu/drm/msm/adreno/a3xx_gpu.c
drivers/gpu/drm/msm/adreno/a4xx_gpu.c
drivers/gpu/drm/msm/adreno/adreno_gpu.c