]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amdgpu: fix user fence write race condition
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Fri, 29 Jun 2018 11:23:25 +0000 (13:23 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 5 Jul 2018 21:39:57 +0000 (16:39 -0500)
commitf79af1da60dbe78652c730994dc00946752cd83c
treefb3b276b6668f04e491a6f3faf196555bf843f12
parent9330d1add6357174fc0c7543fa2f0d0c0d20fbcb
drm/amdgpu: fix user fence write race condition

The buffer object backing the user fence is reserved using the non-user
fence, i.e., as soon as the non-user fence is signaled, the user fence
buffer object can be moved or even destroyed.

Therefore, emit the user fence first.

Both fences have the same cache invalidation behavior, so this should
have no user-visible effect.

Signed-off-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_ib.c