summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu
diff options
context:
space:
mode:
authorAlex Deucher <alexander.deucher@amd.com>2019-09-17 15:17:41 -0500
committerAlex Deucher <alexander.deucher@amd.com>2019-10-03 09:10:59 -0500
commit01b40c98ede4f536a8e30ba30c9510ad7a0fe7ca (patch)
tree6a9b7c3be7a71b29edc748bcafd6f39f964c9113 /drivers/gpu/drm/amd/amdgpu
parente8186eeccb84eb41a87c9e6ffad2c9e61f3e3636 (diff)
downloadlinux-01b40c98ede4f536a8e30ba30c9510ad7a0fe7ca.tar.gz
linux-01b40c98ede4f536a8e30ba30c9510ad7a0fe7ca.tar.bz2
linux-01b40c98ede4f536a8e30ba30c9510ad7a0fe7ca.zip
drm/amdgpu/psp: invalidate the hdp read cache before reading the psp response
Otherwise we may get stale data. Reviewed-by: Feifei Xu <Feifei.Xu@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c2
1 files changed, 2 insertions, 0 deletions
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