diff --git a/drivers/gpu/nvgpu/common/linux/driver_common.c b/drivers/gpu/nvgpu/common/linux/driver_common.c index b4d88b08a..4919b03fb 100644 --- a/drivers/gpu/nvgpu/common/linux/driver_common.c +++ b/drivers/gpu/nvgpu/common/linux/driver_common.c @@ -108,6 +108,7 @@ static void nvgpu_init_pm_vars(struct gk20a *g) g->aggressive_sync_destroy = platform->aggressive_sync_destroy; g->aggressive_sync_destroy_thresh = platform->aggressive_sync_destroy_thresh; g->has_syncpoints = platform->has_syncpoints; + g->ptimer_src_freq = platform->ptimer_src_freq; /* set default values to aelpg parameters */ g->pmu.aelpg_param[0] = APCTRL_SAMPLING_PERIOD_PG_DEFAULT_US; diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c index e89e9f68d..b96adc5aa 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c @@ -760,7 +760,6 @@ int gk20a_init_fifo_reset_enable_hw(struct gk20a *g) u32 mask; u32 timeout; unsigned int i; - struct gk20a_platform *platform = dev_get_drvdata(g->dev); u32 host_num_pbdma = nvgpu_get_litter_value(g, GPU_LIT_HOST_NUM_PBDMA); gk20a_dbg_fn(""); @@ -803,7 +802,7 @@ int gk20a_init_fifo_reset_enable_hw(struct gk20a *g) timeout = GRFIFO_TIMEOUT_CHECK_PERIOD_US; timeout = scale_ptimer(timeout, - ptimer_scalingfactor10x(platform->ptimer_src_freq)); + ptimer_scalingfactor10x(g->ptimer_src_freq)); timeout |= fifo_eng_timeout_detection_enabled_f(); gk20a_writel(g, fifo_eng_timeout_r(), timeout); diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index 616c25eee..6c846251b 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h @@ -996,6 +996,8 @@ struct gk20a { u32 default_pri_timeout; + u32 ptimer_src_freq; + unsigned int aggressive_sync_destroy_thresh; bool aggressive_sync_destroy; diff --git a/drivers/gpu/nvgpu/vgpu/vgpu.c b/drivers/gpu/nvgpu/vgpu/vgpu.c index a98006f25..0f1fa814e 100644 --- a/drivers/gpu/nvgpu/vgpu/vgpu.c +++ b/drivers/gpu/nvgpu/vgpu/vgpu.c @@ -241,6 +241,7 @@ static void vgpu_init_vars(struct gk20a *g, struct gk20a_platform *platform) g->aggressive_sync_destroy = platform->aggressive_sync_destroy; g->aggressive_sync_destroy_thresh = platform->aggressive_sync_destroy_thresh; g->has_syncpoints = platform->has_syncpoints; + g->ptimer_src_freq = platform->ptimer_src_freq; } static int vgpu_init_support(struct platform_device *pdev)