drm/amdkfd: Fix bug in config_dequeue_wait_counts
authorHarish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Fri, 14 Mar 2025 16:03:53 +0000 (12:03 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 19 Mar 2025 19:51:44 +0000 (15:51 -0400)
commitfed7efbb43628f51e16e1890be8c84d136b755bf
treea65bc1ce8f893c3cce7bab073cd6c013c9648074
parent5199e8ac07f0d5f2013afc05ffc7781b45b3ba12
drm/amdkfd: Fix bug in config_dequeue_wait_counts

For certain ASICs where dequeue_wait_count don't need to be initialized,
pm_config_dequeue_wait_counts_v9 return without filling in the packet
information. However, the calling function interprets this as a success
and sends the uninitialized packet to firmware causing hang.

Fix the above bug by not calling pm_config_dequeue_wait_counts_v9 for
ASICs that don't need the value to be initialized.

v2: Removed redudant code.
    Tidy up code based on review comments
v3: Don't call pm_config_dequeue_wait_counts_v9 for certain ASICs

Fixes: ed962f8d0603 ("drm/amdkfd: Add pm_config_dequeue_wait_counts API")
Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@amd.com>
Reviewed-by: Jonathan Kim <jonathan.kim@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c
drivers/gpu/drm/amd/amdkfd/kfd_packet_manager_v9.c