diff options
author | seshendra Gadagottu <sgadagottu@nvidia.com> | 2018-03-06 16:25:11 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-03-12 13:40:17 -0400 |
commit | 3df619f68afa6b23a33d7da072315755de38a30b (patch) | |
tree | df397177061e6c1f04ecba6959299504cbb9597c /drivers/gpu/nvgpu/gk20a | |
parent | 7a5a2fb75a7c4990939593437af72febf01b732d (diff) |
gpu: nvgpu: hal for syncpt_incr_per_release
Create hal to indicate syncpt increments per release.
Legacy chip uses 2 syncpt increments per release and gv1xx
onwards uses 1 syncpt increment per release.
Bug 2066025
Change-Id: I5d6d0a5368ef561f8150fbb7120181f49f6e338b
Signed-off-by: seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1669817
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c | 5 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | 5 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fifo_gk20a.h | 1 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.h | 1 |
4 files changed, 10 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c index 85c55955..45d9ae9c 100644 --- a/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/channel_sync_gk20a.c | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * GK20A Channel Synchronization Abstraction | 2 | * GK20A Channel Synchronization Abstraction |
3 | * | 3 | * |
4 | * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved. | 4 | * Copyright (c) 2014-2018, NVIDIA CORPORATION. All rights reserved. |
5 | * | 5 | * |
6 | * Permission is hereby granted, free of charge, to any person obtaining a | 6 | * Permission is hereby granted, free of charge, to any person obtaining a |
7 | * copy of this software and associated documentation files (the "Software"), | 7 | * copy of this software and associated documentation files (the "Software"), |
@@ -194,7 +194,8 @@ static int __gk20a_channel_syncpt_incr(struct gk20a_channel_sync *s, | |||
194 | c->g->ops.fifo.add_syncpt_incr_cmd(c->g, wfi_cmd, | 194 | c->g->ops.fifo.add_syncpt_incr_cmd(c->g, wfi_cmd, |
195 | incr_cmd, sp->id, sp->syncpt_buf.gpu_va); | 195 | incr_cmd, sp->id, sp->syncpt_buf.gpu_va); |
196 | 196 | ||
197 | thresh = nvgpu_nvhost_syncpt_incr_max_ext(sp->nvhost_dev, sp->id, 2); | 197 | thresh = nvgpu_nvhost_syncpt_incr_max_ext(sp->nvhost_dev, sp->id, |
198 | c->g->ops.fifo.get_syncpt_incr_per_release()); | ||
198 | 199 | ||
199 | if (register_irq) { | 200 | if (register_irq) { |
200 | struct channel_gk20a *referenced = gk20a_channel_get(c); | 201 | struct channel_gk20a *referenced = gk20a_channel_get(c); |
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c index 96317520..0def724d 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | |||
@@ -3999,6 +3999,11 @@ u32 gk20a_fifo_get_syncpt_wait_cmd_size(void) | |||
3999 | return 4; | 3999 | return 4; |
4000 | } | 4000 | } |
4001 | 4001 | ||
4002 | u32 gk20a_fifo_get_syncpt_incr_per_release(void) | ||
4003 | { | ||
4004 | return 2; | ||
4005 | } | ||
4006 | |||
4002 | void gk20a_fifo_add_syncpt_incr_cmd(struct gk20a *g, | 4007 | void gk20a_fifo_add_syncpt_incr_cmd(struct gk20a *g, |
4003 | bool wfi_cmd, struct priv_cmd_entry *cmd, | 4008 | bool wfi_cmd, struct priv_cmd_entry *cmd, |
4004 | u32 id, u64 gpu_va) | 4009 | u32 id, u64 gpu_va) |
diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h index a925b1e2..8a3bd4b9 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.h | |||
@@ -406,6 +406,7 @@ void gk20a_fifo_add_syncpt_wait_cmd(struct gk20a *g, | |||
406 | struct priv_cmd_entry *cmd, u32 off, | 406 | struct priv_cmd_entry *cmd, u32 off, |
407 | u32 id, u32 thresh, u64 gpu_va); | 407 | u32 id, u32 thresh, u64 gpu_va); |
408 | u32 gk20a_fifo_get_syncpt_wait_cmd_size(void); | 408 | u32 gk20a_fifo_get_syncpt_wait_cmd_size(void); |
409 | u32 gk20a_fifo_get_syncpt_incr_per_release(void); | ||
409 | void gk20a_fifo_add_syncpt_incr_cmd(struct gk20a *g, | 410 | void gk20a_fifo_add_syncpt_incr_cmd(struct gk20a *g, |
410 | bool wfi_cmd, struct priv_cmd_entry *cmd, | 411 | bool wfi_cmd, struct priv_cmd_entry *cmd, |
411 | u32 id, u64 gpu_va); | 412 | u32 id, u64 gpu_va); |
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index 4ebdb6a4..ea55c664 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h | |||
@@ -631,6 +631,7 @@ struct gpu_ops { | |||
631 | u32 (*get_syncpt_incr_cmd_size)(bool wfi_cmd); | 631 | u32 (*get_syncpt_incr_cmd_size)(bool wfi_cmd); |
632 | int (*get_sync_ro_map)(struct vm_gk20a *vm, | 632 | int (*get_sync_ro_map)(struct vm_gk20a *vm, |
633 | u64 *base_gpuva, u32 *sync_size); | 633 | u64 *base_gpuva, u32 *sync_size); |
634 | u32 (*get_syncpt_incr_per_release)(void); | ||
634 | #endif | 635 | #endif |
635 | } fifo; | 636 | } fifo; |
636 | struct pmu_v { | 637 | struct pmu_v { |