summaryrefstree
path: root/kernel/drivers/vision/dsp/dl/dsp-dl-engine.h
blob: 091d13cf3773f8f138b24eebae37dae417545d53 (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
/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Samsung Exynos SoC series dsp driver
 *
 * Copyright (c) 2019 Samsung Electronics Co., Ltd.
 *              http://www.samsung.com/
 */

#ifndef __DL_DSP_ENGINE_H__
#define __DL_DSP_ENGINE_H__

#include "dl/dsp-common.h"

enum dsp_dl_status {
	DSP_DL_FAIL = -1,
	DSP_DL_SUCCESS = 0,
};

struct dsp_dl_load_status {
	enum dsp_dl_status status;
	int pm_inv;
};

struct dsp_dl_param_mem {
	unsigned long addr;
	size_t size;
};

struct dsp_dl_param {
	const char *lib_path;

	struct dsp_dl_lib_file gkt;
	struct dsp_dl_lib_file rule;

	struct dsp_dl_lib_info *common_libs;
	int common_size;

	struct dsp_dl_param_mem pm;
	unsigned int pm_offset;

	struct dsp_dl_param_mem gpt;
	struct dsp_dl_param_mem dl_out;
};

enum dsp_dl_status dsp_dl_init(struct dsp_dl_param *param);
enum dsp_dl_status dsp_dl_close(void);

struct dsp_dl_load_status dsp_dl_load_libraries(
	struct dsp_dl_lib_info *infos, int size);

enum dsp_dl_status dsp_dl_unload_libraries(
	struct dsp_dl_lib_info *infos, int size);

void dsp_dl_print_status(void);

#endif