summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h
diff options
context:
space:
mode:
authorOded Gabbay <oded.gabbay@amd.com>2015-01-22 13:42:28 +0200
committerOded Gabbay <oded.gabbay@amd.com>2015-01-22 17:52:50 +0200
commit0b3674ae1c8b9539dde694a70391e974aedde8c2 (patch)
treedf8414f2f1632caadecbd9c66abf662f721ce180 /drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h
parent7113cd652969fe1a59a9560e700000633df6a3e1 (diff)
downloadblackbird-obmc-linux-0b3674ae1c8b9539dde694a70391e974aedde8c2.tar.gz
blackbird-obmc-linux-0b3674ae1c8b9539dde694a70391e974aedde8c2.zip
drm/amdkfd: Fix sparse errors
Signed-off-by: Oded Gabbay <oded.gabbay@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h')
-rw-r--r--drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h20
1 files changed, 17 insertions, 3 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h
index 19347956eeb9..e7b17b28330e 100644
--- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h
+++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h
@@ -160,10 +160,24 @@ void device_queue_manager_init_cik(struct device_queue_manager_ops *ops);
void device_queue_manager_init_vi(struct device_queue_manager_ops *ops);
void program_sh_mem_settings(struct device_queue_manager *dqm,
struct qcm_process_device *qpd);
-inline unsigned int get_sh_mem_bases_32(struct kfd_process_device *qpd);
-inline unsigned int get_sh_mem_bases_nybble_64(struct kfd_process_device *pdd);
int init_pipelines(struct device_queue_manager *dqm,
unsigned int pipes_num, unsigned int first_pipe);
-inline unsigned int get_pipes_num(struct device_queue_manager *dqm);
+
+extern inline unsigned int get_sh_mem_bases_32(struct kfd_process_device *pdd)
+{
+ return (pdd->lds_base >> 16) & 0xFF;
+}
+
+extern inline unsigned int
+get_sh_mem_bases_nybble_64(struct kfd_process_device *pdd)
+{
+ return (pdd->lds_base >> 60) & 0x0E;
+}
+
+extern inline unsigned int get_pipes_num(struct device_queue_manager *dqm)
+{
+ BUG_ON(!dqm || !dqm->dev);
+ return dqm->dev->shared_resources.compute_pipe_count;
+}
#endif /* KFD_DEVICE_QUEUE_MANAGER_H_ */
OpenPOWER on IntegriCloud