drm/amdkfd: Initialize only amdkfd's assigned pipelines
Subsystems (3)
PATCH 1/1 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).
Signed-off-by Oded Gabbay <[email protected]>
Tested-by Michel Dänzer <[email protected]>
--- drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 6 ------ drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h | 6 ++++++ drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager_cik.c | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-)
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +0 -6
@@ -62,12 +62,6 @@ enum KFD_MQD_TYPE get_mqd_type_from_queue_type(enum kfd_queue_type type)return KFD_MQD_TYPE_CP ; } -static inline unsigned int get_first_pipe (struct device_queue_manager *dqm) -{ -BUG_ON (!dqm); -return dqm->dev->shared_resources.first_compute_pipe; -} -static inline unsigned int get_pipes_num_cpsch (void ) {return PIPE_PER_ME_CP_SCHEDULING ;
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h +6 -0
@@ -181,4 +181,10 @@ extern inline unsigned int get_pipes_num(struct device_queue_manager *dqm) return dqm->dev->shared_resources.compute_pipe_count; } +extern inline unsigned int get_first_pipe (struct device_queue_manager *dqm) +{ +BUG_ON (!dqm); +return dqm->dev->shared_resources.first_compute_pipe; +} +#endif /* KFD_DEVICE_QUEUE_MANAGER_H_ */
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager_cik.c +1 -1
@@ -131,5 +131,5 @@ static int register_process_cik(struct device_queue_manager *dqm,static int initialize_cpsch_cik (struct device_queue_manager *dqm) { -return init_pipelines (dqm,get_pipes_num (dqm),0 ); +return init_pipelines (dqm,get_pipes_num (dqm),get_first_pipe (dqm)); }
Signature · 6 lines
1.9.1 _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel