gxp: iif: simplify sync file install logic
- Allow installing multiple sync files (or multiple FDs)
To implement the retirement logic, we introduced the fence state to
track whether the fence has an outstanding sync file or not. It means
that we could have only file at the same time.
However, theoretically, installing multiple files won't harm the logic
of the fence and we can replace tracking the fence state with the
number of files which aren't yet closed. In other words, we can retire
the fence when that number becomes 0.
Having multiple files won't happen theoretically, but this is the same
way of how DMA fence is working with their sync_file.
- Doesn't check whether the fence is retired
The meaning of retirement is that the fence won't be accessed by the
user anymore. Therefore, creating a fence or installing a FD to the
retired fence won't happen and we don't need to check it.
By these improvement, we can simplify the sync file install logic, but
also remove the bug of calling sleeping functions while holding the
`outstanding_waiters_lock` spin lock.
Bug: 330284596
Signed-off-by: Aurora zuma pro automerger <[email protected]>
GitOrigin-RevId: 4fc4f18ad7cb3d74a1bc1622c488bbfca0eb4b4a
Change-Id: I87513ab4a33607f263bcaff37e4ea4b255bb89a8
3 files changed