drm/amdgpu: fix the issue that retry constantly once the buffer is oversize
authorHuang Rui <ray.huang@amd.com>
Sat, 30 Jan 2021 09:14:30 +0000 (17:14 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 2 Feb 2021 22:32:06 +0000 (17:32 -0500)
commit89fa15ecdca7eb46a711476b961f70a74765bbe4
tree5d222b7b65fd69b633edafa5e565d22e133103d1
parente0ecafede87eb1a3d1e708f0365fad0d59489285
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")
Signed-off-by: Huang Rui <ray.huang@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c