}
}
-void ipu6_isys_queue_buf_ready(struct ipu6_isys_stream *stream,
- struct ipu6_fw_isys_resp_info_abi *info)
+static void
+ipu6_stream_buf_ready(struct ipu6_isys_stream *stream, u8 pin_id, u32 pin_addr,
+ u64 time, bool error_check)
{
- struct ipu6_isys_queue *aq = stream->output_pins[info->pin_id].aq;
+ struct ipu6_isys_queue *aq = stream->output_pins[pin_id].aq;
struct ipu6_isys *isys = stream->isys;
struct device *dev = &isys->adev->auxdev.dev;
struct ipu6_isys_buffer *ib;
unsigned long flags;
bool first = true;
struct vb2_v4l2_buffer *buf;
- u64 time = (u64)info->timestamp[1] << 32 | info->timestamp[0];
spin_lock_irqsave(&aq->lock, flags);
if (list_empty(&aq->active)) {
ivb = vb2_buffer_to_ipu6_isys_video_buffer(vvb);
addr = ivb->dma_addr;
- if (info->pin.addr != addr) {
+ if (pin_addr != addr) {
if (first)
dev_err(dev, "Unexpected buffer address %pad\n",
&addr);
continue;
}
- if (info->error_info.error ==
- IPU6_FW_ISYS_ERROR_HW_REPORTED_STR2MMIO) {
+ if (error_check) {
/*
* Check for error message:
* 'IPU6_FW_ISYS_ERROR_HW_REPORTED_STR2MMIO'
spin_unlock_irqrestore(&aq->lock, flags);
}
+void ipu6_isys_queue_buf_ready(struct ipu6_isys_stream *stream,
+ struct ipu6_fw_isys_resp_info_abi *info)
+{
+ u64 time = (u64)info->timestamp[1] << 32 | info->timestamp[0];
+ bool err = info->error_info.error == IPU6_FW_ISYS_ERROR_HW_REPORTED_STR2MMIO;
+
+ ipu6_stream_buf_ready(stream, info->pin_id, info->pin.addr, time, err);
+}
+
static const struct vb2_ops ipu6_isys_queue_ops = {
.queue_setup = ipu6_isys_queue_setup,
.buf_init = ipu6_isys_buf_init,