diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/sync_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/sync_gk20a.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/sync_gk20a.c b/drivers/gpu/nvgpu/gk20a/sync_gk20a.c index e7bacac8..edfe3deb 100644 --- a/drivers/gpu/nvgpu/gk20a/sync_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/sync_gk20a.c | |||
@@ -45,7 +45,7 @@ struct gk20a_sync_timeline { | |||
45 | struct gk20a_sync_pt { | 45 | struct gk20a_sync_pt { |
46 | struct kref refcount; | 46 | struct kref refcount; |
47 | u32 thresh; | 47 | u32 thresh; |
48 | struct gk20a_semaphore *sema; | 48 | struct nvgpu_semaphore *sema; |
49 | struct gk20a_sync_timeline *obj; | 49 | struct gk20a_sync_timeline *obj; |
50 | struct sync_fence *dep; | 50 | struct sync_fence *dep; |
51 | ktime_t dep_timestamp; | 51 | ktime_t dep_timestamp; |
@@ -110,7 +110,7 @@ int gk20a_is_sema_backed_sync_fence(struct sync_fence *fence) | |||
110 | return 0; | 110 | return 0; |
111 | } | 111 | } |
112 | 112 | ||
113 | struct gk20a_semaphore *gk20a_sync_fence_get_sema(struct sync_fence *f) | 113 | struct nvgpu_semaphore *gk20a_sync_fence_get_sema(struct sync_fence *f) |
114 | { | 114 | { |
115 | struct sync_pt *spt; | 115 | struct sync_pt *spt; |
116 | struct gk20a_sync_pt_inst *pti; | 116 | struct gk20a_sync_pt_inst *pti; |
@@ -208,13 +208,13 @@ static void gk20a_sync_pt_free_shared(struct kref *ref) | |||
208 | if (pt->dep) | 208 | if (pt->dep) |
209 | sync_fence_put(pt->dep); | 209 | sync_fence_put(pt->dep); |
210 | if (pt->sema) | 210 | if (pt->sema) |
211 | gk20a_semaphore_put(pt->sema); | 211 | nvgpu_semaphore_put(pt->sema); |
212 | kfree(pt); | 212 | kfree(pt); |
213 | } | 213 | } |
214 | 214 | ||
215 | static struct gk20a_sync_pt *gk20a_sync_pt_create_shared( | 215 | static struct gk20a_sync_pt *gk20a_sync_pt_create_shared( |
216 | struct gk20a_sync_timeline *obj, | 216 | struct gk20a_sync_timeline *obj, |
217 | struct gk20a_semaphore *sema, | 217 | struct nvgpu_semaphore *sema, |
218 | struct sync_fence *dependency) | 218 | struct sync_fence *dependency) |
219 | { | 219 | { |
220 | struct gk20a_sync_pt *shared; | 220 | struct gk20a_sync_pt *shared; |
@@ -244,14 +244,14 @@ static struct gk20a_sync_pt *gk20a_sync_pt_create_shared( | |||
244 | 244 | ||
245 | spin_lock_init(&shared->lock); | 245 | spin_lock_init(&shared->lock); |
246 | 246 | ||
247 | gk20a_semaphore_get(sema); | 247 | nvgpu_semaphore_get(sema); |
248 | 248 | ||
249 | return shared; | 249 | return shared; |
250 | } | 250 | } |
251 | 251 | ||
252 | static struct sync_pt *gk20a_sync_pt_create_inst( | 252 | static struct sync_pt *gk20a_sync_pt_create_inst( |
253 | struct gk20a_sync_timeline *obj, | 253 | struct gk20a_sync_timeline *obj, |
254 | struct gk20a_semaphore *sema, | 254 | struct nvgpu_semaphore *sema, |
255 | struct sync_fence *dependency) | 255 | struct sync_fence *dependency) |
256 | { | 256 | { |
257 | struct gk20a_sync_pt_inst *pti; | 257 | struct gk20a_sync_pt_inst *pti; |
@@ -309,7 +309,7 @@ static int gk20a_sync_pt_has_signaled(struct sync_pt *sync_pt) | |||
309 | goto done; | 309 | goto done; |
310 | 310 | ||
311 | /* Acquired == not realeased yet == active == not signaled. */ | 311 | /* Acquired == not realeased yet == active == not signaled. */ |
312 | signaled = !gk20a_semaphore_is_acquired(pt->sema); | 312 | signaled = !nvgpu_semaphore_is_acquired(pt->sema); |
313 | 313 | ||
314 | if (signaled) { | 314 | if (signaled) { |
315 | /* Update min if necessary. */ | 315 | /* Update min if necessary. */ |
@@ -341,7 +341,7 @@ static int gk20a_sync_pt_has_signaled(struct sync_pt *sync_pt) | |||
341 | } | 341 | } |
342 | 342 | ||
343 | /* Release the semaphore to the pool. */ | 343 | /* Release the semaphore to the pool. */ |
344 | gk20a_semaphore_put(pt->sema); | 344 | nvgpu_semaphore_put(pt->sema); |
345 | pt->sema = NULL; | 345 | pt->sema = NULL; |
346 | } | 346 | } |
347 | done: | 347 | done: |
@@ -410,12 +410,12 @@ static void gk20a_sync_timeline_value_str(struct sync_timeline *timeline, | |||
410 | static void gk20a_sync_pt_value_str_for_sema(struct gk20a_sync_pt *pt, | 410 | static void gk20a_sync_pt_value_str_for_sema(struct gk20a_sync_pt *pt, |
411 | char *str, int size) | 411 | char *str, int size) |
412 | { | 412 | { |
413 | struct gk20a_semaphore *s = pt->sema; | 413 | struct nvgpu_semaphore *s = pt->sema; |
414 | 414 | ||
415 | snprintf(str, size, "S: c=%d [v=%u,r_v=%u]", | 415 | snprintf(str, size, "S: c=%d [v=%u,r_v=%u]", |
416 | s->hw_sema->ch->hw_chid, | 416 | s->hw_sema->ch->hw_chid, |
417 | gk20a_semaphore_get_value(s), | 417 | nvgpu_semaphore_get_value(s), |
418 | gk20a_semaphore_read(s)); | 418 | nvgpu_semaphore_read(s)); |
419 | } | 419 | } |
420 | 420 | ||
421 | static void gk20a_sync_pt_value_str(struct sync_pt *sync_pt, char *str, | 421 | static void gk20a_sync_pt_value_str(struct sync_pt *sync_pt, char *str, |
@@ -458,7 +458,7 @@ static int gk20a_sync_fill_driver_data(struct sync_pt *sync_pt, | |||
458 | } | 458 | } |
459 | 459 | ||
460 | static const struct sync_timeline_ops gk20a_sync_timeline_ops = { | 460 | static const struct sync_timeline_ops gk20a_sync_timeline_ops = { |
461 | .driver_name = "gk20a_semaphore", | 461 | .driver_name = "nvgpu_semaphore", |
462 | .dup = gk20a_sync_pt_dup_inst, | 462 | .dup = gk20a_sync_pt_dup_inst, |
463 | .has_signaled = gk20a_sync_pt_has_signaled, | 463 | .has_signaled = gk20a_sync_pt_has_signaled, |
464 | .compare = gk20a_sync_pt_compare, | 464 | .compare = gk20a_sync_pt_compare, |
@@ -508,7 +508,7 @@ struct sync_timeline *gk20a_sync_timeline_create( | |||
508 | } | 508 | } |
509 | 509 | ||
510 | struct sync_fence *gk20a_sync_fence_create(struct sync_timeline *obj, | 510 | struct sync_fence *gk20a_sync_fence_create(struct sync_timeline *obj, |
511 | struct gk20a_semaphore *sema, | 511 | struct nvgpu_semaphore *sema, |
512 | struct sync_fence *dependency, | 512 | struct sync_fence *dependency, |
513 | const char *fmt, ...) | 513 | const char *fmt, ...) |
514 | { | 514 | { |