• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Copyright (C) Rockchip Electronics Co., Ltd.
4  *
5  * Author: Huang Lee <Putin.li@rock-chips.com>
6  */
7 
8 #ifndef __LINUX_RKRGA_JOB_H_
9 #define __LINUX_RKRGA_JOB_H_
10 
11 #include <linux/spinlock.h>
12 #include <linux/dma-fence.h>
13 
14 #include "rga_drv.h"
15 
16 enum job_flags {
17 	RGA_JOB_DONE			= 1 << 0,
18 	RGA_JOB_ASYNC			= 1 << 1,
19 	RGA_JOB_SYNC			= 1 << 2,
20 	RGA_JOB_USE_HANDLE		= 1 << 3,
21 	RGA_JOB_UNSUPPORT_RGA2		= 1 << 4,
22 };
23 
24 struct rga_scheduler_t *rga_job_get_scheduler(int core);
25 
26 void rga_job_done(struct rga_scheduler_t *rga_scheduler, int ret);
27 int rga_job_commit(struct rga_req *rga_command_base, int flags);
28 
29 int rga_job_mpi_commit(struct rga_req *rga_command_base,
30 		       struct rga_mpi_job_t *mpi_job, int flags);
31 
32 int rga_job_assign(struct rga_job *job);
33 
34 struct rga_job *
35 rga_scheduler_get_pending_job_list(struct rga_scheduler_t *scheduler);
36 
37 struct rga_job *
38 rga_scheduler_get_running_job(struct rga_scheduler_t *scheduler);
39 
40 #endif /* __LINUX_RKRGA_JOB_H_ */
41