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

Commit 90a74600 authored by Saurabh Shah's avatar Saurabh Shah Committed by Marissa Wall
Browse files

sync: store the num_fences from first SYNC_IOC_FILE_INFO

Fixes a bug with the signal time of devices using the
modern sync file interface. The bug only affects kernels running
an Android kernel 4.9 and later.

b/63395253

Test: tests/sync_test.cpp

Change-Id: I6fb00bcb8e16a3268c357153edd8e35a44546caa
parent 22a10f67
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -217,6 +217,8 @@ static struct sync_file_info *modern_sync_file_info(int fd)
                  local_info.num_fences * sizeof(struct sync_fence_info));
    if (!info)
        return NULL;

    info->num_fences = local_info.num_fences;
    info->sync_fence_info = (__u64)(uintptr_t)(info + 1);

    err = ioctl(fd, SYNC_IOC_FILE_INFO, info);