I'm trying to change the TVP7002 interface from YUV422 to RGB. I'm taking the original linux files provided in ti-ezsdk_dm816x-evm_5_03_01_15/board-support/linux-2.6.37-psp04.00.01.13.patch2 and slightly modifying them to use RGB. I made the following changes:
arch/arm/mach-omap2/ti81xx_fb.c:
Changed hdvpss_capture_sdev_info[ 0 ].vip_port_cfg.ctrlChanSel from VPS_VIP_CTRL_CHAN_SEL_15_8 to VPS_VIP_CTRL_CHAN_DONT_CARE.
Changed hdvpss_capture_sdev_info[ 0 ].vip_port_cfg.video_capture_mode from VPS_CAPT_VIDEO_CAPTURE_MODE_SINGLE_CH_NON_MUX_EMBEDDED_SYNC to VPS_CAPT_VIDEO_CAPTURE_MODE_SINGLE_CH_NON_MUX_DISCRETE_SYNC_HSYNC_VSYNC. This was necessary because the TVP7002 will not output embedded syncs in 444 or RGB mode.
Changed hdvpss_capture_sdev_info[ 0 ].vip_port_cfg.video_if_mode from VPS_CAPT_VIDEO_IF_MODE_16BIT to VSP_CAPT_VIDEO_IF_MODE_24BIT.
Changed hdvpss_capture_sdev_info[ 0 ].vip_port_cfg.input_data_format from FVID2_DF_YUV422P to FVID2_DF_RGB24_888.
drivers/media/video/tvp7002.c:
Changed default I2c register TVP7002_OUT_FORMATTER from 0x47 to 0x04. This sets the TVP7002 to output RGB 30 bit.
I recompiled the kernel to produce a new uImage file in arch/arm/boot and recompiled the modules. I then copied the uImage file to the tftpboot directory as uImage-dm816x-evm.bin. I then copied tvp7002.ko from drivers/media/video to targetfs/lib/modules/2.6.37/kernel/drivers/media/video. I then reset the evaluation module. Everything booted up into linux without any problems.
After that I tried running the saLoopbackFbdev example program, but the system hangs and I have to reset the board.
What am I missing here?
One thing that I've noticed is that there doesn't seem to be any way to indicate that the data from the TVP7002 is no longer 20 bit YUV422 and is now 30 bit RGB (of course the schematic indicates that only 24 of the 30 bits is actually used). There is a V4L2 value for the media bus that seems to indicate this for 20 bit YUV422 (V4L2_MBUS_FMT_YUYV10_1X20), but there isn't a corresponding value that would indicate 30 bit RGB or 24 bit RGB for that matter.
Help?
Carl