diff options
author | Mirela Rabulea <mirela.rabulea@nxp.com> | 2019-10-24 12:49:04 +0300 |
---|---|---|
committer | Dong Aisheng <aisheng.dong@nxp.com> | 2019-11-25 16:02:49 +0800 |
commit | 3c10505cd7dd6de466ff50f83b5027dfdf8e91d0 (patch) | |
tree | ccf6c3a51cbb4397efcf92126c2a4cd7aa62b46f /Documentation/devicetree/bindings/media | |
parent | c211d5f46816c212058fa3f0b30ceb80329ff647 (diff) |
MLK-22835: mxc-jpeg: jpeg decoder stuck due to race condition
The race condition is on ctx->dht_needed, this variable indicates if the
decoder operates in one stage (decode) or two stages (inject default
Huffman table + decode).
While decoding the current buffer, and before the IP finishes it, a new
buffer in enqueued, jpeg parse begins, initializes ctx->dht_needed with
true, and does not get to finish parsing the jpeg headers. In the
meantime, the IP finishes decoding the current buffer and checks for
ctx->dht_needed, and believes it needs to run again the IP to finish
the job, which is wrong and gets the IP stuck.
This dht_needed property should be per buffer, not per context, so, add
a custom structure for the source buffer, struct mxc_jpeg_src_buf, and
don't forget to tell v4l2 core about its size, in mxc_jpeg_queue_init.
Signed-off-by: Mirela Rabulea <mirela.rabulea@nxp.com>
Reviewed-by: Robert Chiras <robert.chiras@nxp.com>
(cherry picked from commit 4601417e95d35e995e0d8347b8464090a511db0d)
Diffstat (limited to 'Documentation/devicetree/bindings/media')
0 files changed, 0 insertions, 0 deletions