mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-13 22:14:20 +08:00
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>
This commit is contained in:
parent
1365aa6266
commit
64ea8f4af5
@ -68,6 +68,12 @@ unsigned int get_first_pipe(struct device_queue_manager *dqm)
|
|||||||
return dqm->dev->shared_resources.first_compute_pipe;
|
return dqm->dev->shared_resources.first_compute_pipe;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsigned int get_pipes_num(struct device_queue_manager *dqm)
|
||||||
|
{
|
||||||
|
BUG_ON(!dqm || !dqm->dev);
|
||||||
|
return dqm->dev->shared_resources.compute_pipe_count;
|
||||||
|
}
|
||||||
|
|
||||||
static inline unsigned int get_pipes_num_cpsch(void)
|
static inline unsigned int get_pipes_num_cpsch(void)
|
||||||
{
|
{
|
||||||
return PIPE_PER_ME_CP_SCHEDULING;
|
return PIPE_PER_ME_CP_SCHEDULING;
|
||||||
|
@ -164,6 +164,7 @@ void program_sh_mem_settings(struct device_queue_manager *dqm,
|
|||||||
int init_pipelines(struct device_queue_manager *dqm,
|
int init_pipelines(struct device_queue_manager *dqm,
|
||||||
unsigned int pipes_num, unsigned int first_pipe);
|
unsigned int pipes_num, unsigned int first_pipe);
|
||||||
unsigned int get_first_pipe(struct device_queue_manager *dqm);
|
unsigned int get_first_pipe(struct device_queue_manager *dqm);
|
||||||
|
unsigned int get_pipes_num(struct device_queue_manager *dqm);
|
||||||
|
|
||||||
extern inline unsigned int get_sh_mem_bases_32(struct kfd_process_device *pdd)
|
extern inline unsigned int get_sh_mem_bases_32(struct kfd_process_device *pdd)
|
||||||
{
|
{
|
||||||
@ -176,10 +177,4 @@ get_sh_mem_bases_nybble_64(struct kfd_process_device *pdd)
|
|||||||
return (pdd->lds_base >> 60) & 0x0E;
|
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_ */
|
#endif /* KFD_DEVICE_QUEUE_MANAGER_H_ */
|
||||||
|
Loading…
Reference in New Issue
Block a user