summaryrefstree
path: root/kernel/drivers/vision/vpu/include/vpu-resource.h
blob: 322e82e3f9cf381644f1a167dda9b58c4ddea273 (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
/*
 * 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_RESOURCE_H_
#define VPU_RESOURCE_H_

#include <linux/device.h>

#include "lib/vpul-ds.h"
#include "vpu-hardware.h"

struct vpu_resource {
	struct vpu_hardware	hardware;
	spinlock_t		slock;
	unsigned long		state;
};

int vpu_resource_probe(struct vpu_resource *resource, struct device *dev);
int vpu_resource_open(struct vpu_resource *resource);
int vpu_resource_close(struct vpu_resource *resource);
int vpu_resource_add(struct vpu_resource *resource, struct vpul_task *task);
int vpu_resource_del(struct vpu_resource *resource, struct vpul_task *task);
int vpu_resource_get(struct vpu_resource *resource, struct vpul_task *task, unsigned long flags);
int vpu_resource_put(struct vpu_resource *resource, struct vpul_task *task);
int vpu_resource_print(struct vpu_resource *resource);

#endif