msm: vidc: Do not set defer flag again
Initially MSM_VIDC_FLAG_DEFERRED flag will be set to all
the buffers that are queued by client and the flag will be
removed before submitting the buffer to video firmware.
In batch mode driver will hold (or defer submission to firmware)
the buffers until full batch size buffers are queued by client.
While deferring driver is setting the flag again to the buffer
(which is wrong). There is release buffer reference (RBR) event
from firmware which will submit the buffer if it is found to be
queued by the client already and this buffer submission will clear
the flag. There is a race condition due to RBR event as below,
Client queued the buffer and driver set the flag initially.
Firmware raised RBR event which will submit the buffer and clears
the flag. Now driver will check the batch condition and decides
to defer the buffer by setting the flag again. After full batch
size count of buffers queued by the client, driver will try to
submit all the buffers at once which will submit the buffer (which
was already submitted as part of RBR event processing) again to
firmware and resulting video failure. Resolve the issue by not
setting the flag again while deciding to defer a buffer.
Change-Id: I19f7aa0ef2527b5948174476d0897cb46c6f134e
Signed-off-by:
Maheshwar Ajja <majja@codeaurora.org>
Loading
Please register or sign in to comment