summaryrefslogtreecommitdiff
path: root/src/tegra_stream.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/tegra_stream.c')
-rw-r--r--src/tegra_stream.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/tegra_stream.c b/src/tegra_stream.c
index a623fa3..03b4f29 100644
--- a/src/tegra_stream.c
+++ b/src/tegra_stream.c
@@ -73,7 +73,6 @@ void tegra_stream_destroy(struct tegra_stream *stream)
int tegra_stream_flush(struct tegra_stream *stream)
{
- struct drm_tegra_fence *fence;
int result = 0;
if (!stream)
@@ -89,21 +88,19 @@ int tegra_stream_flush(struct tegra_stream *stream)
goto cleanup;
}
- result = drm_tegra_job_submit(stream->job, &fence);
+ result = drm_tegra_job_submit(stream->job, 1000);
if (result != 0) {
ErrorMsg("drm_tegra_job_submit() failed %d\n", result);
result = -1;
goto cleanup;
}
- result = drm_tegra_fence_wait_timeout(fence, 1000);
+ result = drm_tegra_job_wait(stream->job);
if (result != 0) {
ErrorMsg("drm_tegra_fence_wait_timeout() failed %d\n", result);
result = -1;
}
- drm_tegra_fence_free(fence);
-
cleanup:
drm_tegra_job_free(stream->job);
@@ -265,8 +262,8 @@ int tegra_stream_end(struct tegra_stream *stream)
return -1;
}
- ret = drm_tegra_pushbuf_sync(stream->buffer.pushbuf,
- DRM_TEGRA_SYNCPT_COND_OP_DONE);
+ ret = drm_tegra_pushbuf_sync(stream->buffer.pushbuf, 0, 1,
+ DRM_TEGRA_SYNC_COND_OP_DONE);
if (ret != 0) {
stream->status = TEGRADRM_STREAM_CONSTRUCTION_FAILED;
ErrorMsg("drm_tegra_pushbuf_sync() failed %d\n", ret);