Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'drm-amdkfd-fixes-2015-02-23' of git://people.freedesktop.org/~gabbayo/linux into drm-fixes

- Fix a bug that caused 15% CPU performance drop in Kaveri. This was caused
because we overwritten the initialization of the first pipe (out of eight),
which is dedicated to radeon operation. The fix was tested by Michel Dänzer.
This bug was introduced by a patch I prepared (yeah, my bad) and was merged
to 3.19-rc6. Therefore, I also marked it as Cc:stable.

- Fix sparse warning
* tag 'drm-amdkfd-fixes-2015-02-23' of git://people.freedesktop.org/~gabbayo/linux:
drm/amdkfd: don't set get_pipes_num() as inline
drm/amdkfd: Initialize only amdkfd's assigned pipelines

+11 -9
+8 -2
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c
··· 62 62 return KFD_MQD_TYPE_CP; 63 63 } 64 64 65 - static inline unsigned int get_first_pipe(struct device_queue_manager *dqm) 65 + unsigned int get_first_pipe(struct device_queue_manager *dqm) 66 66 { 67 - BUG_ON(!dqm); 67 + BUG_ON(!dqm || !dqm->dev); 68 68 return dqm->dev->shared_resources.first_compute_pipe; 69 + } 70 + 71 + unsigned int get_pipes_num(struct device_queue_manager *dqm) 72 + { 73 + BUG_ON(!dqm || !dqm->dev); 74 + return dqm->dev->shared_resources.compute_pipe_count; 69 75 } 70 76 71 77 static inline unsigned int get_pipes_num_cpsch(void)
+2 -6
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h
··· 163 163 struct qcm_process_device *qpd); 164 164 int init_pipelines(struct device_queue_manager *dqm, 165 165 unsigned int pipes_num, unsigned int first_pipe); 166 + unsigned int get_first_pipe(struct device_queue_manager *dqm); 167 + unsigned int get_pipes_num(struct device_queue_manager *dqm); 166 168 167 169 extern inline unsigned int get_sh_mem_bases_32(struct kfd_process_device *pdd) 168 170 { ··· 175 173 get_sh_mem_bases_nybble_64(struct kfd_process_device *pdd) 176 174 { 177 175 return (pdd->lds_base >> 60) & 0x0E; 178 - } 179 - 180 - extern inline unsigned int get_pipes_num(struct device_queue_manager *dqm) 181 - { 182 - BUG_ON(!dqm || !dqm->dev); 183 - return dqm->dev->shared_resources.compute_pipe_count; 184 176 } 185 177 186 178 #endif /* KFD_DEVICE_QUEUE_MANAGER_H_ */
+1 -1
drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager_cik.c
··· 131 131 132 132 static int initialize_cpsch_cik(struct device_queue_manager *dqm) 133 133 { 134 - return init_pipelines(dqm, get_pipes_num(dqm), 0); 134 + return init_pipelines(dqm, get_pipes_num(dqm), get_first_pipe(dqm)); 135 135 }