summaryrefslogtreecommitdiff
path: root/test/ipa/libipa
diff options
context:
space:
mode:
authorJacopo Mondi <jacopo.mondi@ideasonboard.com>2024-10-16 16:00:13 +0200
committerJacopo Mondi <jacopo.mondi@ideasonboard.com>2024-10-30 16:56:53 +0100
commitc31050d2a77a7960282bce6b3f6efff06a718d1c (patch)
treee542ff2d11a82c78dd42857b96cafd1f10b1f725 /test/ipa/libipa
parente4edcf55ba4d5254973137107ae2b376f7635f45 (diff)
libipa: FCQueue: Make sure FrameContext#0 is initialized
Some IPA modules, like the RkISP1 one, call FCQueue::get(0) at IPA::start() time, before any frame context has been allocated with FCQueue::alloc() called at queueRequest() time. The FCQueue implementation aims to detect when a FrameContext is get() before it is alloc()-ated, Warns about it, and initializes the FrameContext before returning it. In case of frame#0, a get() preceding an alloc() call is not detected as the "frame == frameContext.frame" test returns success, as FrameContexts are zeroed by default. As a result, the first returned FrameContext is not initialized. Explicitly test for frame#0 to make sure the FrameContext is initialized if get(0) is called before alloc(0). To avoid re-initializing a frame context, in case alloc() has been called correctly before get(), introduce an "initialised" state variable that tracks the FrameContext initialisation state. Signed-off-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Reviewed-by: Daniel Scally <dan.scally@ideasonboard.com> Reviewed-by: Stefan Klug <stefan.klug@ideasonboard.com>
Diffstat (limited to 'test/ipa/libipa')
0 files changed, 0 insertions, 0 deletions