summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
diff options
context:
space:
mode:
authorXiaojian Du <Xiaojian.Du@amd.com>2022-01-17 12:44:51 +0800
committerAlex Deucher <alexander.deucher@amd.com>2022-01-19 22:31:51 -0500
commit479e3b02b73a2de2b19df2950863149c59d57bfe (patch)
tree1d68ff5235ec85b6c932aca38c6b5a9b6b8fb5e8 /drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
parenta5e7ffa11974d90d36f818ee34fc170722ec3098 (diff)
drm/amdgpu: add vram check function for GMC
This patch will add vram check function for GMC block. It will write pattern data to the vram and then read back from the vram, so that to verify the work status of vram. This patch will cover gmc v6/7/8/9/10. Signed-off-by: Xiaojian Du <Xiaojian.Du@amd.com> Reviewed-by: Huang Rui <ray.huang@amd.com> Acked-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
index ab8adbff9e2d..8800a18b0cf6 100644
--- a/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
+++ b/drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c
@@ -1111,7 +1111,10 @@ static int gmc_v7_0_hw_init(void *handle)
if (r)
return r;
- return r;
+ if (amdgpu_emu_mode == 1)
+ return amdgpu_gmc_vram_checking(adev);
+ else
+ return r;
}
static int gmc_v7_0_hw_fini(void *handle)