i made 4 channel HD camera H/W solution
my camera output is UYVY 1280x720 30fps.
so i captured video v4l2 and h.264 encoding simultaneous save of 4 channels(Like a DVR)
my camera did not initialize the driver, but in the application(I2C)(My camera driver is dummy v4l2 driver.)
MIPI Output start after camera initialization from app.
The starting order of the application is as follows.
Hi walterkim
In the vi2_fops.c you can see the buffer address write to the REG TEGRA_VI_CSI_SURFACE0_OFFSET_LSB, you can try here. But it’s a DMA buffer and could have problem access by CPU.
void vi2_channel_capture_frame_init(struct tegra_channel *chan,
struct tegra_channel_buffer *buf,
u32 *thresh)
{
int index = 0;
int valid_ports = chan->valid_ports;
int bytes_per_line = chan->format.bytesperline;
u32 val, frame_start, mw_ack_done;
u32 release_thresh[TEGRA_CSI_BLOCKS] = { 0 };
for (index = 0; index < valid_ports; index++) {
/* Program buffer address by using surface 0 */
vi2_channel_csi_write(chan, index,
TEGRA_VI_CSI_SURFACE0_OFFSET_MSB, 0x0);
vi2_channel_csi_write(chan, index,
TEGRA_VI_CSI_SURFACE0_OFFSET_LSB,
(buf->addr + chan->buffer_offset[index]));
vi2_channel_csi_write(chan, index,
TEGRA_VI_CSI_SURFACE0_STRIDE, bytes_per_line);