diff options
Diffstat (limited to 'drivers/gpu/nvgpu/include/nvgpu/ptimer.h')
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/ptimer.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/ptimer.h b/drivers/gpu/nvgpu/include/nvgpu/ptimer.h index 598e064f..3369eb20 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/ptimer.h +++ b/drivers/gpu/nvgpu/include/nvgpu/ptimer.h | |||
@@ -42,10 +42,11 @@ static inline u32 ptimer_scalingfactor10x(u32 ptimer_src_freq) | |||
42 | 42 | ||
43 | static inline u32 scale_ptimer(u32 timeout , u32 scale10x) | 43 | static inline u32 scale_ptimer(u32 timeout , u32 scale10x) |
44 | { | 44 | { |
45 | if (((timeout*10) % scale10x) >= (scale10x/2)) | 45 | if (((timeout*10) % scale10x) >= (scale10x/2)) { |
46 | return ((timeout * 10) / scale10x) + 1; | 46 | return ((timeout * 10) / scale10x) + 1; |
47 | else | 47 | } else { |
48 | return (timeout * 10) / scale10x; | 48 | return (timeout * 10) / scale10x; |
49 | } | ||
49 | } | 50 | } |
50 | 51 | ||
51 | int nvgpu_get_timestamps_zipper(struct gk20a *g, | 52 | int nvgpu_get_timestamps_zipper(struct gk20a *g, |