Skip to contentSkip to conversation

drm/amdgpu: fix the issue that retry constantly once the buffer is oversize

PATCH In review Huang Rui 2 participants 2 messages Jan 30, 2021

Subsystems (2)
lore
Share & tools
lore

Huang Rui

author
#0 lore raw

PATCH 1/1 drm/amdgpu: fix the issue that retry constantly once the buffer is oversize

We cannot modify initial_domain every time while the retry starts. That will cause the busy waiting that unable to switch to GTT while the vram is not enough.

Fixes f8aab60422c3 ("drm/amdgpu: Initialise drm_gem_object_funcs for

imported BOs")

---
 drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +1 -1
index a5c42c3004a0..b443907afcea 100644
@@ -269,8 +269,8 @@ int amdgpu_gem_create_ioctl(struct drm_device *dev, void *data,
 		resv = vm->root.base.bo->tbo.base.resv;
 	}
 
-retry:
 	initial_domain = (u32)(0xffffffff & args->in.domains);
+retry:
 	r = amdgpu_gem_object_create(adev, size, args->in.alignment,
 				     initial_domain,
 				     flags, ttm_bo_type_device, resv, &gobj);
Signature · 6 lines
2.25.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Reviewed-by on v1 1/1
#1 lore raw

Am 30.01.21 um 10:14 schrieb Huang Rui:

Quoted 9 lines

We cannot modify initial_domain every time while the retry starts. That will cause the busy waiting that unable to switch to GTT while the vram is not enough.

Fixes f8aab60422c3 ("drm/amdgpu: Initialise drm_gem_object_funcs for

imported BOs")

^^ I need to run my memory pressure test more often.

Quoted 9 lines
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +0 -0
index a5c42c3004a0..b443907afcea 100644

drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c int amdgpu_gem_create_ioctl(struct drm_device *dev, void *data, · line 276

Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +1 -1
@@ -269,8 +269,8 @@ int amdgpu_gem_create_ioctl(struct drm_device *dev, void *data,
  		resv = vm->root.base.bo->tbo.base.resv;
  	}
 
-retry:
  	initial_domain = (u32)(0xffffffff & args->in.domains);
+retry:
  	r = amdgpu_gem_object_create(adev, size, args->in.alignment,
  				     initial_domain,
  				     flags, ttm_bo_type_device, resv, &gobj);

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx