Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8e96e372 authored by Roger He's avatar Roger He Committed by Alex Deucher
Browse files

drm/amd/amdgpu: if visible VRAM allocation fail, fall back to invisible try again

parent 0b968650
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -63,6 +63,11 @@ int amdgpu_gem_object_create(struct amdgpu_device *adev, unsigned long size,
			     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;