Lines Matching refs:ret

203   int ret = Lock();  in Routine()  local
204 if (ret) { in Routine()
205 ALOGE("Failed to lock worker, %d", ret); in Routine()
220 ret = Unlock(); in Routine()
221 if (ret) { in Routine()
222 ALOGE("Failed to unlock worker, %d", ret); in Routine()
261 int ret = pthread_mutex_lock(&lock_); in ~DrmDisplayCompositor() local
262 if (ret) in ~DrmDisplayCompositor()
263 ALOGE("Failed to acquire compositor lock %d", ret); in ~DrmDisplayCompositor()
276 ret = pthread_mutex_unlock(&lock_); in ~DrmDisplayCompositor()
277 if (ret) in ~DrmDisplayCompositor()
278 ALOGE("Failed to acquire compositor lock %d", ret); in ~DrmDisplayCompositor()
287 int ret = pthread_mutex_init(&lock_, NULL); in Init() local
288 if (ret) { in Init()
289 ALOGE("Failed to initialize drm compositor lock %d\n", ret); in Init()
290 return ret; in Init()
292 ret = worker_.Init(); in Init()
293 if (ret) { in Init()
295 ALOGE("Failed to initialize compositor worker %d\n", ret); in Init()
296 return ret; in Init()
298 ret = frame_worker_.Init(); in Init()
299 if (ret) { in Init()
301 ALOGE("Failed to initialize frame worker %d\n", ret); in Init()
302 return ret; in Init()
337 int ret = pthread_mutex_lock(&lock_); in QueueComposition() local
338 if (ret) { in QueueComposition()
339 ALOGE("Failed to acquire compositor lock %d", ret); in QueueComposition()
340 return ret; in QueueComposition()
353 ret = pthread_mutex_unlock(&lock_); in QueueComposition()
354 if (ret) { in QueueComposition()
355 ALOGE("Failed to release compositor lock %d", ret); in QueueComposition()
356 return ret; in QueueComposition()
378 int ret = fb.WaitReleased(-1); in PrepareFramebuffer() local
379 if (ret) { in PrepareFramebuffer()
380 ALOGE("Failed to wait for framebuffer release %d", ret); in PrepareFramebuffer()
381 return ret; in PrepareFramebuffer()
384 std::tie(width, height, ret) = GetActiveModeResolution(); in PrepareFramebuffer()
385 if (ret) { in PrepareFramebuffer()
389 ret); in PrepareFramebuffer()
390 return ret; in PrepareFramebuffer()
405 ret = pre_comp_layer.buffer.ImportBuffer(fb.buffer()->handle, in PrepareFramebuffer()
407 if (ret) { in PrepareFramebuffer()
408 ALOGE("Failed to import framebuffer for display %d", ret); in PrepareFramebuffer()
409 return ret; in PrepareFramebuffer()
412 return ret; in PrepareFramebuffer()
416 int ret = 0; in ApplySquash() local
419 ret = PrepareFramebuffer(fb, display_comp); in ApplySquash()
420 if (ret) { in ApplySquash()
421 ALOGE("Failed to prepare framebuffer for squash %d", ret); in ApplySquash()
422 return ret; in ApplySquash()
426 ret = pre_compositor_->Composite(display_comp->layers().data(), in ApplySquash()
430 if (ret) { in ApplySquash()
432 return ret; in ApplySquash()
435 ret = display_comp->CreateNextTimelineFence(); in ApplySquash()
436 if (ret <= 0) { in ApplySquash()
437 ALOGE("Failed to create squash framebuffer release fence %d", ret); in ApplySquash()
438 return ret; in ApplySquash()
441 fb.set_release_fence_fd(ret); in ApplySquash()
449 int ret = 0; in ApplyPreComposite() local
452 ret = PrepareFramebuffer(fb, display_comp); in ApplyPreComposite()
453 if (ret) { in ApplyPreComposite()
454 ALOGE("Failed to prepare framebuffer for pre-composite %d", ret); in ApplyPreComposite()
455 return ret; in ApplyPreComposite()
459 ret = pre_compositor_->Composite(display_comp->layers().data(), in ApplyPreComposite()
463 if (ret) { in ApplyPreComposite()
465 return ret; in ApplyPreComposite()
468 ret = display_comp->CreateNextTimelineFence(); in ApplyPreComposite()
469 if (ret <= 0) { in ApplyPreComposite()
470 ALOGE("Failed to create pre-composite framebuffer release fence %d", ret); in ApplyPreComposite()
471 return ret; in ApplyPreComposite()
474 fb.set_release_fence_fd(ret); in ApplyPreComposite()
487 int ret; in DisablePlanes() local
492 ret = drmModeAtomicAddProperty(pset, plane->id(), in DisablePlanes()
496 if (ret) { in DisablePlanes()
499 return ret; in DisablePlanes()
503 ret = drmModeAtomicCommit(drm_->fd(), pset, 0, drm_); in DisablePlanes()
504 if (ret) { in DisablePlanes()
505 ALOGE("Failed to commit pset ret=%d\n", ret); in DisablePlanes()
507 return ret; in DisablePlanes()
515 int ret = 0; in PrepareFrame() local
528 ret = ApplySquash(display_comp); in PrepareFrame()
529 if (ret) in PrepareFrame()
530 return ret; in PrepareFrame()
539 ret = squash_layer.buffer.ImportBuffer(fb.buffer()->handle, in PrepareFrame()
541 if (ret) { in PrepareFrame()
542 ALOGE("Failed to import old squashed framebuffer %d", ret); in PrepareFrame()
543 return ret; in PrepareFrame()
551 ret = display_comp->CreateNextTimelineFence(); in PrepareFrame()
553 if (ret <= 0) { in PrepareFrame()
554 ALOGE("Failed to create squash framebuffer release fence %d", ret); in PrepareFrame()
555 return ret; in PrepareFrame()
558 fb.set_release_fence_fd(ret); in PrepareFrame()
559 ret = 0; in PrepareFrame()
566 ret = ApplyPreComposite(display_comp); in PrepareFrame()
567 if (ret) in PrepareFrame()
568 return ret; in PrepareFrame()
599 return ret; in PrepareFrame()
606 int ret = 0; in CommitFrame() local
632 ret = drmModeAtomicAddProperty(pset, crtc->id(), crtc->mode_property().id(), in CommitFrame()
637 if (ret) { in CommitFrame()
640 return ret; in CommitFrame()
674 ret = sync_wait(acquire_fence, fence_timeout); in CommitFrame()
675 if (ret) in CommitFrame()
677 acquire_fence, i, ret, total_fence_timeout); in CommitFrame()
679 if (ret) { in CommitFrame()
680 ALOGE("Failed to wait for acquire %d/%d", acquire_fence, ret); in CommitFrame()
709 ret = drmModeAtomicAddProperty(pset, plane->id(), in CommitFrame()
713 if (ret) { in CommitFrame()
723 ret = -EINVAL; in CommitFrame()
730 ret = -EINVAL; in CommitFrame()
734 ret = drmModeAtomicAddProperty(pset, plane->id(), in CommitFrame()
736 ret |= drmModeAtomicAddProperty(pset, plane->id(), in CommitFrame()
738 ret |= drmModeAtomicAddProperty(pset, plane->id(), in CommitFrame()
741 ret |= drmModeAtomicAddProperty(pset, plane->id(), in CommitFrame()
744 ret |= drmModeAtomicAddProperty( in CommitFrame()
747 ret |= drmModeAtomicAddProperty( in CommitFrame()
750 ret |= drmModeAtomicAddProperty(pset, plane->id(), in CommitFrame()
753 ret |= drmModeAtomicAddProperty(pset, plane->id(), in CommitFrame()
756 ret |= drmModeAtomicAddProperty( in CommitFrame()
759 ret |= drmModeAtomicAddProperty( in CommitFrame()
762 if (ret) { in CommitFrame()
768 ret = drmModeAtomicAddProperty(pset, plane->id(), in CommitFrame()
771 if (ret) { in CommitFrame()
779 ret = drmModeAtomicAddProperty(pset, plane->id(), in CommitFrame()
782 if (ret) { in CommitFrame()
791 if (!ret) { in CommitFrame()
796 ret = drmModeAtomicCommit(drm_->fd(), pset, flags, drm_); in CommitFrame()
797 if (ret) { in CommitFrame()
799 ALOGI("Commit test pset failed ret=%d\n", ret); in CommitFrame()
801 ALOGE("Failed to commit pset ret=%d\n", ret); in CommitFrame()
803 return ret; in CommitFrame()
810 ret = drm_->DestroyPropertyBlob(mode_.old_blob_id); in CommitFrame()
811 if (ret) { in CommitFrame()
813 mode_.old_blob_id, ret); in CommitFrame()
814 return ret; in CommitFrame()
818 ret = ApplyDpms(display_comp); in CommitFrame()
819 if (ret) { in CommitFrame()
820 ALOGE("Failed to apply DPMS after modeset %d\n", ret); in CommitFrame()
821 return ret; in CommitFrame()
830 return ret; in CommitFrame()
841 int ret = drmModeConnectorSetProperty(drm_->fd(), conn->id(), prop.id(), in ApplyDpms() local
843 if (ret) { in ApplyDpms()
845 return ret; in ApplyDpms()
857 int ret = drm_->CreatePropertyBlob(&drm_mode, in CreateModeBlob() local
859 if (ret) { in CreateModeBlob()
860 ALOGE("Failed to create mode property blob %d", ret); in CreateModeBlob()
861 return std::make_tuple(ret, 0); in CreateModeBlob()
864 return std::make_tuple(ret, id); in CreateModeBlob()
869 int ret = lock.Lock(); in ClearDisplay() local
870 if (ret) in ClearDisplay()
886 int ret = status; in ApplyFrame() local
888 if (!ret) in ApplyFrame()
889 ret = CommitFrame(composition.get(), false); in ApplyFrame()
891 if (ret) { in ApplyFrame()
903 ret = pthread_mutex_lock(&lock_); in ApplyFrame()
904 if (ret) in ApplyFrame()
909 if (!ret) in ApplyFrame()
910 ret = pthread_mutex_unlock(&lock_); in ApplyFrame()
911 if (ret) in ApplyFrame()
920 int ret = pre_compositor_->Init(); in Composite() local
921 if (ret) { in Composite()
922 ALOGE("Failed to initialize OpenGL compositor %d", ret); in Composite()
923 return ret; in Composite()
927 int ret = pthread_mutex_lock(&lock_); in Composite() local
928 if (ret) { in Composite()
929 ALOGE("Failed to acquire compositor lock %d", ret); in Composite()
930 return ret; in Composite()
933 ret = pthread_mutex_unlock(&lock_); in Composite()
934 if (ret) in Composite()
935 ALOGE("Failed to release compositor lock %d", ret); in Composite()
936 return ret; in Composite()
944 ret = pthread_mutex_unlock(&lock_); in Composite()
945 if (ret) { in Composite()
946 ALOGE("Failed to release compositor lock %d", ret); in Composite()
947 return ret; in Composite()
952 ret = PrepareFrame(composition.get()); in Composite()
953 if (ret) { in Composite()
955 return ret; in Composite()
961 ret = CommitFrame(composition.get(), true); in Composite()
962 if (ret) in Composite()
964 use_hw_overlays_ = !ret; in Composite()
972 ret = SquashFrame(composition.get(), squashed.get()); in Composite()
973 if (!ret) { in Composite()
981 return ret; in Composite()
984 frame_worker_.QueueFrame(std::move(composition), ret); in Composite()
987 ret = ApplyDpms(composition.get()); in Composite()
988 if (ret) in Composite()
990 return ret; in Composite()
995 std::tie(ret, mode_.blob_id) = CreateModeBlob(mode_.mode); in Composite()
996 if (ret) { in Composite()
998 return ret; in Composite()
1007 return ret; in Composite()
1011 int ret = pthread_mutex_lock(&lock_); in HaveQueuedComposites() local
1012 if (ret) { in HaveQueuedComposites()
1013 ALOGE("Failed to acquire compositor lock %d", ret); in HaveQueuedComposites()
1019 ret = pthread_mutex_unlock(&lock_); in HaveQueuedComposites()
1020 if (ret) { in HaveQueuedComposites()
1021 ALOGE("Failed to release compositor lock %d", ret); in HaveQueuedComposites()
1030 int ret = lock.Lock(); in SquashAll() local
1031 if (ret) in SquashAll()
1032 return ret; in SquashAll()
1038 ret = SquashFrame(active_composition_.get(), comp.get()); in SquashAll()
1043 if (!ret) in SquashAll()
1046 return ret; in SquashAll()
1071 int ret = dst->Init(drm_, src->crtc(), src->importer(), src->planner(), in SquashFrame() local
1073 if (ret) { in SquashFrame()
1074 ALOGE("Failed to init squash all composition %d", ret); in SquashFrame()
1075 return ret; in SquashFrame()
1085 ret = -EINVAL; in SquashFrame()
1099 ret = -ENOTSUP; in SquashFrame()
1118 ret = dst->SetLayers(dst_layers.data(), dst_layers.size(), false); in SquashFrame()
1119 if (ret) { in SquashFrame()
1120 ALOGE("Failed to set layers for squash all composition %d", ret); in SquashFrame()
1124 ret = dst->AddPlaneComposition(std::move(squashed_comp)); in SquashFrame()
1125 if (ret) { in SquashFrame()
1126 ALOGE("Failed to add squashed plane composition %d", ret); in SquashFrame()
1130 ret = dst->FinalizeComposition(); in SquashFrame()
1131 if (ret) { in SquashFrame()
1132 ALOGE("Failed to plan for squash all composition %d", ret); in SquashFrame()
1136 ret = ApplyPreComposite(dst); in SquashFrame()
1137 if (ret) { in SquashFrame()
1138 ALOGE("Failed to pre-composite for squash all composition %d", ret); in SquashFrame()
1169 return ret; in SquashFrame()
1173 int ret = pthread_mutex_lock(&lock_); in Dump() local
1174 if (ret) in Dump()
1181 ret = clock_gettime(CLOCK_MONOTONIC, &ts); in Dump()
1182 if (ret) { in Dump()