diff options
author | Roger He <Hongbo.He@amd.com> | 2017-11-10 07:00:30 -0500 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2017-11-13 14:37:44 -0500 |
commit | 8e96e372bceceb76b92a81f8e28bc8163287d25c (patch) | |
tree | 679d45dadf3081ed76b710864c2b755ee5fec913 /drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | |
parent | 0b968650cdb117396c3625e35010e569d82369b2 (diff) |
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/drm/amd/amdgpu/amdgpu_gem.c')
-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: | |||
63 | flags, NULL, resv, 0, &bo); | 63 | flags, NULL, resv, 0, &bo); |
64 | if (r) { | 64 | if (r) { |
65 | if (r != -ERESTARTSYS) { | 65 | if (r != -ERESTARTSYS) { |
66 | if (flags & AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED) { | ||
67 | flags &= ~AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED; | ||
68 | goto retry; | ||
69 | } | ||
70 | |||
66 | if (initial_domain == AMDGPU_GEM_DOMAIN_VRAM) { | 71 | if (initial_domain == AMDGPU_GEM_DOMAIN_VRAM) { |
67 | initial_domain |= AMDGPU_GEM_DOMAIN_GTT; | 72 | initial_domain |= AMDGPU_GEM_DOMAIN_GTT; |
68 | goto retry; | 73 | goto retry; |