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 15:47:47 +0000 (10:47 -0500)
commitc5f85696cb2f2777fdf152464314a19dd35a99d7
treecea00ee9e9e7b6488ead51103ab1e129301af91f
parent4954a76add7030e1c80209d310eef225edda100e
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>
drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c