drm/amdkfd: Initialize only amdkfd's assigned pipelines
authorOded Gabbay <oded.gabbay@amd.com>
Tue, 17 Feb 2015 09:58:27 +0000 (11:58 +0200)
committerOded Gabbay <oded.gabbay@amd.com>
Mon, 23 Feb 2015 08:47:56 +0000 (10:47 +0200)
commit1365aa6266fad0669487240af3f098593796172c
tree5aec9b1e27fb9f362b6aeded3aaaaee17e097f85
parentc517d838eb7d07bbe9507871fab3931deccff539
drm/amdkfd: Initialize only amdkfd's assigned pipelines

This patch fixes a bug in the initialization of the pipelines. The
init_pipelines() function was called with a constant value of 0 in the
first_pipe argument. This is an error because amdkfd doesn't handle pipe 0.

The correct way is to pass the value that get_first_pipe() returns as the
argument for first_pipe.

This bug appeared in 3.19 (first version with amdkfd) and it causes around 15%
drop in CPU performance of Kaveri (A10-7850).

v2: Don't set get_first_pipe() as inline because it calls BUG_ON()

Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
Cc: stable@vger.kernel.org
Tested-by: Michel Dänzer <michel.daenzer@amd.com>
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager_cik.c