diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/sync_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/sync_gk20a.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/sync_gk20a.c b/drivers/gpu/nvgpu/gk20a/sync_gk20a.c index a8600bce..56c90da7 100644 --- a/drivers/gpu/nvgpu/gk20a/sync_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/sync_gk20a.c | |||
@@ -32,6 +32,7 @@ | |||
32 | #include <nvgpu/semaphore.h> | 32 | #include <nvgpu/semaphore.h> |
33 | #include <nvgpu/bug.h> | 33 | #include <nvgpu/bug.h> |
34 | #include <nvgpu/kref.h> | 34 | #include <nvgpu/kref.h> |
35 | #include "../common/linux/channel.h" | ||
35 | 36 | ||
36 | #include "../drivers/staging/android/sync.h" | 37 | #include "../drivers/staging/android/sync.h" |
37 | 38 | ||
@@ -373,15 +374,9 @@ void gk20a_sync_timeline_destroy(struct sync_timeline *timeline) | |||
373 | } | 374 | } |
374 | 375 | ||
375 | struct sync_timeline *gk20a_sync_timeline_create( | 376 | struct sync_timeline *gk20a_sync_timeline_create( |
376 | const char *fmt, ...) | 377 | const char *name) |
377 | { | 378 | { |
378 | struct gk20a_sync_timeline *obj; | 379 | struct gk20a_sync_timeline *obj; |
379 | char name[30]; | ||
380 | va_list args; | ||
381 | |||
382 | va_start(args, fmt); | ||
383 | vsnprintf(name, sizeof(name), fmt, args); | ||
384 | va_end(args); | ||
385 | 380 | ||
386 | obj = (struct gk20a_sync_timeline *) | 381 | obj = (struct gk20a_sync_timeline *) |
387 | sync_timeline_create(&gk20a_sync_timeline_ops, | 382 | sync_timeline_create(&gk20a_sync_timeline_ops, |
@@ -395,8 +390,7 @@ struct sync_timeline *gk20a_sync_timeline_create( | |||
395 | } | 390 | } |
396 | 391 | ||
397 | struct sync_fence *gk20a_sync_fence_create( | 392 | struct sync_fence *gk20a_sync_fence_create( |
398 | struct gk20a *g, | 393 | struct channel_gk20a *c, |
399 | struct sync_timeline *obj, | ||
400 | struct nvgpu_semaphore *sema, | 394 | struct nvgpu_semaphore *sema, |
401 | const char *fmt, ...) | 395 | const char *fmt, ...) |
402 | { | 396 | { |
@@ -404,7 +398,15 @@ struct sync_fence *gk20a_sync_fence_create( | |||
404 | va_list args; | 398 | va_list args; |
405 | struct sync_pt *pt; | 399 | struct sync_pt *pt; |
406 | struct sync_fence *fence; | 400 | struct sync_fence *fence; |
407 | struct gk20a_sync_timeline *timeline = to_gk20a_timeline(obj); | 401 | struct gk20a *g = c->g; |
402 | |||
403 | struct nvgpu_channel_linux *os_channel_priv = c->os_priv; | ||
404 | struct nvgpu_os_fence_framework *fence_framework = NULL; | ||
405 | struct gk20a_sync_timeline *timeline = NULL; | ||
406 | |||
407 | fence_framework = &os_channel_priv->fence_framework; | ||
408 | |||
409 | timeline = to_gk20a_timeline(fence_framework->timeline); | ||
408 | 410 | ||
409 | pt = gk20a_sync_pt_create_inst(g, timeline, sema); | 411 | pt = gk20a_sync_pt_create_inst(g, timeline, sema); |
410 | if (pt == NULL) | 412 | if (pt == NULL) |