]> git.baikalelectronics.ru Git - kernel.git/commit
drm/amd/amdgpu: Fix incorrect logic to increment VCN doorbell index
authorBokun Zhang <Bokun.Zhang@amd.com>
Mon, 9 Nov 2020 18:59:27 +0000 (13:59 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 10 Nov 2020 19:26:24 +0000 (14:26 -0500)
commit2d251f17a85e259a430a9c0ddef0734e55109f76
tree9ffbfb9384bb38e77e9b770472b00c37d7891f2c
parenteb5ca59a214726bbf01c68d5be091c4caa82bff6
drm/amd/amdgpu: Fix incorrect logic to increment VCN doorbell index

- The original logic uses a counter based index assignment,
  which is incorrect if we only assign VCN1 to this VF but no VCN0

  The doorbell index is absolute, so we can calculate it by
  using index variable i and j

Signed-off-by: Bokun Zhang <Bokun.Zhang@amd.com>
Reviewed-by: Monk Liu <monk.liu@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/vcn_v3_0.c