drm/amdgpu: Fix always_valid bos multiple LRU insertions.
authorBas Nieuwenhuizen <basni@chromium.org>
Wed, 31 Jan 2018 12:58:55 +0000 (13:58 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 24 Apr 2018 07:36:35 +0000 (09:36 +0200)
commitc73d9e350085a479d787d6d6dff3599fa6952491
treea653e8be4c57f9f47e916ecf51175d1e6fe6fee2
parent674b6963cec22d45d0ff9565554bf5ee2628630e
drm/amdgpu: Fix always_valid bos multiple LRU insertions.

commit a20ee0b1f8b42e2568f3a4408003d22b2dfcc706 upstream.

If these bos are evicted and are in the validated list
things blow up, so do not put them in there. Notably,
that tries to add the bo to the LRU twice, which results
in a BUG_ON in ttm_bo.c.

While for the bo_list an alternative would be to not allow
always valid bos in there, that does not work for the user
fence.

v2: Fixed whitespace issue pointed out by checkpatch.pl

Signed-off-by: Bas Nieuwenhuizen <basni@chromium.org>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Cc: stable@vger.kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c