summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gk20a.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.h')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h
index f107d83d..8290e7e7 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.h
@@ -886,4 +886,11 @@ void gk20a_user_deinit(struct platform_device *dev);
886 886
887extern void gk20a_debug_dump_device(struct platform_device *pdev); 887extern void gk20a_debug_dump_device(struct platform_device *pdev);
888 888
889static inline u32 scale_ptimer(u32 timeout , u32 scale10x)
890{
891 if (((timeout*10) % scale10x) >= (scale10x/2))
892 return ((timeout * 10) / scale10x) + 1;
893 else
894 return (timeout * 10) / scale10x;
895}
889#endif /* GK20A_H */ 896#endif /* GK20A_H */