drm/amdgpu: use the last IB as gang leader v2
authorChristian König <christian.koenig@amd.com>
Wed, 9 Nov 2022 18:54:09 +0000 (19:54 +0100)
committerChristian König <christian.koenig@amd.com>
Tue, 15 Nov 2022 14:27:18 +0000 (15:27 +0100)
commiteca13f3c67b6ddfcc61fdb9bb1c5f9a7724e2359
treedcfd3850f7f67cc078b0ae1b829bfa6f61d5b9c4
parente17a025a47c66ca8499ae88d8046c4f0d7c9c057
drm/amdgpu: use the last IB as gang leader v2

It turned out that not the last IB specified is the gang leader,
but instead the last job allocated.

This is a bit unfortunate and not very intuitive for the CS
interface, so try to fix this.

Signed-off-by: Christian König <christian.koenig@amd.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221115094206.6181-1-christian.koenig@amd.com
Tested-by: Timur Kristóf <timur.kristof@gmail.com>
Acked-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Fixes: 4624459c84d7 ("drm/amdgpu: add gang submit frontend v6")
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.h