diff --git a/drivers/gpu/nvgpu/Makefile.shared.configs b/drivers/gpu/nvgpu/Makefile.shared.configs index 791bf1951..e50895a33 100644 --- a/drivers/gpu/nvgpu/Makefile.shared.configs +++ b/drivers/gpu/nvgpu/Makefile.shared.configs @@ -120,6 +120,9 @@ NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_USE_3LSS_ERR_INJECTION CONFIG_NVGPU_LS_PMU := 1 NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_LS_PMU + +CONFIG_NVGPU_CLK_ARB := 1 +NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_CLK_ARB endif endif diff --git a/drivers/gpu/nvgpu/common/clk_arb/clk_arb.c b/drivers/gpu/nvgpu/common/clk_arb/clk_arb.c index 435a5aeeb..0da723938 100644 --- a/drivers/gpu/nvgpu/common/clk_arb/clk_arb.c +++ b/drivers/gpu/nvgpu/common/clk_arb/clk_arb.c @@ -72,11 +72,14 @@ static void nvgpu_clk_arb_queue_notification(struct gk20a *g, u32 alarm_mask) { u32 queue_index; - u64 timestamp; + u64 timestamp = 0U; queue_index = U32(nvgpu_atomic_inc_return(&queue->tail)) % queue->size; + +#ifdef CONFIG_NVGPU_NON_FUSA /* get current timestamp */ timestamp = (u64) nvgpu_hr_timestamp(); +#endif queue->clk_q_notifications[queue_index].timestamp = timestamp; queue->clk_q_notifications[queue_index].clk_notification = alarm_mask; diff --git a/drivers/gpu/nvgpu/hal/clk/clk_tu104.c b/drivers/gpu/nvgpu/hal/clk/clk_tu104.c index 71722617b..16a320b74 100644 --- a/drivers/gpu/nvgpu/hal/clk/clk_tu104.c +++ b/drivers/gpu/nvgpu/hal/clk/clk_tu104.c @@ -262,6 +262,7 @@ int tu104_init_clk_support(struct gk20a *g) } u32 tu104_get_rate_cntr(struct gk20a *g, struct namemap_cfg *c) { +#ifdef CONFIG_NVGPU_NON_FUSA u32 cntr = 0; u64 cntr_start = 0; u64 cntr_stop = 0; @@ -310,6 +311,7 @@ u32 tu104_get_rate_cntr(struct gk20a *g, struct namemap_cfg *c) { } nvgpu_mutex_release(&clk->clk_mutex); +#endif /* too many iterations, bail out */ nvgpu_err(g, "failed to get clk rate"); return -EBUSY;