drm/amdkfd: EOP Removal - Handle size 0 correctly
authorDavid Belanger <david.belanger@amd.com>
Wed, 16 Feb 2022 17:07:28 +0000 (12:07 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 9 Jun 2023 13:45:14 +0000 (09:45 -0400)
commit1526ec9a3ed90e7ad36de7ef8aa2768b60af14df
tree98e36a39b444ee4268be8354091b9b3fca4b5822
parent07bc768afb0a1c638f4eb054aaed9eaa291132de
drm/amdkfd: EOP Removal - Handle size 0 correctly

On GC 9.4.3, we are removing the EOP buffer.
If we specify 0 for the size, CP_HQD_EOP_CONTROL ends up with
incorrect value as order_size_2 calculations does not handle 0.

Fix it by using zero for the MQD entry for EOP size 0.

v2: Reworked code with a conditional assignment and fixed style issues.

Signed-off-by: David Belanger <david.belanger@amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_mqd_manager_v9.c