hello yt.jeon,
since NV16 has two planes (Y and UV) in a single buffer, hence we need to configure the additional surface accordingly.
please also try adding below to VI driver,
diff --git a/drivers/media/platform/tegra/camera/vi/vi5_fops.c b/drivers/media/platform/tegra/camera/vi/vi5_fops.c
index b54833d3f..0996f77b2 100644
--- a/drivers/media/platform/tegra/camera/vi/vi5_fops.c
+++ b/drivers/media/platform/tegra/camera/vi/vi5_fops.c
@@ -355,6 +355,9 @@ static int tegra_channel_capture_setup(struct tegra_channel *chan, unsigned int
setup.csi_port = csi_chan->ports[vi_port].csi_port;
}
+ if (chan->fmtinfo->fourcc == V4L2_PIX_FMT_NV16)
+ setup.channel_flags |= CAPTURE_CHANNEL_FLAG_SEMI_PLANAR;
+
err = vi_capture_setup(chan->tegra_vi_channel[vi_port], &setup);
if (err) {
dev_err(chan->vi->dev, "vi capture setup failed\n");
@@ -404,6 +407,11 @@ static void vi5_setup_surface(struct tegra_channel *chan,
desc_memoryinfo->surface[0].base_address = offset;
desc_memoryinfo->surface[0].size = chan->format.bytesperline * height;
desc->ch_cfg.atomp.surface_stride[0] = bpl;
+ if (chan->fmtinfo->fourcc == V4L2_PIX_FMT_NV16) {
+ desc_memoryinfo->surface[1].base_address = offset + chan->format.sizeimage / 2;
+ desc_memoryinfo->surface[1].size = chan->format.bytesperline * height;
+ desc->ch_cfg.atomp.surface_stride[1] = bpl;
+ }