drivers: video: handle line_offset field
Since all video drivers in tree use a full frame, their video buffers will always start at a line_offset of 0 within the frame. Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
This commit is contained in:
parent
04a007f9fe
commit
561198ac75
4 changed files with 4 additions and 0 deletions
|
|
@ -287,6 +287,7 @@ static int video_esp32_enqueue(const struct device *dev, enum video_endpoint_id
|
|||
}
|
||||
|
||||
vbuf->bytesused = data->video_format.pitch * data->video_format.height;
|
||||
vbuf->line_offset = 0;
|
||||
|
||||
k_fifo_put(&data->fifo_in, vbuf);
|
||||
|
||||
|
|
|
|||
|
|
@ -293,6 +293,7 @@ static int video_mcux_csi_enqueue(const struct device *dev, enum video_endpoint_
|
|||
|
||||
to_read = data->csi_config.linePitch_Bytes * data->csi_config.height;
|
||||
vbuf->bytesused = to_read;
|
||||
vbuf->line_offset = 0;
|
||||
|
||||
ret = CSI_TransferSubmitEmptyBuffer(config->base, &data->csi_handle,
|
||||
(uint32_t)vbuf->buffer);
|
||||
|
|
|
|||
|
|
@ -320,6 +320,7 @@ static int video_stm32_dcmi_enqueue(const struct device *dev,
|
|||
}
|
||||
|
||||
vbuf->bytesused = buffer_size;
|
||||
vbuf->line_offset = 0;
|
||||
|
||||
k_fifo_put(&data->fifo_in, vbuf);
|
||||
|
||||
|
|
|
|||
|
|
@ -145,6 +145,7 @@ static void __fill_buffer_colorbar(struct video_sw_generator_data *data, struct
|
|||
|
||||
vbuf->timestamp = k_uptime_get_32();
|
||||
vbuf->bytesused = i;
|
||||
vbuf->line_offset = 0;
|
||||
}
|
||||
|
||||
static void __buffer_work(struct k_work *work)
|
||||
|
|
|
|||
Loading…
Reference in a new issue