From 48ce94f940c9bae34282c40852047a7af7763ceb Mon Sep 17 00:00:00 2001 From: Thomas Fleury Date: Wed, 23 Nov 2016 10:18:19 -0800 Subject: gpu: nvgpu: CPU timestamps for alarms Use sched_clock() for alarm timestamps to return number of nanoseconds since the system was started. Jira DNVGPU-186 Change-Id: Ie16fe5442ea8a5213bf5401a3faedcce387b3d93 Reviewed-on: http://git-master/r/1259026 Signed-off-by: Thomas Fleury (cherry picked from commit 383601c4d006734e13f0bfa386381573c87209da) Reviewed-on: http://git-master/r/1280888 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/clk/clk_arb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/gpu/nvgpu') diff --git a/drivers/gpu/nvgpu/clk/clk_arb.c b/drivers/gpu/nvgpu/clk/clk_arb.c index b4ed373d..d6cbe137 100644 --- a/drivers/gpu/nvgpu/clk/clk_arb.c +++ b/drivers/gpu/nvgpu/clk/clk_arb.c @@ -1294,7 +1294,7 @@ static void nvgpu_clk_arb_queue_notification(struct gk20a *g, queue_index = (atomic_inc_return(&queue->tail)) % queue->size; /* get current timestamp */ - timestamp = (u64) get_cycles(); + timestamp = (u64) sched_clock(); queue->notifications[queue_index].timestamp = timestamp; queue->notifications[queue_index].notification = alarm_mask; -- cgit v1.2.2