Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1e9513e6 authored by Sungtak Lee's avatar Sungtak Lee
Browse files

media.c2 aidl: minor fixes

C2 AIDL fixes.
- Allow setting a new output surface as the same surface
- Remove verbose logs from sync fence
- return C2_BLOCKING instead of C2_TIMED_OUT from C2IgbaBlockPool

Bug: 254050314
Change-Id: I4e15853e7fed0dc803db1204c541e7936624cbd3
parent 977176c2
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -254,8 +254,7 @@ c2_status_t GraphicsTracker::configureGraphics(
        ret = igbp->getUniqueId(&bqId);
    }
    if (ret != ::android::OK ||
            prevCache->mGeneration == generation ||
            (bqId != 0 && prevCache->mBqId == bqId)) {
            prevCache->mGeneration == generation) {
        ALOGE("new surface configure fail due to wrong or same bqId or same generation:"
              "igbp(%d:%llu -> %llu), gen(%lu -> %lu)", (bool)igbp,
              (unsigned long long)prevCache->mBqId, (unsigned long long)bqId,
+5 −2
Original line number Diff line number Diff line
@@ -335,7 +335,8 @@ C2Fence _C2FenceFactory::CreateSyncFence(int fenceFd) {
            p.reset();
        }
    } else {
        ALOGE("Create sync fence from invalid fd");
        ALOGV("Create sync fence from invalid fd");
        return C2Fence();
    }
    return C2Fence(p);
}
@@ -531,7 +532,9 @@ C2Fence _C2FenceFactory::CreateFromNativeHandle(const native_handle_t* handle) {
            p = SyncFenceImpl::CreateFromNativeHandle(handle);
            break;
        default:
            ALOGD("Unsupported fence type %d", type);
            ALOGV("Unsupported fence type %d", type);
            // If this is malformed-handle close the handle here.
            (void) native_handle_close(handle);
            // return a null-fence in this case
            break;
    }
+1 −1
Original line number Diff line number Diff line
@@ -193,7 +193,7 @@ c2_status_t C2IgbaBlockPool::fetchGraphicBlock(
            width, height, format, usage, kBlockingFetchTimeoutNs, &origId, block, &fence);

    if (res == C2_BLOCKING) {
        return C2_TIMED_OUT;
        return C2_BLOCKING;
    }
    if (res != C2_OK) {
        return res;