summaryrefslogtreecommitdiff
path: root/recipes-kernel/linux/linux-toradex-rt-4.9-1.0.x/0001-gpu-viv-enable-PREEMPT-RT-fixes.patch
blob: 238f23ecc4df3ce8f5c74237f81af546828c87cb (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
From 3a72b4b868fe160f57817fa54cc14aa235391970 Mon Sep 17 00:00:00 2001
From: Stefan Agner <stefan.agner@toradex.com>
Date: Wed, 24 Jan 2018 16:35:37 +0100
Subject: [PATCH 1/2] gpu-viv: enable PREEMPT RT fixes

Set the preprocessor define gcdRT_KERNEL to enable PREEMPT RT
kernel ifdefs. Use new macro DECLARE_SWAITQUEUE to declare the
simple wait queue.

Upstream-Status: Inappropriate [vendor kernel specific]

Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
---
 drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_linux.h | 2 ++
 drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c    | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_linux.h b/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_linux.h
index 32233cc3418e..fed9448d216e 100644
--- a/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_linux.h
+++ b/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_linux.h
@@ -115,6 +115,8 @@
 
 #define GetPageCount(size, offset)     ((((size) + ((offset) & ~PAGE_MASK)) + PAGE_SIZE - 1) >> PAGE_SHIFT)
 
+#define gcdRT_KERNEL
+
 #if LINUX_VERSION_CODE >= KERNEL_VERSION (3,7,0)
 #define gcdVM_FLAGS (VM_IO | VM_DONTCOPY | VM_DONTEXPAND | VM_DONTDUMP)
 #else
diff --git a/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c b/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c
index 9bf60450f976..46ba3c6839ac 100644
--- a/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c
+++ b/drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c
@@ -6063,7 +6063,7 @@ gckOS_WaitSignal(
             : msecs_to_jiffies(Wait);
 
 #ifdef gcdRT_KERNEL
-        DEFINE_SWAITER(wait);
+	DECLARE_SWAITQUEUE(wait);
 #else
         DECLARE_WAITQUEUE(wait, current);
         wait.flags |= WQ_FLAG_EXCLUSIVE;
-- 
2.15.1