diff options
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | 19 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.h | 1 |
2 files changed, 15 insertions, 5 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c index b1cd50ea..4363129d 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | |||
@@ -430,11 +430,8 @@ int gk20a_init_fifo_reset_enable_hw(struct gk20a *g) | |||
430 | gk20a_writel(g, pbdma_timeout_r(i), timeout); | 430 | gk20a_writel(g, pbdma_timeout_r(i), timeout); |
431 | } | 431 | } |
432 | 432 | ||
433 | if (tegra_platform_is_silicon()) { | 433 | if (g->ops.fifo.apply_pb_timeout) |
434 | timeout = gk20a_readl(g, fifo_pb_timeout_r()); | 434 | g->ops.fifo.apply_pb_timeout(g); |
435 | timeout &= ~fifo_pb_timeout_detection_enabled_f(); | ||
436 | gk20a_writel(g, fifo_pb_timeout_r(), timeout); | ||
437 | } | ||
438 | 435 | ||
439 | timeout = GRFIFO_TIMEOUT_CHECK_PERIOD_US | | 436 | timeout = GRFIFO_TIMEOUT_CHECK_PERIOD_US | |
440 | fifo_eng_timeout_detection_enabled_f(); | 437 | fifo_eng_timeout_detection_enabled_f(); |
@@ -1949,8 +1946,20 @@ int gk20a_fifo_wait_engine_idle(struct gk20a *g) | |||
1949 | return ret; | 1946 | return ret; |
1950 | } | 1947 | } |
1951 | 1948 | ||
1949 | static void gk20a_fifo_apply_pb_timeout(struct gk20a *g) | ||
1950 | { | ||
1951 | u32 timeout; | ||
1952 | |||
1953 | if (tegra_platform_is_silicon()) { | ||
1954 | timeout = gk20a_readl(g, fifo_pb_timeout_r()); | ||
1955 | timeout &= ~fifo_pb_timeout_detection_enabled_f(); | ||
1956 | gk20a_writel(g, fifo_pb_timeout_r(), timeout); | ||
1957 | } | ||
1958 | } | ||
1959 | |||
1952 | void gk20a_init_fifo(struct gpu_ops *gops) | 1960 | void gk20a_init_fifo(struct gpu_ops *gops) |
1953 | { | 1961 | { |
1954 | gk20a_init_channel(gops); | 1962 | gk20a_init_channel(gops); |
1955 | gops->fifo.trigger_mmu_fault = gk20a_fifo_trigger_mmu_fault; | 1963 | gops->fifo.trigger_mmu_fault = gk20a_fifo_trigger_mmu_fault; |
1964 | gops->fifo.apply_pb_timeout = gk20a_fifo_apply_pb_timeout; | ||
1956 | } | 1965 | } |
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index 730ef43e..a1080f0b 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h | |||
@@ -150,6 +150,7 @@ struct gpu_ops { | |||
150 | void (*bind_channel)(struct channel_gk20a *ch_gk20a); | 150 | void (*bind_channel)(struct channel_gk20a *ch_gk20a); |
151 | void (*trigger_mmu_fault)(struct gk20a *g, | 151 | void (*trigger_mmu_fault)(struct gk20a *g, |
152 | unsigned long engine_ids); | 152 | unsigned long engine_ids); |
153 | void (*apply_pb_timeout)(struct gk20a *g); | ||
153 | } fifo; | 154 | } fifo; |
154 | struct pmu_v { | 155 | struct pmu_v { |
155 | /*used for change of enum zbc update cmd id from ver 0 to ver1*/ | 156 | /*used for change of enum zbc update cmd id from ver 0 to ver1*/ |