drm/amdkfd: Remove sync_with_hw() from amdkfd
authorOded Gabbay <oded.gabbay@amd.com>
Thu, 15 Jan 2015 10:07:48 +0000 (12:07 +0200)
committerOded Gabbay <oded.gabbay@amd.com>
Thu, 15 Jan 2015 10:07:48 +0000 (12:07 +0200)
commit939f4a20a7468fa6903d5b55bc8d5eb3afdeb012
tree237201cce70e002079f6ee99a6af2164fe23dd13
parentc51841fbbb566fa9cdf14c5263377969ed3f92cb
drm/amdkfd: Remove sync_with_hw() from amdkfd

This patch completely removes the sync_with_hw() because it was broken and
actually there is no point of using it.

This function was used to:

- Make sure that the submitted packet to the HIQ (which is a kernel queue) was
  read by the CP. However, it was discovered that the method this function used
  to do that (checking wptr == rptr) is not consistent with how the actual CP
  firmware works in all cases.

- Make sure that the queue is empty before issuing the next packet. To achieve
  that, the function blocked amdkfd from continuing until the recently
  submitted packet was consumed. However, the acquire_packet_buffer() already
  checks if there is enough room for a new packet so calling sync_with_hw() is
  redundant.

Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
Acked-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.c
drivers/gpu/drm/amd/amdkfd/kfd_kernel_queue.h
drivers/gpu/drm/amd/amdkfd/kfd_packet_manager.c