aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm27xx/patches-4.19/950-0597-staging-vcsm-cma-Remove-cache-manipulation-ioctl-fro.patch
blob: 38bff7a7f69f64770435374db403478b99b06293 (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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
From b30537425b4bf90311b8d43c95484d9d339be25f Mon Sep 17 00:00:00 2001
From: Dave Stevenson <dave.stevenson@raspberrypi.org>
Date: Tue, 25 Jun 2019 00:29:44 +0100
Subject: [PATCH] staging: vcsm-cma: Remove cache manipulation ioctl
 from ARM64

The cache flushing ioctls are used by the Pi3 HEVC hw-assisted
decoder as it needs finer grained flushing control than dma_ops
allow.
These cache calls are not present for ARM64, therefore disable
them. We are not actively supporting 64bit kernels at present,
and the use case of the HEVC decoder is fairly limited.

Signed-off-by: Dave Stevenson <dave.stevenson@raspberrypi.org>
---
 drivers/staging/vc04_services/vc-sm-cma/vc_sm.c | 8 ++++++++
 1 file changed, 8 insertions(+)

--- a/drivers/staging/vc04_services/vc-sm-cma/vc_sm.c
+++ b/drivers/staging/vc04_services/vc-sm-cma/vc_sm.c
@@ -1259,6 +1259,7 @@ error:
 	return ret;
 }
 
+#ifndef CONFIG_ARM64
 /* Converts VCSM_CACHE_OP_* to an operating function. */
 static void (*cache_op_to_func(const unsigned int cache_op))
 						(const void*, const void*)
@@ -1351,6 +1352,7 @@ out:
 
 	return ret;
 }
+#endif
 
 static long vc_sm_cma_ioctl(struct file *file, unsigned int cmd,
 			    unsigned long arg)
@@ -1448,6 +1450,7 @@ static long vc_sm_cma_ioctl(struct file
 		break;
 	}
 
+#ifndef CONFIG_ARM64
 	/*
 	 * Flush/Invalidate the cache for a given mapping.
 	 * Blocks must be pinned (i.e. accessed) before this call.
@@ -1455,6 +1458,7 @@ static long vc_sm_cma_ioctl(struct file
 	case VC_SM_CMA_CMD_CLEAN_INVALID2:
 		ret = vc_sm_cma_clean_invalid2(cmdnr, arg);
 		break;
+#endif
 
 	default:
 		pr_debug("[%s]: cmd %x tgid %u, owner %u\n", __func__, cmdnr,
@@ -1467,6 +1471,7 @@ static long vc_sm_cma_ioctl(struct file
 	return ret;
 }
 
+#ifndef CONFIG_ARM64
 #ifdef CONFIG_COMPAT
 struct vc_sm_cma_ioctl_clean_invalid2_32 {
 	u32 op_count;
@@ -1496,14 +1501,17 @@ static long vc_sm_cma_compat_ioctl(struc
 	}
 }
 #endif
+#endif
 
 /* Device operations that we managed in this driver. */
 static const struct file_operations vc_sm_ops = {
 	.owner = THIS_MODULE,
 	.unlocked_ioctl = vc_sm_cma_ioctl,
+#ifndef CONFIG_ARM64
 #ifdef CONFIG_COMPAT
 	.compat_ioctl = vc_sm_cma_compat_ioctl,
 #endif
+#endif
 	.open = vc_sm_cma_open,
 	.release = vc_sm_cma_release,
 };