diff options
author | Sachit Kadle <skadle@nvidia.com> | 2016-09-14 14:45:38 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2016-10-21 14:23:53 -0400 |
commit | ab593b9ccd3132404406ef6340348fdb28c23bf0 (patch) | |
tree | 394624e853fdb5e7fbe380c1ee8f4f2fca9fe24d /drivers/gpu/nvgpu/gk20a/fence_gk20a.c | |
parent | 55dba9f1a91a6f94fb63090880ae28eedf4189a2 (diff) |
gpu: nvgpu: make deferred clean-up conditional
This change makes the invocation of the deferred job clean-up
mechanism conditional. For submissions that require job tracking,
deferred clean-up is only required if any of the following
conditions are met:
1) Channel's deterministic flag is not set
2) Rail-gating is enabled
3) Channel WDT is enabled
4) Buffer refcounting is enabled
5) Dependency on Sync Framework
In case deferred clean-up is not needed, we clean-up
a single job tracking resource in the submit path. For
deterministic channels, we do not allow deferred clean-up to
occur and fail any submits that require it.
Bug 1795076
Change-Id: I4021dffe8a71aa58f12db6b58518d3f4021f3313
Signed-off-by: Sachit Kadle <skadle@nvidia.com>
Reviewed-on: http://git-master/r/1220920
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
(cherry picked from commit b09f7589d5ad3c496e7350f1ed583a4fe2db574a)
Reviewed-on: http://git-master/r/1223941
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/fence_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fence_gk20a.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fence_gk20a.c b/drivers/gpu/nvgpu/gk20a/fence_gk20a.c index 7228f6f7..4673f28c 100644 --- a/drivers/gpu/nvgpu/gk20a/fence_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fence_gk20a.c | |||
@@ -272,8 +272,24 @@ static int gk20a_syncpt_fence_wait(struct gk20a_fence *f, long timeout) | |||
272 | 272 | ||
273 | static bool gk20a_syncpt_fence_is_expired(struct gk20a_fence *f) | 273 | static bool gk20a_syncpt_fence_is_expired(struct gk20a_fence *f) |
274 | { | 274 | { |
275 | return nvhost_syncpt_is_expired_ext(f->host1x_pdev, f->syncpt_id, | 275 | |
276 | f->syncpt_value); | 276 | /* |
277 | * In cases we don't register a notifier, we can't expect the | ||
278 | * syncpt value to be updated. For this case, we force a read | ||
279 | * of the value from HW, and then check for expiration. | ||
280 | */ | ||
281 | if (!nvhost_syncpt_is_expired_ext(f->host1x_pdev, f->syncpt_id, | ||
282 | f->syncpt_value)) { | ||
283 | u32 val; | ||
284 | |||
285 | if (!nvhost_syncpt_read_ext_check(f->host1x_pdev, | ||
286 | f->syncpt_id, &val)) { | ||
287 | return nvhost_syncpt_is_expired_ext(f->host1x_pdev, | ||
288 | f->syncpt_id, f->syncpt_value); | ||
289 | } | ||
290 | } | ||
291 | |||
292 | return true; | ||
277 | } | 293 | } |
278 | 294 | ||
279 | static const struct gk20a_fence_ops gk20a_syncpt_fence_ops = { | 295 | static const struct gk20a_fence_ops gk20a_syncpt_fence_ops = { |