ipa: ipu3: Clear incoming parameter use flags
The incoming params buffer may contain uninitialised data, or the parameters of previously queued frames. Clearing the entire buffer may be an expensive operation, and the kernel will only read from structures which have their associated use-flag set. It is the responsibility of the algorithms to set the use flags accordingly for any data structure they update during prepare(). Clear the use flags of the parameter buffer before passing the buffer to the algorithms during their prepare() operations. Reviewed-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> Tested-by: Jean-Michel Hautbois <jeanmichel.hautbois@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
This commit is contained in:
@@ -457,6 +457,17 @@ void IPAIPU3::processControls([[maybe_unused]] unsigned int frame,
|
||||
|
||||
void IPAIPU3::fillParams(unsigned int frame, ipu3_uapi_params *params)
|
||||
{
|
||||
/*
|
||||
* The incoming params buffer may contain uninitialised data, or the
|
||||
* parameters of previously queued frames. Clearing the entire buffer
|
||||
* may be an expensive operation, and the kernel will only read from
|
||||
* structures which have their associated use-flag set.
|
||||
*
|
||||
* It is the responsibility of the algorithms to set the use flags
|
||||
* accordingly for any data structure they update during prepare().
|
||||
*/
|
||||
params->use = {};
|
||||
|
||||
for (auto const &algo : algorithms_)
|
||||
algo->prepare(context_, params);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user