blob: 3869d94519dbbba07c2c70e56ace2e7f634fe628 (
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
|
/*
* Samsung Exynos SoC series VPU driver
*
* Copyright (c) 2015 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 version 2 as
* published by the Free Software Foundation.
*/
#ifndef VPU_VERTEX_H_
#define VPU_VERTEX_H_
#define VPU_VERTEX_NAME "vertex"
#define VPU_VERTEX_MINOR 0
#include "vision-dev.h"
#include "vision-ioctl.h"
#include "vpu-queue.h"
struct vpu_vertex;
enum vpu_vertex_state {
VPU_VERTEX_OPEN,
VPU_VERTEX_GRAPH,
VPU_VERTEX_FORMAT,
VPU_VERTEX_START,
VPU_VERTEX_STOP
};
struct vpu_vertex_refcount {
atomic_t refcount;
struct vpu_vertex *vertex;
int (*first)(struct vpu_vertex *vertex);
int (*final)(struct vpu_vertex *vertex);
};
struct vpu_vertex {
struct mutex lock;
struct vision_device vd;
struct vpu_vertex_refcount open_cnt;
struct vpu_vertex_refcount start_cnt;
};
struct vpu_vertex_ctx {
u32 state;
u32 id;
struct mutex lock;
struct vpu_queue queue;
struct vpu_vertex *vertex;
};
int vpu_vertex_probe(struct vpu_vertex *vertex, struct device *parent);
#endif
|