From: Huang Rui Date: Sat, 30 Jan 2021 09:14:30 +0000 (+0800) Subject: drm/amdgpu: fix the issue that retry constantly once the buffer is oversize X-Git-Tag: baikal/aarch64/sdk6.1~7342^2~1^2~12 X-Git-Url: https://git.baikalelectronics.ru/sdk/?a=commitdiff_plain;h=428a188442c5fb415a2b4d7223e12717c3c8c42d;p=kernel.git 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: 8d69a39a9c3e ("drm/amdgpu: Initialise drm_gem_object_funcs for imported BOs") Signed-off-by: Huang Rui Reviewed-by: Alex Deucher Reviewed-by: Christian König Signed-off-by: Alex Deucher Cc: stable@vger.kernel.org --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c index d0a1fee1f5f6f..174a73eb23f08 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c @@ -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);