summaryrefstree
path: root/kernel/drivers/vision/iva/iva_ipc_queue.h
blob: 70675a31f6ca83936b9798fa0785d6a156766c07 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
/*
 * Copyright (C) 2016 Samsung Electronics Co.Ltd
 *
 * This program is free software; you can redistribute	it and/or modify it
 * under  the terms of	the GNU General  Public License as published by the
 * Free Software Foundation;  either version 2 of the  License, or (at your
 * option) any later version.
 */

#ifndef __IVA_IPQ_QUEUE_H__
#define __IVA_IPQ_QUEUE_H__

#include "iva_ipc_param.h"
#include "iva_ctrl.h"

struct iva_ipcq_trans {
	struct list_head	node;
	u64			ts_nsec;
	bool			send;	/* true: cmd, false: response */
	union {
		struct ipc_cmd_param	cmd_param;
		struct ipc_res_param	res_param;
	};
};


extern int	iva_ipcq_send_cmd_usr(struct iva_ipcq *ipcq,
			struct ipc_cmd_param __user *ipc_param);

extern int	iva_ipcq_wait_res_usr(struct iva_ipcq *ipcq,
			struct ipc_res_param __user *r_param);
extern int	iva_ipcq_send_rsp_k(struct iva_ipcq *ipcq,
			struct ipc_res_param *res_param, bool from_irq);

extern int	iva_ipcq_init(struct iva_ipcq *ipcq, struct ipc_cmd_queue *cmd_q,
			struct ipc_res_queue *rsp_q);
extern void	iva_ipcq_deinit(struct iva_ipcq *ipcq);

extern int	iva_ipcq_probe(struct iva_dev_data *iva);
extern void	iva_ipcq_remove(struct iva_dev_data *iva);

#endif /* __IVA_IPQ_QUEUE_H__*/