diff options
Diffstat (limited to 'meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0021-Use-updated-timekeeping-functions-in-kernel-5.6.patch')
| -rw-r--r-- | meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0021-Use-updated-timekeeping-functions-in-kernel-5.6.patch | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0021-Use-updated-timekeeping-functions-in-kernel-5.6.patch b/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0021-Use-updated-timekeeping-functions-in-kernel-5.6.patch new file mode 100644 index 00000000..adef8e18 --- /dev/null +++ b/meta-xilinx-core/recipes-graphics/mali/kernel-module-mali/0021-Use-updated-timekeeping-functions-in-kernel-5.6.patch | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | From bc0f85271681532c7e394229f0155366d1de8779 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Dylan Yip <dylan.yip@xilinx.com> | ||
| 3 | Date: Mon, 8 Feb 2021 23:47:01 -0800 | ||
| 4 | Subject: [PATCH 21/23] Use updated timekeeping functions in kernel 5.6 | ||
| 5 | |||
| 6 | As of commit 412c53a680a9 ("y2038: remove unused time32 interfaces"), 32 | ||
| 7 | bit timekeeping functions like getnstimeofday() have been removed. So | ||
| 8 | use the 64 bit replacements. | ||
| 9 | |||
| 10 | Signed-off-by: Dylan Yip <dylan.yip@xilinx.com> | ||
| 11 | --- | ||
| 12 | linux/mali_osk_time.c | 6 ++++++ | ||
| 13 | 1 file changed, 6 insertions(+) | ||
| 14 | |||
| 15 | diff --git a/linux/mali_osk_time.c b/linux/mali_osk_time.c | ||
| 16 | index bfcbf7f..583d82b 100644 | ||
| 17 | --- a/linux/mali_osk_time.c | ||
| 18 | +++ b/linux/mali_osk_time.c | ||
| 19 | @@ -46,9 +46,15 @@ void _mali_osk_time_ubusydelay(u32 usecs) | ||
| 20 | |||
| 21 | u64 _mali_osk_time_get_ns(void) | ||
| 22 | { | ||
| 23 | +#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 6, 0) | ||
| 24 | + struct timespec64 tsval; | ||
| 25 | + ktime_get_real_ts64(&tsval); | ||
| 26 | + return (u64)timespec64_to_ns(&tsval); | ||
| 27 | +#else | ||
| 28 | struct timespec tsval; | ||
| 29 | getnstimeofday(&tsval); | ||
| 30 | return (u64)timespec_to_ns(&tsval); | ||
| 31 | +#endif | ||
| 32 | } | ||
| 33 | |||
| 34 | u64 _mali_osk_boot_time_get_ns(void) | ||
| 35 | -- | ||
| 36 | 2.17.1 | ||
| 37 | |||
