diff options
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 = { |