diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2018-04-23 07:18:33 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-05-16 06:10:37 -0400 |
commit | 0301cc01f6cbfb752290bc63a2ed4eb19129c7c1 (patch) | |
tree | fafe6562b8251c88f130f6368b9a41eb622669b9 /drivers/gpu/nvgpu/gk20a/gk20a.h | |
parent | 4ff87c7d35f34e01e138cbedb143a37ff32a8926 (diff) |
gpu: nvgpu: add HAL to insert semaphore commands
Add below new HALs
gops.fifo.add_sema_cmd() to insert HOST semaphore acquire/release methods
gops.fifo.get_sema_wait_cmd_size() to get size of acquire command buffer
gops.fifo.get_sema_incr_cmd_size() to get size of release command buffer
Separate out new API gk20a_fifo_add_sema_cmd() to implement semaphore acquire/
release sequence and set it to gops.fifo.add_sema_cmd()
Add gk20a_fifo_get_sema_wait_cmd_size() and gk20a_fifo_get_sema_incr_cmd_size()
to return respective command buffer sizes
Jira NVGPUT-16
Change-Id: Ia81a50921a6a56ebc237f2f90b137268aaa2d749
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1704490
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.h b/drivers/gpu/nvgpu/gk20a/gk20a.h index 23e85ee9..17f662df 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/gk20a.h | |||
@@ -678,6 +678,12 @@ struct gpu_ops { | |||
678 | u32 count, u32 buffer_index); | 678 | u32 count, u32 buffer_index); |
679 | int (*runlist_wait_pending)(struct gk20a *g, u32 runlist_id); | 679 | int (*runlist_wait_pending)(struct gk20a *g, u32 runlist_id); |
680 | void (*ring_channel_doorbell)(struct channel_gk20a *c); | 680 | void (*ring_channel_doorbell)(struct channel_gk20a *c); |
681 | u32 (*get_sema_wait_cmd_size)(void); | ||
682 | u32 (*get_sema_incr_cmd_size)(void); | ||
683 | void (*add_sema_cmd)(struct gk20a *g, | ||
684 | struct nvgpu_semaphore *s, u64 sema_va, | ||
685 | struct priv_cmd_entry *cmd, | ||
686 | u32 off, bool acquire, bool wfi); | ||
681 | } fifo; | 687 | } fifo; |
682 | struct pmu_v { | 688 | struct pmu_v { |
683 | u32 (*get_pmu_cmdline_args_size)(struct nvgpu_pmu *pmu); | 689 | u32 (*get_pmu_cmdline_args_size)(struct nvgpu_pmu *pmu); |