pipeline: ipu3: Set bytesused before queuing parameters buffer
The bytesused value for the parameters buffer is initialized to 0 and never set. The V4L2 API specification indicates that, for an output video device, the driver will set the bytesused value to the size of the plane in that case. The videobuf2 framework does so, but considers this as deprecated and prints a warning: [ 54.375534] use of bytesused == 0 is deprecated and will be removed in the future, [ 54.388026] use the actual size instead. Fix it by setting bytesused to the correct value before queuing the parameters buffer. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> Tested-by: Naushir Patuck <naush@raspberrypi.com>
This commit is contained in:
parent
c20d3f5575
commit
3338958822
1 changed files with 4 additions and 0 deletions
|
@ -11,6 +11,8 @@
|
||||||
#include <queue>
|
#include <queue>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
#include <linux/intel-ipu3.h>
|
||||||
|
|
||||||
#include <libcamera/base/log.h>
|
#include <libcamera/base/log.h>
|
||||||
#include <libcamera/base/utils.h>
|
#include <libcamera/base/utils.h>
|
||||||
|
|
||||||
|
@ -1298,6 +1300,8 @@ void IPU3CameraData::paramsBufferReady(unsigned int id)
|
||||||
imgu_->viewfinder_->queueBuffer(outbuffer);
|
imgu_->viewfinder_->queueBuffer(outbuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
info->paramBuffer->_d()->metadata().planes()[0].bytesused =
|
||||||
|
sizeof(struct ipu3_uapi_params);
|
||||||
imgu_->param_->queueBuffer(info->paramBuffer);
|
imgu_->param_->queueBuffer(info->paramBuffer);
|
||||||
imgu_->stat_->queueBuffer(info->statBuffer);
|
imgu_->stat_->queueBuffer(info->statBuffer);
|
||||||
imgu_->input_->queueBuffer(info->rawBuffer);
|
imgu_->input_->queueBuffer(info->rawBuffer);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue