diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2018-02-28 06:56:36 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-03-01 16:53:28 -0500 |
commit | df2100018db1dba730937fe76464a8edf8ebf5dc (patch) | |
tree | 016ba84823e0752f665e3b67e569b8ef146ccfc6 /drivers/gpu/nvgpu/common/linux/nvhost.c | |
parent | aa1da74a75aca5d85d1a78546fec381423bf5836 (diff) |
gpu: nvgpu: allocate separate client managed syncpoint for User
We right now allocate a nvgpu managed syncpoint in c->sync and share
that with user space
But to avoid conflicts between user space and kernel space increments
allocate a separate "client managed" syncpoint for User space in c->user_sync
Add new API nvgpu_nvhost_get_syncpt_client_managed() to request a client managed
syncpoint from nvhost.
Note that nvhost/nvgpu do not keep track of MAX/threshold value of this syncpoint
Update gk20a_channel_syncpt_create() to receive a flag to indicate whether a
User space syncpoint is required or not
Unset NVGPU_SUPPORT_USER_SYNCPOINT for gp10b since we don't want to allocate
double syncpoints per channel on that platform
For gv11b, once we move to use user space submits, support for c->sync will be
dropped so we keep using only one syncpoint per channel
Bug 200326065
Jira NVGPU-179
Change-Id: I78d94de4276db1c897ea2a4fe4c2db8b2a179722
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1665828
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/nvhost.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/nvhost.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/nvhost.c b/drivers/gpu/nvgpu/common/linux/nvhost.c index 94bbfd70..a76953e3 100644 --- a/drivers/gpu/nvgpu/common/linux/nvhost.c +++ b/drivers/gpu/nvgpu/common/linux/nvhost.c | |||
@@ -138,6 +138,14 @@ u32 nvgpu_nvhost_get_syncpt_host_managed( | |||
138 | param, syncpt_name); | 138 | param, syncpt_name); |
139 | } | 139 | } |
140 | 140 | ||
141 | u32 nvgpu_nvhost_get_syncpt_client_managed( | ||
142 | struct nvgpu_nvhost_dev *nvhost_dev, | ||
143 | const char *syncpt_name) | ||
144 | { | ||
145 | return nvhost_get_syncpt_client_managed(nvhost_dev->host1x_pdev, | ||
146 | syncpt_name); | ||
147 | } | ||
148 | |||
141 | int nvgpu_nvhost_syncpt_wait_timeout_ext( | 149 | int nvgpu_nvhost_syncpt_wait_timeout_ext( |
142 | struct nvgpu_nvhost_dev *nvhost_dev, u32 id, | 150 | struct nvgpu_nvhost_dev *nvhost_dev, u32 id, |
143 | u32 thresh, u32 timeout, u32 *value, struct timespec *ts) | 151 | u32 thresh, u32 timeout, u32 *value, struct timespec *ts) |