X-Git-Url: http://git.openwrt.org/?a=blobdiff_plain;f=target%2Flinux%2Fbrcm2708%2Fpatches-4.19%2F950-0599-staging-vcsm-cma-Remove-cache-manipulation-ioctl-fro.patch;fp=target%2Flinux%2Fbrcm2708%2Fpatches-4.19%2F950-0599-staging-vcsm-cma-Remove-cache-manipulation-ioctl-fro.patch;h=38bff7a7f69f64770435374db403478b99b06293;hb=c2308a7e4adbb2acc8ff149f91d1ca46801c135e;hp=0000000000000000000000000000000000000000;hpb=67dcc43f3a22dc3a7ac07a7065971b426feeb043;p=openwrt%2Fstaging%2Fdedeckeh.git diff --git a/target/linux/brcm2708/patches-4.19/950-0599-staging-vcsm-cma-Remove-cache-manipulation-ioctl-fro.patch b/target/linux/brcm2708/patches-4.19/950-0599-staging-vcsm-cma-Remove-cache-manipulation-ioctl-fro.patch new file mode 100644 index 0000000000..38bff7a7f6 --- /dev/null +++ b/target/linux/brcm2708/patches-4.19/950-0599-staging-vcsm-cma-Remove-cache-manipulation-ioctl-fro.patch @@ -0,0 +1,78 @@ +From b30537425b4bf90311b8d43c95484d9d339be25f Mon Sep 17 00:00:00 2001 +From: Dave Stevenson +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 +--- + 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, + };