diff options
author | Roger He <Hongbo.He@amd.com> | 2017-11-10 20:00:30 +0800 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-11-13 14:37:44 -0500 |
commit | 8e96e372bceceb76b92a81f8e28bc8163287d25c (patch) | |
tree | 679d45dadf3081ed76b710864c2b755ee5fec913 /drivers/gpu | |
parent | 0b968650cdb117396c3625e35010e569d82369b2 (diff) | |
download | linux-8e96e372bceceb76b92a81f8e28bc8163287d25c.tar.bz2 |
drm/amd/amdgpu: if visible VRAM allocation fail, fall back to invisible try again
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Roger He <Hongbo.He@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c index 4710e51099c2..951d625bbdd7 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c @@ -63,6 +63,11 @@ retry: flags, NULL, resv, 0, &bo); if (r) { if (r != -ERESTARTSYS) { + if (flags & AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED) { + flags &= ~AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED; + goto retry; + } + if (initial_domain == AMDGPU_GEM_DOMAIN_VRAM) { initial_domain |= AMDGPU_GEM_DOMAIN_GTT; goto retry; |