From 92cc4fdb30b9b55bb42057369fe883b7fc2dc81d Mon Sep 17 00:00:00 2001 From: Loren HUANG Date: Mon, 19 Aug 2013 22:29:36 +0800 Subject: [PATCH] ENGR00275739 Correct GPU delay implmentation in kernel code Original code can't handle delay larger than 1s. Signed-by: Loren Huang Acked-by: Shawn Guo --- drivers/mxc/gpu-viv/hal/os/linux/kernel/gc_hal_kernel_os.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 ed374370a9e4..87400388a134 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 @@ -3648,7 +3648,7 @@ gckOS_Delay( if (Delay > 0) { #if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 28) - ktime_t delay = ktime_set(0, Delay * NSEC_PER_MSEC); + ktime_t delay = ktime_set(Delay/1000, (Delay%1000) * NSEC_PER_MSEC); __set_current_state(TASK_UNINTERRUPTIBLE); schedule_hrtimeout(&delay, HRTIMER_MODE_REL); #else -- 2.39.5