diff options
author | Monk Liu <Monk.Liu@amd.com> | 2017-11-21 13:29:14 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-12-06 12:48:15 -0500 |
commit | ce1b1b66cd5ec60927c575858430c099b8b4bceb (patch) | |
tree | cf3882de00bc4a58d1ad1fc4f2b68653ddb6c981 /drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | |
parent | 1bfcbad18fc0c2618ae141ff2d8c384cf81bf98e (diff) | |
download | linux-ce1b1b66cd5ec60927c575858430c099b8b4bceb.tar.gz linux-ce1b1b66cd5ec60927c575858430c099b8b4bceb.tar.bz2 linux-ce1b1b66cd5ec60927c575858430c099b8b4bceb.zip |
drm/amdgpu:partially revert 1cfd8e237f0318e330190ac21d63c58ae6a1f66c
found RING0 test fail after S3 resume regression, which is
introduced by 1cfd8e237f0318e330190ac21d63c58ae6a1f66c
Because after suspend VRAM will be cleared, so driver must
unpin the GART table(resident in VRAM) during suspend so it
can be evicted to system ram and must correspondingly pin it
during resume so the GART table could be restored to VRAM.
Signed-off-by: Monk Liu <Monk.Liu@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c index 8529005a5022..c30e08d9f30b 100644 --- a/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c +++ b/drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c @@ -933,6 +933,9 @@ static int gmc_v9_0_gart_enable(struct amdgpu_device *adev) dev_err(adev->dev, "No VRAM object for PCIE GART.\n"); return -EINVAL; } + r = amdgpu_gart_table_vram_pin(adev); + if (r) + return r; switch (adev->asic_type) { case CHIP_RAVEN: @@ -1010,6 +1013,7 @@ static void gmc_v9_0_gart_disable(struct amdgpu_device *adev) { gfxhub_v1_0_gart_disable(adev); mmhub_v1_0_gart_disable(adev); + amdgpu_gart_table_vram_unpin(adev); } static int gmc_v9_0_hw_fini(void *handle) |