blob: 92e0465f37f42d689044ae95e48ca5546f0a8f65 (
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Samsung Exynos SoC series dsp driver
*
* Copyright (c) 2019 Samsung Electronics Co., Ltd.
* http://www.samsung.com/
*/
#ifndef __DSP_GRAPH_H__
#define __DSP_GRAPH_H__
#include <linux/mutex.h>
#include "dsp-common-type.h"
#include "dsp-kernel.h"
#include "hardware/dsp-mailbox.h"
#include "dl/dsp-common.h"
struct dsp_core;
struct dsp_graph {
unsigned int global_id;
unsigned int graph_count;
unsigned int param_count;
unsigned int kernel_count;
unsigned int buf_count;
struct list_head buf_list;
unsigned int update_count;
struct list_head update_list;
struct list_head kernel_list;
void *kernel_name;
struct dsp_dl_lib_info *dl_libs;
bool kernel_loaded;
bool loaded;
unsigned int version;
struct dsp_mailbox_pool *pool;
struct dsp_graph_manager *owner;
struct list_head list;
};
struct dsp_graph_manager {
struct list_head list;
unsigned int count;
struct mutex lock;
struct dsp_kernel_manager kernel_manager;
struct dsp_core *core;
};
void dsp_graph_manager_recovery(struct dsp_graph_manager *gmgr);
struct dsp_graph *dsp_graph_get(struct dsp_graph_manager *gmgr,
unsigned int global_id);
struct dsp_graph *dsp_graph_load(struct dsp_graph_manager *gmgr,
struct dsp_mailbox_pool *pool, void *kernel_name,
unsigned int version);
void dsp_graph_unload(struct dsp_graph *graph, struct dsp_mailbox_pool *pool);
int dsp_graph_execute(struct dsp_graph *graph, struct dsp_mailbox_pool *pool);
void dsp_graph_manager_stop(struct dsp_graph_manager *gmgr, unsigned int id);
int dsp_graph_manager_open(struct dsp_graph_manager *gmgr);
void dsp_graph_manager_close(struct dsp_graph_manager *gmgr,
unsigned int count);
int dsp_graph_manager_probe(struct dsp_core *core);
void dsp_graph_manager_remove(struct dsp_graph_manager *gmgr);
#endif
|