diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2017-04-19 12:52:41 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-04-20 12:14:42 -0400 |
commit | 59e2c410a1dbb8667402e772f796ec21bb8db887 (patch) | |
tree | 91db3f1c61b821f96ea1a0ca16e98088c2e37467 | |
parent | 0d8f5f3fdb87b818b6239efaf91822c01cb3d859 (diff) |
gpu: nvgpu: Use usleep_range() instead of hrtimer
FECS trace used hrtimer for sleeping between frames. The resolution
does not need to be that high, and hrtimers are not portable, so
replace the delay with nvpgu_usleep_range().
Bug 200290850
Change-Id: I10fc56fcf6f6d407413384d557ae4bfdfa4239ef
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/1465761
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
Reviewed-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: Gerrit_Virtual_Submit
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c b/drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c index ffc5f9f5..174fdb18 100644 --- a/drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fecs_trace_gk20a.c | |||
@@ -37,7 +37,7 @@ | |||
37 | */ | 37 | */ |
38 | #define GK20A_FECS_TRACE_NUM_RECORDS (1 << 6) | 38 | #define GK20A_FECS_TRACE_NUM_RECORDS (1 << 6) |
39 | #define GK20A_FECS_TRACE_HASH_BITS 8 /* 2^8 */ | 39 | #define GK20A_FECS_TRACE_HASH_BITS 8 /* 2^8 */ |
40 | #define GK20A_FECS_TRACE_FRAME_PERIOD_NS (1000000000ULL/60ULL) | 40 | #define GK20A_FECS_TRACE_FRAME_PERIOD_US (1000000ULL/60ULL) |
41 | #define GK20A_FECS_TRACE_PTIMER_SHIFT 5 | 41 | #define GK20A_FECS_TRACE_PTIMER_SHIFT 5 |
42 | 42 | ||
43 | struct gk20a_fecs_trace_record { | 43 | struct gk20a_fecs_trace_record { |
@@ -379,13 +379,13 @@ done: | |||
379 | static int gk20a_fecs_trace_periodic_polling(void *arg) | 379 | static int gk20a_fecs_trace_periodic_polling(void *arg) |
380 | { | 380 | { |
381 | struct gk20a *g = (struct gk20a *)arg; | 381 | struct gk20a *g = (struct gk20a *)arg; |
382 | struct timespec ts = ns_to_timespec(GK20A_FECS_TRACE_FRAME_PERIOD_NS); | ||
383 | 382 | ||
384 | pr_info("%s: running\n", __func__); | 383 | pr_info("%s: running\n", __func__); |
385 | 384 | ||
386 | while (!kthread_should_stop()) { | 385 | while (!kthread_should_stop()) { |
387 | 386 | ||
388 | hrtimer_nanosleep(&ts, NULL, HRTIMER_MODE_REL, CLOCK_MONOTONIC); | 387 | nvgpu_usleep_range(GK20A_FECS_TRACE_FRAME_PERIOD_US, |
388 | GK20A_FECS_TRACE_FRAME_PERIOD_US * 2); | ||
389 | 389 | ||
390 | gk20a_fecs_trace_poll(g); | 390 | gk20a_fecs_trace_poll(g); |
391 | } | 391 | } |