Message ID | 20221004222903.6393-4-laurent.pinchart@ideasonboard.com |
---|---|
State | Accepted |
Headers | show |
Series |
|
Related | show |
Hi Laurent Thank you for the patch On 10/5/22 3:59 AM, Laurent Pinchart via libcamera-devel wrote: > 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> > --- > src/libcamera/pipeline/rkisp1/rkisp1.cpp | 4 ++++ > 1 file changed, 4 insertions(+) > > diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp > index 25fbf9f1a0a9..455ee2a0a711 100644 > --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp > +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp > @@ -13,6 +13,7 @@ > #include <queue> > > #include <linux/media-bus-format.h> > +#include <linux/rkisp1-config.h> > > #include <libcamera/base/log.h> > #include <libcamera/base/utils.h> > @@ -32,6 +33,7 @@ > #include "libcamera/internal/camera_sensor.h" > #include "libcamera/internal/delayed_controls.h" > #include "libcamera/internal/device_enumerator.h" > +#include "libcamera/internal/framebuffer.h" > #include "libcamera/internal/ipa_manager.h" > #include "libcamera/internal/media_device.h" > #include "libcamera/internal/pipeline_handler.h" > @@ -362,6 +364,8 @@ void RkISP1CameraData::paramFilled(unsigned int frame) > if (!info) > return; > > + info->paramBuffer->_d()->metadata().planes()[0].bytesused = > + sizeof(struct rkisp1_params_cfg); > pipe->param_->queueBuffer(info->paramBuffer); > pipe->stat_->queueBuffer(info->statBuffer); >
diff --git a/src/libcamera/pipeline/rkisp1/rkisp1.cpp b/src/libcamera/pipeline/rkisp1/rkisp1.cpp index 25fbf9f1a0a9..455ee2a0a711 100644 --- a/src/libcamera/pipeline/rkisp1/rkisp1.cpp +++ b/src/libcamera/pipeline/rkisp1/rkisp1.cpp @@ -13,6 +13,7 @@ #include <queue> #include <linux/media-bus-format.h> +#include <linux/rkisp1-config.h> #include <libcamera/base/log.h> #include <libcamera/base/utils.h> @@ -32,6 +33,7 @@ #include "libcamera/internal/camera_sensor.h" #include "libcamera/internal/delayed_controls.h" #include "libcamera/internal/device_enumerator.h" +#include "libcamera/internal/framebuffer.h" #include "libcamera/internal/ipa_manager.h" #include "libcamera/internal/media_device.h" #include "libcamera/internal/pipeline_handler.h" @@ -362,6 +364,8 @@ void RkISP1CameraData::paramFilled(unsigned int frame) if (!info) return; + info->paramBuffer->_d()->metadata().planes()[0].bytesused = + sizeof(struct rkisp1_params_cfg); pipe->param_->queueBuffer(info->paramBuffer); pipe->stat_->queueBuffer(info->statBuffer);