Pixel Format is not same between capture and output

hi,
I am using a isp which output YUYV to tx2,when i using this command to capture video,only select UYVY pixel format can see right picture
1、capture command

v4l2-ctl -d /dev/video0  --stream-mmap --stream-count=10 --stream-to=image.yuv

2、query the video capture format

nvidia@tegra-ubuntu:~/Videos$ v4l2-ctl -V
Format Video Capture:
        Width/Height      : 1920/1080
        Pixel Format      : 'YUYV'
        Field             : None
        Bytes per Line    : 3840
        Size Image        : 4147200
        Colorspace        : JPEG
        Transfer Function : Default (maps to sRGB)
        YCbCr/HSV Encoding: Default (maps to ITU-R 601)
        Quantization      : Default (maps to Full Range)
        Flags             :
nvidia@tegra-ubuntu:~/Videos$

the code is follow:
1、

#define OV2718_DEFAULT_DATAFMT	MEDIA_BUS_FMT_UYVY8_2X8
common_data->colorfmt		= camera_common_find_datafmt(
					  OV2718_DEFAULT_DATAFMT);
..
priv->s_data			= common_data;
..
err = camera_common_initialize(common_data, "ov2718");

2、camera_sensor.c

static const struct camera_common_colorfmt camera_common_color_fmts[] = {
	{
		MEDIA_BUS_FMT_SRGGB12_1X12,
		V4L2_COLORSPACE_SRGB,
		V4L2_PIX_FMT_SRGGB12,
	},
	{
		MEDIA_BUS_FMT_SRGGB10_1X10,
		V4L2_COLORSPACE_SRGB,
		V4L2_PIX_FMT_SRGGB10,
	},
	{
		MEDIA_BUS_FMT_SBGGR10_1X10,
		V4L2_COLORSPACE_SRGB,
		V4L2_PIX_FMT_SBGGR10,
	},
	{
		MEDIA_BUS_FMT_SRGGB8_1X8,
		V4L2_COLORSPACE_SRGB,
		V4L2_PIX_FMT_SRGGB8,
	},
	{
		MEDIA_BUS_FMT_UYVY8_1X16,
		V4L2_COLORSPACE_SRGB,
		V4L2_PIX_FMT_UYVY,
	},
       {
		MEDIA_BUS_FMT_UYVY8_2X8,
		V4L2_COLORSPACE_SRGB,
		V4L2_PIX_FMT_UYVY,
	},
	{
		MEDIA_BUS_FMT_VYUY8_2X8,
		V4L2_COLORSPACE_SRGB,
		V4L2_PIX_FMT_VYUY,
	},
	{
		MEDIA_BUS_FMT_YUYV8_2X8,
		V4L2_COLORSPACE_SRGB,
		V4L2_PIX_FMT_YUYV,
	},
	{
		MEDIA_BUS_FMT_YVYU8_2X8,
		V4L2_COLORSPACE_SRGB,
		V4L2_PIX_FMT_YVYU,
	},

3、sensor_common.c,uyvy is set in device-tree

static int extract_pixel_format(
	const char *pixel_t, u32 *format)
{
	size_t size = strnlen(pixel_t, OF_MAX_STR_LEN);

	if (strncmp(pixel_t, "bayer_bggr10", size) == 0)
		*format = V4L2_PIX_FMT_SBGGR10;
	else if (strncmp(pixel_t, "bayer_rggb10", size) == 0)
		*format = V4L2_PIX_FMT_SRGGB10;
	else if (strncmp(pixel_t, "bayer_bggr12", size) == 0)
		*format = V4L2_PIX_FMT_SBGGR12;
	else if (strncmp(pixel_t, "bayer_rggb12", size) == 0)
		*format = V4L2_PIX_FMT_SRGGB12;
	else if (strncmp(pixel_t, "bayer_wdr_pwl_rggb12", size) == 0)
		*format = V4L2_PIX_FMT_SRGGB12;
	else if (strncmp(pixel_t, "bayer_wdr_dol_rggb10", size) == 0)
		*format = V4L2_PIX_FMT_SRGGB10;
	else if (strncmp(pixel_t, "bayer_xbggr10p", size) == 0)
		*format = V4L2_PIX_FMT_XBGGR10P;
	else if (strncmp(pixel_t, "bayer_xrggb10p", size) == 0)
		*format = V4L2_PIX_FMT_XRGGB10P;
	else if (strncmp(pixel_t, "uyvy", size) == 0)
	{
	 //	 *format = V4L2_PIX_FMT_YVYU;
       //        *format = V4L2_PIX_FMT_UYVY;
	 	*format = V4L2_PIX_FMT_YUYV;
	//	*format = V4L2_PIX_FMT_VYUY;
	}
	else {
		pr_err("%s: Need to extend format%s\n", __func__, pixel_t);
		return -EINVAL;
	}

	return 0;
}

Could you print the format from the vi4_fops.c to check if the value with TRM PIXFMT register.

vi4_channel_write(chan, vnc_id, PIXFMT_FORMAT, format);

1、I add code like this

static void vi4_channel_write(struct tegra_channel *chan,
		unsigned int index, unsigned int addr, u32 val)
{
        printk("%s,val=0x%0x\n",__func__,val);
	writel(val,
		chan->vi->iomem + VI4_CHANNEL_OFFSET * (index + 1) + addr);
}

2、when system is boot,i can got the log info,whit this command

dmesg |grep vi4_channel_write

3、when i capture video,the log is found,but the message is too much

v4l2-ctl -d /dev/video0  --stream-mmap --stream-count=10 --stream-to=ov2718_video.yuv
[  136.463170] vi4_channel_write,val=0x7f1f
[  136.467151] vi4_channel_write,val=0x7bf
[  136.471030] vi4_channel_write,val=0x0
[  136.474730] vi4_channel_write,val=0x0
[  136.478475] vi4_channel_write,val=0x780
[  136.482361] vi4_channel_write,val=0x438
[  136.486243] vi4_channel_write,val=0x0
[  136.489975] vi4_channel_write,val=0x780
[  136.493855] vi4_channel_write,val=0x780
[  136.497783] vi4_channel_write,val=0x0
[  136.501485] vi4_channel_write,val=0x438
[  136.505381] vi4_channel_write,val=0x438
[  136.509283] vi4_channel_write,val=0x1
[  136.512982] vi4_channel_write,val=0x0
[  136.516729] vi4_channel_write,val=0xcb
[  136.520545] vi4_channel_write,val=0x0
[  136.524219] vi4_channel_write,val=0x0
[  136.528970] vi4_channel_write,val=0x0
[  136.532654] vi4_channel_write,val=0x1000000
[  136.536876] vi4_channel_write,val=0x0
[  136.540604] vi4_channel_write,val=0x0
[  136.544313] vi4_channel_write,val=0x0
[  136.553401] vi4_channel_write,val=0x0
[  136.557084] vi4_channel_write,val=0x0
[  136.560780] vi4_channel_write,val=0xf00
[  136.564640] vi4_channel_write,val=0x5ef00000
[  136.568930] vi4_channel_write,val=0xf00
[  136.572783] vi4_channel_write,val=0x0
[  136.576449] vi4_channel_write,val=0x0
[  136.580102] vi4_channel_write,val=0x0
[  136.583766] vi4_channel_write,val=0x0
[  136.587432] vi4_channel_write,val=0x0
[  136.591097] vi4_channel_write,val=0x0
[  136.594760] vi4_channel_write,val=0x0
[  136.598451] OV2718,ov2718_s_stream,enable=1
[  136.602639] vi4_channel_write,val=0x1
[  136.606304] vi4_channel_write,val=0x3
[  136.628684] vi4_channel_write,val=0x0
[  136.632342] vi4_channel_write,val=0x0
[  136.636012] vi4_channel_write,val=0xf00
[  136.639867] vi4_channel_write,val=0x5f300000
[  136.644141] vi4_channel_write,val=0xf00
[  136.647977] vi4_channel_write,val=0x0
[  136.651643] vi4_channel_write,val=0x0
[  136.655308] vi4_channel_write,val=0x0
[  136.658975] vi4_channel_write,val=0x0
[  136.662639] vi4_channel_write,val=0x0
[  136.666306] vi4_channel_write,val=0x0
[  136.669970] vi4_channel_write,val=0x0
[  136.673636] vi4_channel_write,val=0x1
[  136.677299] vi4_channel_write,val=0x3
[  136.695324] vi4_channel_write,val=0x0
[  136.699012] vi4_channel_write,val=0x0
[  136.702692] vi4_channel_write,val=0xf00
[  136.706552] vi4_channel_write,val=0x5f700000
[  136.710827] vi4_channel_write,val=0xf00
[  136.714667] vi4_channel_write,val=0x0
[  136.718333] vi4_channel_write,val=0x0
[  136.721998] vi4_channel_write,val=0x0
[  136.725661] vi4_channel_write,val=0x0
[  136.729328] vi4_channel_write,val=0x0
[  136.732995] vi4_channel_write,val=0x0
[  136.736659] vi4_channel_write,val=0x0
[  136.740331] vi4_channel_write,val=0x1
[  136.743984] vi4_channel_write,val=0x3
[  136.761973] vi4_channel_write,val=0x0
[  136.765648] vi4_channel_write,val=0x0
[  136.769343] vi4_channel_write,val=0xf00
[  136.773220] vi4_channel_write,val=0x5fb00000
[  136.777500] vi4_channel_write,val=0xf00
[  136.781340] vi4_channel_write,val=0x0
[  136.785005] vi4_channel_write,val=0x0
[  136.788668] vi4_channel_write,val=0x0
[  136.792343] vi4_channel_write,val=0x0
[  136.795997] vi4_channel_write,val=0x0
[  136.799666] vi4_channel_write,val=0x0
[  136.803331] vi4_channel_write,val=0x0
[  136.806996] vi4_channel_write,val=0x1
[  136.810662] vi4_channel_write,val=0x3
[  136.828619] vi4_channel_write,val=0x0
[  136.832295] vi4_channel_write,val=0x0
[  136.835949] vi4_channel_write,val=0xf00
[  136.839798] vi4_channel_write,val=0x5ef00000
[  136.844073] vi4_channel_write,val=0xf00
[  136.847922] vi4_channel_write,val=0x0
[  136.851588] vi4_channel_write,val=0x0
[  136.855253] vi4_channel_write,val=0x0
[  136.858917] vi4_channel_write,val=0x0
[  136.862580] vi4_channel_write,val=0x0
[  136.866245] vi4_channel_write,val=0x0
[  136.869910] vi4_channel_write,val=0x0
[  136.873573] vi4_channel_write,val=0x1
[  136.877238] vi4_channel_write,val=0x3
[  136.895260] vi4_channel_write,val=0x0
[  136.898948] vi4_channel_write,val=0x0
[  136.902627] vi4_channel_write,val=0xf00
[  136.906486] vi4_channel_write,val=0x5f300000
[  136.910763] vi4_channel_write,val=0xf00
[  136.914604] vi4_channel_write,val=0x0
[  136.918269] vi4_channel_write,val=0x0
[  136.921933] vi4_channel_write,val=0x0
[  136.925599] vi4_channel_write,val=0x0
[  136.929262] vi4_channel_write,val=0x0
[  136.932930] vi4_channel_write,val=0x0
[  136.936592] vi4_channel_write,val=0x0
[  136.940257] vi4_channel_write,val=0x1
[  136.943910] vi4_channel_write,val=0x3
[  136.961910] vi4_channel_write,val=0x0
[  136.965583] vi4_channel_write,val=0x0
[  136.969258] vi4_channel_write,val=0xf00
[  136.973098] vi4_channel_write,val=0x5f700000
[  136.977371] vi4_channel_write,val=0xf00
[  136.981227] vi4_channel_write,val=0x0
[  136.984894] vi4_channel_write,val=0x0
[  136.988559] vi4_channel_write,val=0x0
[  136.992223] vi4_channel_write,val=0x0
[  136.995875] vi4_channel_write,val=0x0
[  136.999541] vi4_channel_write,val=0x0
[  137.003215] vi4_channel_write,val=0x0
[  137.006881] vi4_channel_write,val=0x1
[  137.010544] vi4_channel_write,val=0x3
[  137.028555] vi4_channel_write,val=0x0
[  137.032228] vi4_channel_write,val=0x0
[  137.035881] vi4_channel_write,val=0xf00
[  137.039750] vi4_channel_write,val=0x5fb00000
[  137.044042] vi4_channel_write,val=0xf00
[  137.047881] vi4_channel_write,val=0x0
[  137.051547] vi4_channel_write,val=0x0
[  137.055222] vi4_channel_write,val=0x0
[  137.058888] vi4_channel_write,val=0x0
[  137.062553] vi4_channel_write,val=0x0
[  137.066218] vi4_channel_write,val=0x0
[  137.069882] vi4_channel_write,val=0x0
[  137.073546] vi4_channel_write,val=0x1
[  137.077212] vi4_channel_write,val=0x3
[  137.095197] vi4_channel_write,val=0x0
[  137.098870] vi4_channel_write,val=0x0
[  137.102545] vi4_channel_write,val=0xf00
[  137.106403] vi4_channel_write,val=0x5ef00000
[  137.110700] vi4_channel_write,val=0xf00
[  137.114556] vi4_channel_write,val=0x0
[  137.118223] vi4_channel_write,val=0x0
[  137.121888] vi4_channel_write,val=0x0
[  137.125552] vi4_channel_write,val=0x0
[  137.129214] vi4_channel_write,val=0x0
[  137.132881] vi4_channel_write,val=0x0
[  137.136544] vi4_channel_write,val=0x0
[  137.140211] vi4_channel_write,val=0x1
[  137.143863] vi4_channel_write,val=0x3
[  137.161846] vi4_channel_write,val=0x0
[  137.165519] vi4_channel_write,val=0x0
[  137.169192] vi4_channel_write,val=0xf00
[  137.173054] vi4_channel_write,val=0x5f300000
[  137.177333] vi4_channel_write,val=0xf00
[  137.181172] vi4_channel_write,val=0x0
[  137.184837] vi4_channel_write,val=0x0
[  137.188499] vi4_channel_write,val=0x0
[  137.192162] vi4_channel_write,val=0x0
[  137.195815] vi4_channel_write,val=0x0
[  137.199489] vi4_channel_write,val=0x0
[  137.203194] vi4_channel_write,val=0x0
[  137.206874] vi4_channel_write,val=0x1
[  137.210568] vi4_channel_write,val=0x3
[  137.228508] vi4_channel_write,val=0x0
[  137.232189] vi4_channel_write,val=0x0
[  137.235842] vi4_channel_write,val=0xf00
[  137.239690] vi4_channel_write,val=0x5f700000
[  137.243968] vi4_channel_write,val=0xf00
[  137.247806] vi4_channel_write,val=0x0
[  137.251470] vi4_channel_write,val=0x0
[  137.255134] vi4_channel_write,val=0x0
[  137.258799] vi4_channel_write,val=0x0
[  137.262477] vi4_channel_write,val=0x0
[  137.266143] vi4_channel_write,val=0x0
[  137.269806] vi4_channel_write,val=0x0
[  137.273471] vi4_channel_write,val=0x1
[  137.277135] vi4_channel_write,val=0x3
[  137.295136] vi4_channel_write,val=0x0
[  137.298812] vi4_channel_write,val=0x0
[  137.302488] vi4_channel_write,val=0xf00
[  137.306353] vi4_channel_write,val=0x5fb00000
[  137.310632] vi4_channel_write,val=0xf00
[  137.314483] vi4_channel_write,val=0x0
[  137.318148] vi4_channel_write,val=0x0
[  137.321812] vi4_channel_write,val=0x0
[  137.325477] vi4_channel_write,val=0x0
[  137.329141] vi4_channel_write,val=0x0
[  137.332807] vi4_channel_write,val=0x0
[  137.336472] vi4_channel_write,val=0x0
[  137.340138] vi4_channel_write,val=0x1
[  137.343790] vi4_channel_write,val=0x3
[  137.361784] vi4_channel_write,val=0x0
[  137.365471] vi4_channel_write,val=0x0
[  137.369146] vi4_channel_write,val=0xf00
[  137.372985] vi4_channel_write,val=0x5ef00000
[  137.377261] vi4_channel_write,val=0xf00
[  137.381100] vi4_channel_write,val=0x0
[  137.384766] vi4_channel_write,val=0x0
[  137.388429] vi4_channel_write,val=0x0
[  137.392093] vi4_channel_write,val=0x0
[  137.395747] vi4_channel_write,val=0x0
[  137.399414] vi4_channel_write,val=0x0
[  137.403078] vi4_channel_write,val=0x0
[  137.406742] vi4_channel_write,val=0x1
[  137.410409] vi4_channel_write,val=0x3
[  137.428465] vi4_channel_write,val=0x0
[  137.432422] vi4_channel_write,val=0x0
[  137.436223] vi4_channel_write,val=0xf00
[  137.440154] vi4_channel_write,val=0x5f300000
[  137.444523] vi4_channel_write,val=0xf00
[  137.448387] vi4_channel_write,val=0x0
[  137.452066] vi4_channel_write,val=0x0
[  137.455728] vi4_channel_write,val=0x0
[  137.459403] vi4_channel_write,val=0x0
[  137.463077] vi4_channel_write,val=0x0
[  137.466809] vi4_channel_write,val=0x0
[  137.470506] vi4_channel_write,val=0x0
[  137.474200] vi4_channel_write,val=0x1
[  137.477894] vi4_channel_write,val=0x3
[  137.527123] OV2718,ov2718_s_stream,enable=0

Just print the write function to write the PIXFMT_FORMAT in the tegra_channel_capture_setup()

hi,ShaneCCC
What is the offset value of the register,i modify the code and the log message is follow:

printk("%s,val=0x%0x,addr=0x%0x,index=%d,offset=0x%0x\n",__func__,val,addr,index,
                  VI4_CHANNEL_OFFSET * (index + 1) + addr);
[   66.282926] ov2718 30-001b: camera_common_mclk_enable: enable MCLK with 24000000 Hz
[   66.290913] OV2718,ov2718_power_on++
[   66.317274] OV2718,ov2718_power_on--
[   66.340630] OV2718,v4l2_subdev_link_validate_get_format
[   66.345927] ov2718_get_fmt
[   66.348760] ov2718 camera_common_g_fmt++,devname=30-001b,0x2008
[   66.354746] OV2718,v4l2_subdev_link_validate_get_format
[   66.360993] vi4_channel_write,val=0x7f1f,addr=0x20,index=0,offset=0x10020
[   66.367808] vi4_channel_write,val=0x7bf,addr=0x24,index=0,offset=0x10024
[   66.374560] vi4_channel_write,val=0x0,addr=0x2c,index=0,offset=0x1002c
[   66.381104] vi4_channel_write,val=0x0,addr=0x28,index=0,offset=0x10028
[   66.387668] vi4_channel_write,val=0x780,addr=0x30,index=0,offset=0x10030
[   66.394405] vi4_channel_write,val=0x438,addr=0x34,index=0,offset=0x10034
[   66.401132] vi4_channel_write,val=0x0,addr=0x48,index=0,offset=0x10048
[   66.407678] vi4_channel_write,val=0x780,addr=0x4c,index=0,offset=0x1004c
[   66.414400] vi4_channel_write,val=0x780,addr=0x58,index=0,offset=0x10058
[   66.421115] vi4_channel_write,val=0x0,addr=0x50,index=0,offset=0x10050
[   66.427664] vi4_channel_write,val=0x438,addr=0x54,index=0,offset=0x10054
[   66.434389] vi4_channel_write,val=0x438,addr=0x5c,index=0,offset=0x1005c
[   66.441105] vi4_channel_write,val=0x1,addr=0x80,index=0,offset=0x10080
[   66.447646] vi4_channel_write,val=0x0,addr=0x88,index=0,offset=0x10088
[   66.454176] vi4_channel_write,val=0xc8,addr=0x84,index=0,offset=0x10084
[   66.460791] vi4_channel_write,val=0x0,addr=0xb8,index=0,offset=0x100b8
[   66.467321] vi4_channel_write,val=0x0,addr=0xec,index=0,offset=0x100ec
[   66.473852] vi4_channel_write,val=0x0,addr=0x134,index=0,offset=0x10134
[   66.480466] vi4_channel_write,val=0x1000000,addr=0x44,index=0,offset=0x10044
[   66.487512] vi4_channel_write,val=0x0,addr=0x38,index=0,offset=0x10038
[   66.494038] vi4_channel_write,val=0x0,addr=0x3c,index=0,offset=0x1003c
[   66.500565] vi4_channel_write,val=0x0,addr=0x120,index=0,offset=0x10120
[   66.507851] vi4_channel_write,val=0x0,addr=0x108,index=0,offset=0x10108
[   66.514476] vi4_channel_write,val=0x0,addr=0x10c,index=0,offset=0x1010c
[   66.521096] vi4_channel_write,val=0xf00,addr=0x110,index=0,offset=0x10110
[   66.527890] vi4_channel_write,val=0x5ef00000,addr=0xe0,index=0,offset=0x100e0
[   66.535030] vi4_channel_write,val=0xf00,addr=0xe8,index=0,offset=0x100e8
[   66.541764] vi4_channel_write,val=0x0,addr=0xe4,index=0,offset=0x100e4
[   66.548289] vi4_channel_write,val=0x0,addr=0xf0,index=0,offset=0x100f0
[   66.554816] vi4_channel_write,val=0x0,addr=0xf4,index=0,offset=0x100f4
[   66.561342] vi4_channel_write,val=0x0,addr=0xf8,index=0,offset=0x100f8
[   66.567867] vi4_channel_write,val=0x0,addr=0xfc,index=0,offset=0x100fc
[   66.574421] vi4_channel_write,val=0x0,addr=0x100,index=0,offset=0x10100
[   66.581034] vi4_channel_write,val=0x0,addr=0x104,index=0,offset=0x10104
[   66.587672] OV2718,ov2718_s_stream,enable=1
[   66.591857] vi4_channel_write,val=0x1,addr=0x4,index=0,offset=0x10004
[   66.598297] vi4_channel_write,val=0x3,addr=0x1c,index=0,offset=0x1001c
[   66.638133] vi4_channel_write,val=0x0,addr=0x108,index=0,offset=0x10108
[   66.644792] vi4_channel_write,val=0x0,addr=0x10c,index=0,offset=0x1010c
[   66.651455] vi4_channel_write,val=0xf00,addr=0x110,index=0,offset=0x10110
[   66.658264] vi4_channel_write,val=0x5f300000,addr=0xe0,index=0,offset=0x100e0
[   66.665412] vi4_channel_write,val=0xf00,addr=0xe8,index=0,offset=0x100e8
[   66.672169] vi4_channel_write,val=0x0,addr=0xe4,index=0,offset=0x100e4
[   66.678708] vi4_channel_write,val=0x0,addr=0xf0,index=0,offset=0x100f0
[   66.685250] vi4_channel_write,val=0x0,addr=0xf4,index=0,offset=0x100f4
[   66.691802] vi4_channel_write,val=0x0,addr=0xf8,index=0,offset=0x100f8
[   66.698347] vi4_channel_write,val=0x0,addr=0xfc,index=0,offset=0x100fc
[   66.704904] vi4_channel_write,val=0x0,addr=0x100,index=0,offset=0x10100
[   66.711518] vi4_channel_write,val=0x0,addr=0x104,index=0,offset=0x10104
[   66.718132] vi4_channel_write,val=0x1,addr=0x4,index=0,offset=0x10004
[   66.724573] vi4_channel_write,val=0x3,addr=0x1c,index=0,offset=0x1001c
[   66.738078] vi4_channel_write,val=0x0,addr=0x108,index=0,offset=0x10108
[   66.744696] vi4_channel_write,val=0x0,addr=0x10c,index=0,offset=0x1010c
[   66.751325] vi4_channel_write,val=0xf00,addr=0x110,index=0,offset=0x10110
[   66.758113] vi4_channel_write,val=0x5f700000,addr=0xe0,index=0,offset=0x100e0
[   66.765277] vi4_channel_write,val=0xf00,addr=0xe8,index=0,offset=0x100e8
[   66.771978] vi4_channel_write,val=0x0,addr=0xe4,index=0,offset=0x100e4
[   66.778513] vi4_channel_write,val=0x0,addr=0xf0,index=0,offset=0x100f0
[   66.785041] vi4_channel_write,val=0x0,addr=0xf4,index=0,offset=0x100f4
[   66.791566] vi4_channel_write,val=0x0,addr=0xf8,index=0,offset=0x100f8
[   66.798128] vi4_channel_write,val=0x0,addr=0xfc,index=0,offset=0x100fc
[   66.804658] vi4_channel_write,val=0x0,addr=0x100,index=0,offset=0x10100
[   66.811270] vi4_channel_write,val=0x0,addr=0x104,index=0,offset=0x10104
[   66.817885] vi4_channel_write,val=0x1,addr=0x4,index=0,offset=0x10004
[   66.824325] vi4_channel_write,val=0x3,addr=0x1c,index=0,offset=0x1001c
[   66.838047] vi4_channel_write,val=0x0,addr=0x108,index=0,offset=0x10108
[   66.844670] vi4_channel_write,val=0x0,addr=0x10c,index=0,offset=0x1010c
[   66.851318] vi4_channel_write,val=0xf00,addr=0x110,index=0,offset=0x10110
[   66.858106] vi4_channel_write,val=0x5fb00000,addr=0xe0,index=0,offset=0x100e0
[   66.865268] vi4_channel_write,val=0xf00,addr=0xe8,index=0,offset=0x100e8
[   66.871972] vi4_channel_write,val=0x0,addr=0xe4,index=0,offset=0x100e4
[   66.878500] vi4_channel_write,val=0x0,addr=0xf0,index=0,offset=0x100f0
[   66.885026] vi4_channel_write,val=0x0,addr=0xf4,index=0,offset=0x100f4
[   66.891551] vi4_channel_write,val=0x0,addr=0xf8,index=0,offset=0x100f8
[   66.898165] vi4_channel_write,val=0x0,addr=0xfc,index=0,offset=0x100fc
[   66.904696] vi4_channel_write,val=0x0,addr=0x100,index=0,offset=0x10100
[   66.911308] vi4_channel_write,val=0x0,addr=0x104,index=0,offset=0x10104
[   66.917921] vi4_channel_write,val=0x1,addr=0x4,index=0,offset=0x10004
[   66.924386] vi4_channel_write,val=0x3,addr=0x1c,index=0,offset=0x1001c
[   66.938016] vi4_channel_write,val=0x0,addr=0x108,index=0,offset=0x10108
[   66.944636] vi4_channel_write,val=0x0,addr=0x10c,index=0,offset=0x1010c
[   66.951283] vi4_channel_write,val=0xf00,addr=0x110,index=0,offset=0x10110
[   66.958101] vi4_channel_write,val=0x5ef00000,addr=0xe0,index=0,offset=0x100e0
[   66.965235] vi4_channel_write,val=0xf00,addr=0xe8,index=0,offset=0x100e8
[   66.971934] vi4_channel_write,val=0x0,addr=0xe4,index=0,offset=0x100e4
[   66.978461] vi4_channel_write,val=0x0,addr=0xf0,index=0,offset=0x100f0
[   66.984985] vi4_channel_write,val=0x0,addr=0xf4,index=0,offset=0x100f4
[   66.991579] vi4_channel_write,val=0x0,addr=0xf8,index=0,offset=0x100f8
[   66.998108] vi4_channel_write,val=0x0,addr=0xfc,index=0,offset=0x100fc
[   67.004635] vi4_channel_write,val=0x0,addr=0x100,index=0,offset=0x10100
[   67.011247] vi4_channel_write,val=0x0,addr=0x104,index=0,offset=0x10104
[   67.017860] vi4_channel_write,val=0x1,addr=0x4,index=0,offset=0x10004
[   67.024344] vi4_channel_write,val=0x3,addr=0x1c,index=0,offset=0x1001c
[   67.037983] vi4_channel_write,val=0x0,addr=0x108,index=0,offset=0x10108
[   67.044613] vi4_channel_write,val=0x0,addr=0x10c,index=0,offset=0x1010c
[   67.051271] vi4_channel_write,val=0xf00,addr=0x110,index=0,offset=0x10110
[   67.058094] vi4_channel_write,val=0x5f300000,addr=0xe0,index=0,offset=0x100e0
[   67.065279] vi4_channel_write,val=0xf00,addr=0xe8,index=0,offset=0x100e8
[   67.072103] vi4_channel_write,val=0x0,addr=0xe4,index=0,offset=0x100e4
[   67.078672] vi4_channel_write,val=0x0,addr=0xf0,index=0,offset=0x100f0
[   67.085346] vi4_channel_write,val=0x0,addr=0xf4,index=0,offset=0x100f4
[   67.091909] vi4_channel_write,val=0x0,addr=0xf8,index=0,offset=0x100f8
[   67.098550] vi4_channel_write,val=0x0,addr=0xfc,index=0,offset=0x100fc
[   67.105180] vi4_channel_write,val=0x0,addr=0x100,index=0,offset=0x10100
[   67.111914] vi4_channel_write,val=0x0,addr=0x104,index=0,offset=0x10104
[   67.118600] vi4_channel_write,val=0x1,addr=0x4,index=0,offset=0x10004
[   67.125155] vi4_channel_write,val=0x3,addr=0x1c,index=0,offset=0x1001c
[   67.137969] vi4_channel_write,val=0x0,addr=0x108,index=0,offset=0x10108
[   67.144632] vi4_channel_write,val=0x0,addr=0x10c,index=0,offset=0x1010c
[   67.151325] vi4_channel_write,val=0xf00,addr=0x110,index=0,offset=0x10110
[   67.158139] vi4_channel_write,val=0x5f700000,addr=0xe0,index=0,offset=0x100e0
[   67.165290] vi4_channel_write,val=0xf00,addr=0xe8,index=0,offset=0x100e8
[   67.171990] vi4_channel_write,val=0x0,addr=0xe4,index=0,offset=0x100e4
[   67.178514] vi4_channel_write,val=0x0,addr=0xf0,index=0,offset=0x100f0
[   67.185072] vi4_channel_write,val=0x0,addr=0xf4,index=0,offset=0x100f4
[   67.191599] vi4_channel_write,val=0x0,addr=0xf8,index=0,offset=0x100f8
[   67.198190] vi4_channel_write,val=0x0,addr=0xfc,index=0,offset=0x100fc
[   67.204719] vi4_channel_write,val=0x0,addr=0x100,index=0,offset=0x10100
[   67.211333] vi4_channel_write,val=0x0,addr=0x104,index=0,offset=0x10104
[   67.217979] vi4_channel_write,val=0x1,addr=0x4,index=0,offset=0x10004
[   67.224425] vi4_channel_write,val=0x3,addr=0x1c,index=0,offset=0x1001c
[   67.237922] vi4_channel_write,val=0x0,addr=0x108,index=0,offset=0x10108
[   67.244589] vi4_channel_write,val=0x0,addr=0x10c,index=0,offset=0x1010c
[   67.251242] vi4_channel_write,val=0xf00,addr=0x110,index=0,offset=0x10110
[   67.258039] vi4_channel_write,val=0x5fb00000,addr=0xe0,index=0,offset=0x100e0
[   67.265174] vi4_channel_write,val=0xf00,addr=0xe8,index=0,offset=0x100e8
[   67.271872] vi4_channel_write,val=0x0,addr=0xe4,index=0,offset=0x100e4
[   67.278431] vi4_channel_write,val=0x0,addr=0xf0,index=0,offset=0x100f0
[   67.284958] vi4_channel_write,val=0x0,addr=0xf4,index=0,offset=0x100f4
[   67.291483] vi4_channel_write,val=0x0,addr=0xf8,index=0,offset=0x100f8
[   67.298010] vi4_channel_write,val=0x0,addr=0xfc,index=0,offset=0x100fc
[   67.304596] vi4_channel_write,val=0x0,addr=0x100,index=0,offset=0x10100
[   67.311237] vi4_channel_write,val=0x0,addr=0x104,index=0,offset=0x10104
[   67.317860] vi4_channel_write,val=0x1,addr=0x4,index=0,offset=0x10004
[   67.324309] vi4_channel_write,val=0x3,addr=0x1c,index=0,offset=0x1001c
[   67.337889] vi4_channel_write,val=0x0,addr=0x108,index=0,offset=0x10108
[   67.344562] vi4_channel_write,val=0x0,addr=0x10c,index=0,offset=0x1010c
[   67.351221] vi4_channel_write,val=0xf00,addr=0x110,index=0,offset=0x10110
[   67.358026] vi4_channel_write,val=0x5ef00000,addr=0xe0,index=0,offset=0x100e0
[   67.365165] vi4_channel_write,val=0xf00,addr=0xe8,index=0,offset=0x100e8
[   67.371903] vi4_channel_write,val=0x0,addr=0xe4,index=0,offset=0x100e4
[   67.378441] vi4_channel_write,val=0x0,addr=0xf0,index=0,offset=0x100f0
[   67.384976] vi4_channel_write,val=0x0,addr=0xf4,index=0,offset=0x100f4
[   67.391514] vi4_channel_write,val=0x0,addr=0xf8,index=0,offset=0x100f8
[   67.398114] vi4_channel_write,val=0x0,addr=0xfc,index=0,offset=0x100fc
[   67.404682] vi4_channel_write,val=0x0,addr=0x100,index=0,offset=0x10100
[   67.411303] vi4_channel_write,val=0x0,addr=0x104,index=0,offset=0x10104
[   67.417941] vi4_channel_write,val=0x1,addr=0x4,index=0,offset=0x10004
[   67.424387] vi4_channel_write,val=0x3,addr=0x1c,index=0,offset=0x1001c
[   67.437855] vi4_channel_write,val=0x0,addr=0x108,index=0,offset=0x10108
[   67.444475] vi4_channel_write,val=0x0,addr=0x10c,index=0,offset=0x1010c
[   67.451141] vi4_channel_write,val=0xf00,addr=0x110,index=0,offset=0x10110
[   67.457935] vi4_channel_write,val=0x5f300000,addr=0xe0,index=0,offset=0x100e0
[   67.465072] vi4_channel_write,val=0xf00,addr=0xe8,index=0,offset=0x100e8
[   67.471806] vi4_channel_write,val=0x0,addr=0xe4,index=0,offset=0x100e4
[   67.478337] vi4_channel_write,val=0x0,addr=0xf0,index=0,offset=0x100f0
[   67.484863] vi4_channel_write,val=0x0,addr=0xf4,index=0,offset=0x100f4
[   67.491388] vi4_channel_write,val=0x0,addr=0xf8,index=0,offset=0x100f8
[   67.497914] vi4_channel_write,val=0x0,addr=0xfc,index=0,offset=0x100fc
[   67.504511] vi4_channel_write,val=0x0,addr=0x100,index=0,offset=0x10100
[   67.511125] vi4_channel_write,val=0x0,addr=0x104,index=0,offset=0x10104
[   67.517737] vi4_channel_write,val=0x1,addr=0x4,index=0,offset=0x10004
[   67.524177] vi4_channel_write,val=0x3,addr=0x1c,index=0,offset=0x1001c
[   67.537825] vi4_channel_write,val=0x0,addr=0x108,index=0,offset=0x10108
[   67.544445] vi4_channel_write,val=0x0,addr=0x10c,index=0,offset=0x1010c
[   67.551087] vi4_channel_write,val=0xf00,addr=0x110,index=0,offset=0x10110
[   67.557874] vi4_channel_write,val=0x5f700000,addr=0xe0,index=0,offset=0x100e0
[   67.565034] vi4_channel_write,val=0xf00,addr=0xe8,index=0,offset=0x100e8
[   67.571733] vi4_channel_write,val=0x0,addr=0xe4,index=0,offset=0x100e4
[   67.578259] vi4_channel_write,val=0x0,addr=0xf0,index=0,offset=0x100f0
[   67.584783] vi4_channel_write,val=0x0,addr=0xf4,index=0,offset=0x100f4
[   67.591310] vi4_channel_write,val=0x0,addr=0xf8,index=0,offset=0x100f8
[   67.597902] vi4_channel_write,val=0x0,addr=0xfc,index=0,offset=0x100fc
[   67.604432] vi4_channel_write,val=0x0,addr=0x100,index=0,offset=0x10100
[   67.611068] vi4_channel_write,val=0x0,addr=0x104,index=0,offset=0x10104
[   67.617682] vi4_channel_write,val=0x1,addr=0x4,index=0,offset=0x10004
[   67.624120] vi4_channel_write,val=0x3,addr=0x1c,index=0,offset=0x1001c
[   67.637796] vi4_channel_write,val=0x0,addr=0x108,index=0,offset=0x10108
[   67.644420] vi4_channel_write,val=0x0,addr=0x10c,index=0,offset=0x1010c
[   67.651073] vi4_channel_write,val=0xf00,addr=0x110,index=0,offset=0x10110
[   67.657861] vi4_channel_write,val=0x5fb00000,addr=0xe0,index=0,offset=0x100e0
[   67.665027] vi4_channel_write,val=0xf00,addr=0xe8,index=0,offset=0x100e8
[   67.671728] vi4_channel_write,val=0x0,addr=0xe4,index=0,offset=0x100e4
[   67.678258] vi4_channel_write,val=0x0,addr=0xf0,index=0,offset=0x100f0
[   67.684786] vi4_channel_write,val=0x0,addr=0xf4,index=0,offset=0x100f4
[   67.691312] vi4_channel_write,val=0x0,addr=0xf8,index=0,offset=0x100f8
[   67.697870] vi4_channel_write,val=0x0,addr=0xfc,index=0,offset=0x100fc
[   67.704464] vi4_channel_write,val=0x0,addr=0x100,index=0,offset=0x10100
[   67.711082] vi4_channel_write,val=0x0,addr=0x104,index=0,offset=0x10104
[   67.717695] vi4_channel_write,val=0x1,addr=0x4,index=0,offset=0x10004
[   67.724159] vi4_channel_write,val=0x3,addr=0x1c,index=0,offset=0x1001c
[   67.737765] vi4_channel_write,val=0x0,addr=0x108,index=0,offset=0x10108
[   67.744385] vi4_channel_write,val=0x0,addr=0x10c,index=0,offset=0x1010c
[   67.751031] vi4_channel_write,val=0xf00,addr=0x110,index=0,offset=0x10110
[   67.757853] vi4_channel_write,val=0x5ef00000,addr=0xe0,index=0,offset=0x100e0
[   67.764990] vi4_channel_write,val=0xf00,addr=0xe8,index=0,offset=0x100e8
[   67.771689] vi4_channel_write,val=0x0,addr=0xe4,index=0,offset=0x100e4
[   67.778217] vi4_channel_write,val=0x0,addr=0xf0,index=0,offset=0x100f0
[   67.784740] vi4_channel_write,val=0x0,addr=0xf4,index=0,offset=0x100f4
[   67.791291] vi4_channel_write,val=0x0,addr=0xf8,index=0,offset=0x100f8
[   67.797819] vi4_channel_write,val=0x0,addr=0xfc,index=0,offset=0x100fc
[   67.804417] vi4_channel_write,val=0x0,addr=0x100,index=0,offset=0x10100
[   67.811031] vi4_channel_write,val=0x0,addr=0x104,index=0,offset=0x10104
[   67.817644] vi4_channel_write,val=0x1,addr=0x4,index=0,offset=0x10004
[   67.824109] vi4_channel_write,val=0x3,addr=0x1c,index=0,offset=0x1001c
[   67.837766] vi4_channel_write,val=0x0,addr=0x108,index=0,offset=0x10108
[   67.844461] vi4_channel_write,val=0x0,addr=0x10c,index=0,offset=0x1010c
[   67.851245] vi4_channel_write,val=0xf00,addr=0x110,index=0,offset=0x10110
[   67.858126] vi4_channel_write,val=0x5f300000,addr=0xe0,index=0,offset=0x100e0
[   67.865359] vi4_channel_write,val=0xf00,addr=0xe8,index=0,offset=0x100e8
[   67.872147] vi4_channel_write,val=0x0,addr=0xe4,index=0,offset=0x100e4
[   67.878745] vi4_channel_write,val=0x0,addr=0xf0,index=0,offset=0x100f0
[   67.885315] vi4_channel_write,val=0x0,addr=0xf4,index=0,offset=0x100f4
[   67.891893] vi4_channel_write,val=0x0,addr=0xf8,index=0,offset=0x100f8
[   67.898471] vi4_channel_write,val=0x0,addr=0xfc,index=0,offset=0x100fc
[   67.905023] vi4_channel_write,val=0x0,addr=0x100,index=0,offset=0x10100
[   67.911677] vi4_channel_write,val=0x0,addr=0x104,index=0,offset=0x10104
[   67.918323] vi4_channel_write,val=0x1,addr=0x4,index=0,offset=0x10004
[   67.924795] vi4_channel_write,val=0x3,addr=0x1c,index=0,offset=0x1001c

the PIXFMT_FORMAT val = 200

Create Surface with imgW=1920, imgH=1080, memFmt=200

Why don’t you have print function in the tegra_channel_capture_setup() instead of vi4_channel_write()

diff --git a/drivers/media/platform/tegra/camera/vi/vi4_fops.c b/drivers/media/platform/tegra/camera/vi/vi4_fops.c
index 6d2d750..6bbdab4 100644
--- a/drivers/media/platform/tegra/camera/vi/vi4_fops.c
+++ b/drivers/media/platform/tegra/camera/vi/vi4_fops.c
@@ -476,6 +476,7 @@ static int tegra_channel_capture_setup(struct tegra_channel *chan,
        vi4_channel_write(chan, vnc_id, OUT_Y, height);
        vi4_channel_write(chan, vnc_id, PIXFMT_ENABLE, PIXFMT_EN);
        vi4_channel_write(chan, vnc_id, PIXFMT_WIDE, 0x0);
+       printk("PIXFMT_FORMAT %x", format);
        vi4_channel_write(chan, vnc_id, PIXFMT_FORMAT, format);
        vi4_channel_write(chan, vnc_id, DPCM_STRIP, 0x0);
        vi4_channel_write(chan, vnc_id, ATOMP_DPCM_CHUNK, 0x0);

The REG setting is correct, that show the host driver setting is fine. It’s could be the output source pixel type not as your expect.

200 = T_Y8_U8__Y8_V8

tks for your reply
I change the isp output format as UYVY,the problem is not found