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

Skip to content
Commit ad797e43 authored by Jeff Hugo's avatar Jeff Hugo Committed by Stephen Boyd
Browse files

msm: smd: add smd_write_segment_avail()



Packet based SMD channels support transactions which allow the client to
send data payloads that exceed the size of the transport buffer.
Currently clients using this feature call smd_write_avail() to determine
how much free space is available in the buffer for the next segment of the
payload.

This causes inefficencies for the client, as smd_write_avail()
reserves SMD_HEADER_SIZE bytes from the client under the assumption that
a transport level header needs to be written to the transport buffer.  If
the transaction is already started, this assumption becomes incorrect and
space that could be used by the client to reduce the number of write in
some scenarios goes unused.

Add a function to the transaction API, smd_write_segment_avail(), which
is aware of if the transport level header needs to be written or not, and
return the correct ammount of usable space to the client.  Also, convert
the current clients of the transaction API to use
smd_write_segment_avail() as necessary.

CRs-Fixed: 471277
Change-Id: Ibdacd2572fa274c971eb679bc1d60eb2a7e1cab2
Signed-off-by: default avatarJeffrey Hugo <jhugo@codeaurora.org>
parent 61baacf7
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment