diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2014-08-21 03:39:14 -0400 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 15:10:59 -0400 |
commit | 154360e1a2f1472f21f5eb79e36d6f2a4d5c4923 (patch) | |
tree | e6f25f862a1f432db13ccc41c3063e6096c7a878 /drivers | |
parent | 6ea0934dd74cc61bb5f039493df567ec3a4f8b22 (diff) |
gpu: nvgpu: Set PB timeout only in gk20a
PB timeout has been removed in gm20b, so write it only in gk20a.
Change-Id: I2aab92fe7d1d5de151dad768f8b3f6901ec0bbb0
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/486358
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Tested-by: Seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-by: Kevin Huang (Eng-SW) <kevinh@nvidia.com>
Diffstat (limited to 'drivers')
-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*/ |