From: Loren HUANG Date: Mon, 19 Aug 2013 14:29:36 +0000 (+0800) Subject: ENGR00275739 Correct GPU delay implmentation in kernel code X-Git-Tag: KARO-TX6-2014-08-21~1^2~299 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=c6278e6be903c23ec2f70ba67b610c7b3503c7f3;p=karo-tx-linux.git 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 --- 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