diff options
author | Oded Gabbay <oded.gabbay@amd.com> | 2015-02-17 04:30:31 -0500 |
---|---|---|
committer | Oded Gabbay <oded.gabbay@amd.com> | 2015-02-23 03:48:02 -0500 |
commit | 64ea8f4af57cee9f8b0bf542819b41ee82acfcb9 (patch) | |
tree | d4e084d1dd601a6dcbb3fa077c1121e1b35d97c6 /drivers/gpu/drm/amd | |
parent | 1365aa6266fad0669487240af3f098593796172c (diff) |
drm/amdkfd: don't set get_pipes_num() as inline
get_pipes_num() calls BUG_ON so we can't set it as inline because it produces a
warning as BUG_ON() uses static variables when it is expanded.
Signed-off-by: Oded Gabbay <oded.gabbay@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd')
-rw-r--r-- | drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h | 7 |
2 files changed, 7 insertions, 6 deletions
diff --git a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c index 1b58f331afee..910ff8ab9c9c 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.c | |||
@@ -68,6 +68,12 @@ unsigned int get_first_pipe(struct device_queue_manager *dqm) | |||
68 | return dqm->dev->shared_resources.first_compute_pipe; | 68 | return dqm->dev->shared_resources.first_compute_pipe; |
69 | } | 69 | } |
70 | 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; | ||
75 | } | ||
76 | |||
71 | static inline unsigned int get_pipes_num_cpsch(void) | 77 | static inline unsigned int get_pipes_num_cpsch(void) |
72 | { | 78 | { |
73 | return PIPE_PER_ME_CP_SCHEDULING; | 79 | return PIPE_PER_ME_CP_SCHEDULING; |
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 386bd7df7c30..488f51d19427 100644 --- a/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h +++ b/drivers/gpu/drm/amd/amdkfd/kfd_device_queue_manager.h | |||
@@ -164,6 +164,7 @@ void program_sh_mem_settings(struct device_queue_manager *dqm, | |||
164 | int init_pipelines(struct device_queue_manager *dqm, | 164 | int init_pipelines(struct device_queue_manager *dqm, |
165 | unsigned int pipes_num, unsigned int first_pipe); | 165 | unsigned int pipes_num, unsigned int first_pipe); |
166 | unsigned int get_first_pipe(struct device_queue_manager *dqm); | 166 | unsigned int get_first_pipe(struct device_queue_manager *dqm); |
167 | unsigned int get_pipes_num(struct device_queue_manager *dqm); | ||
167 | 168 | ||
168 | extern inline unsigned int get_sh_mem_bases_32(struct kfd_process_device *pdd) | 169 | extern inline unsigned int get_sh_mem_bases_32(struct kfd_process_device *pdd) |
169 | { | 170 | { |
@@ -176,10 +177,4 @@ get_sh_mem_bases_nybble_64(struct kfd_process_device *pdd) | |||
176 | return (pdd->lds_base >> 60) & 0x0E; | 177 | return (pdd->lds_base >> 60) & 0x0E; |
177 | } | 178 | } |
178 | 179 | ||
179 | extern inline unsigned int get_pipes_num(struct device_queue_manager *dqm) | ||
180 | { | ||
181 | BUG_ON(!dqm || !dqm->dev); | ||
182 | return dqm->dev->shared_resources.compute_pipe_count; | ||
183 | } | ||
184 | |||
185 | #endif /* KFD_DEVICE_QUEUE_MANAGER_H_ */ | 180 | #endif /* KFD_DEVICE_QUEUE_MANAGER_H_ */ |