From: Loren HUANG Date: Mon, 19 Aug 2013 14:29:36 +0000 (+0800) Subject: ENGR00275739 Correct GPU delay implmentation in kernel code X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=92cc4fdb30b9b55bb42057369fe883b7fc2dc81d;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