summaryrefstree
path: root/kernel/drivers/vision/vpu/include/vpu-time.h
blob: a0ea1255cb7a097b4c7682e04a7f94f67b06b5ff (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
/*
 * 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.
 */

#include <linux/types.h>
#include <linux/time.h>
#include <linux/ktime.h>
#include <linux/timekeeping.h>

enum vpu_time_measure_point {
	VPU_TMP_QUEUE,
	VPU_TMP_REQUEST,
	VPU_TMP_RESOURCE,
	VPU_TMP_PROCESS,
	VPU_TMP_DONE,
	VPU_TMP_COUNT
};

struct vpu_time {
	struct timeval		time;
};

void vpu_get_timestamp(struct vpu_time *time);

#define VPU_TIME_IN_US(v)	((v).time.tv_sec * 1000000 + (v).time.tv_usec)