summaryrefstree
path: root/kernel/drivers/gpu/exynos/g2d/g2d_secure.h
blob: 060a9b13333545d9c67659e9420163d73b1eba80 (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
/*
 * linux/drivers/gpu/exynos/g2d/g2d_secure.h
 *
 * Copyright (c) 2018 Samsung Electronics Co., Ltd.
 *
 * Samsung Graphics 2D driver
 *
 * 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 __EXYNOS_G2D_SECURE_H__
#define __EXYNOS_G2D_SECURE_H__

#ifdef CONFIG_EXYNOS_CONTENT_PATH_PROTECTION
#include <linux/smc.h>
#else
static inline int exynos_smc(unsigned long cmd, unsigned long arg1,
			     unsigned long arg2, unsigned long arg3)
{
	return 0; /* DRMDRV_OK */
}
#endif

/*
 * SMC_DRM_G2D_CMD_DATA should be defined in <linux/smc.h> before use of it.
 * However, it may not be defined for the project that does not need it including
 * Exynos9820.
 */
#ifndef SMC_DRM_G2D_CMD_DATA
#define SMC_DRM_G2D_CMD_DATA            0x8200202d
#endif

/*
 * SMC_PROTECTION_SET is defined in <linux/smc.h>. This is just a hedge of the
 * situation when <linux/smc.h> forgets to define SMC_PROTECTION_SET.
 */
#ifndef SMC_PROTECTION_SET
#define SMC_PROTECTION_SET		0x82002010
#endif

#ifndef G2D_ALWAYS_S
#define G2D_ALWAYS_S 37
#endif

#endif /* __EXYNOS_G2D_SECURE_H__ */