From: Alex Deucher Date: Tue, 17 Sep 2019 20:17:41 +0000 (-0500) Subject: drm/amdgpu/psp: invalidate the hdp read cache before reading the psp response X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=01b40c98ede4f536a8e30ba30c9510ad7a0fe7ca;p=openwrt%2Fstaging%2Fblogic.git drm/amdgpu/psp: invalidate the hdp read cache before reading the psp response Otherwise we may get stale data. Reviewed-by: Feifei Xu Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c index 17af26ee5a7f..af726bc6980d 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c @@ -151,10 +151,12 @@ psp_cmd_submit_buf(struct psp_context *psp, return ret; } + amdgpu_asic_invalidate_hdp(psp->adev, NULL); while (*((unsigned int *)psp->fence_buf) != index) { if (--timeout == 0) break; msleep(1); + amdgpu_asic_invalidate_hdp(psp->adev, NULL); } /* In some cases, psp response status is not 0 even there is no