e981939b5e95dc3ca90a69a0d9f67867269e3d88
[openwrt/staging/wigyori.git] /
1 From 9fce5008a9183cfe5dc5393b726e93020b21f580 Mon Sep 17 00:00:00 2001
2 From: Dave Stevenson <dave.stevenson@raspberrypi.org>
3 Date: Tue, 25 Jun 2019 00:29:44 +0100
4 Subject: [PATCH 684/773] staging: vcsm-cma: Remove cache manipulation ioctl
5 from ARM64
6
7 The cache flushing ioctls are used by the Pi3 HEVC hw-assisted
8 decoder as it needs finer grained flushing control than dma_ops
9 allow.
10 These cache calls are not present for ARM64, therefore disable
11 them. We are not actively supporting 64bit kernels at present,
12 and the use case of the HEVC decoder is fairly limited.
13
14 Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
15 ---
16 drivers/staging/vc04_services/vc-sm-cma/vc_sm.c | 8 ++++++++
17 1 file changed, 8 insertions(+)
18
19 --- a/drivers/staging/vc04_services/vc-sm-cma/vc_sm.c
20 +++ b/drivers/staging/vc04_services/vc-sm-cma/vc_sm.c
21 @@ -1259,6 +1259,7 @@ error:
22 return ret;
23 }
24
25 +#ifndef CONFIG_ARM64
26 /* Converts VCSM_CACHE_OP_* to an operating function. */
27 static void (*cache_op_to_func(const unsigned int cache_op))
28 (const void*, const void*)
29 @@ -1351,6 +1352,7 @@ out:
30
31 return ret;
32 }
33 +#endif
34
35 static long vc_sm_cma_ioctl(struct file *file, unsigned int cmd,
36 unsigned long arg)
37 @@ -1448,6 +1450,7 @@ static long vc_sm_cma_ioctl(struct file
38 break;
39 }
40
41 +#ifndef CONFIG_ARM64
42 /*
43 * Flush/Invalidate the cache for a given mapping.
44 * Blocks must be pinned (i.e. accessed) before this call.
45 @@ -1455,6 +1458,7 @@ static long vc_sm_cma_ioctl(struct file
46 case VC_SM_CMA_CMD_CLEAN_INVALID2:
47 ret = vc_sm_cma_clean_invalid2(cmdnr, arg);
48 break;
49 +#endif
50
51 default:
52 pr_debug("[%s]: cmd %x tgid %u, owner %u\n", __func__, cmdnr,
53 @@ -1467,6 +1471,7 @@ static long vc_sm_cma_ioctl(struct file
54 return ret;
55 }
56
57 +#ifndef CONFIG_ARM64
58 #ifdef CONFIG_COMPAT
59 struct vc_sm_cma_ioctl_clean_invalid2_32 {
60 u32 op_count;
61 @@ -1496,14 +1501,17 @@ static long vc_sm_cma_compat_ioctl(struc
62 }
63 }
64 #endif
65 +#endif
66
67 /* Device operations that we managed in this driver. */
68 static const struct file_operations vc_sm_ops = {
69 .owner = THIS_MODULE,
70 .unlocked_ioctl = vc_sm_cma_ioctl,
71 +#ifndef CONFIG_ARM64
72 #ifdef CONFIG_COMPAT
73 .compat_ioctl = vc_sm_cma_compat_ioctl,
74 #endif
75 +#endif
76 .open = vc_sm_cma_open,
77 .release = vc_sm_cma_release,
78 };