Hi all,
We are trying LCD output by DC5 connector(video output connector) directly on TMS320DM6446 EVM. And, we had verified it to be displyed by PSP_ 02_00_00_140\examples\dm644x\fbdev\dlcd_example with camera using composite.
In this point, we have a question. dlcd_exampel is using /dev/video0 for video disply (#define CAPTURE_DEVICE "/dev/video0"). But we know that /dev/video0 can not be supported. So, we this condition has applied on dvsdk_demos_2_00_00_07\dm6446\encodedecode as the following. Additionally, we know that FBDev and V4L2 support devices as the following. [FBDev] /dev/fb/0 - OSD0, /dev/fb2 - OSD2, [V4L2] /dev/video2 - VID0, /dev/vide3 - VID1.
const Display_Attrs Display_Attrs_DM6446_LOGICPD_ATTR_DEFAULT = { // OSD1
1,
Display_Std_FBDEV,
VideoStd_VGA,
Display_Output_LCD,
"/dev/fb/2",
0
};
const Display_Attrs Display_Attrs_DM6446_LOGICPD_OSD_DEFAULT = { // OSD0
2,
Display_Std_FBDEV,
VideoStd_VGA,
Display_Output_LCD,
"/dev/fb/0",
0
};
const Display_Attrs Display_Attrs_DM6446_LOGICPD_VID_DEFAULT = { // VID0
3,
Display_Std_V4L2,
VideoStd_VGA,
Display_Output_LCD,
"/dev/video0",
0
};
And, logs are
root@192.168.0.243:/opt/dm6446# DMAI_DEBUG=2 ./encodedecode
---> + main()
---> parseArgs()
Encodedecode demo started.
---> GTMask.moName ((null))
@0x000c13e0:[T:0x4001f930] ti.sdo.dmai - [Dmai] Dmai log level set to '2'. Note that calling CERuntime_init after this point may cause unexpected change to DMAI tracing behavior.
---> + uiSetup()
---> + UI_create()
---> UIButtons_createButtons()
[k]--->mode : 640x480
---> + - Display[k]--->mode : 640x480
_create() : DispMUX: initialized GPIO0
lay_fbdev_createMUX: initialized RGB666
---> + DisplayMUX: initialized LOEEN
MUX: initialized GPIO3
---> Display De[k]--->mode : 640x480
vice = /dev/fb/2MUX: initialized GPIO46_47
---> + _DisplaMUX: initialized GPIO0
y_sysfsSetup()
MUX: initialized RGB666
---> FileName = MUX: initialized LOEEN
/sys/class/davinci_display/ch0/output), output = LCD
---> _Dmai_writeSysFs() : valString(LCD), val(LCD)
---> FileName(/sys/class/davinci_display/ch0/mode), mode = 640x480
---> _Dmai_writeSysFs() : valString(640x480), val(640x480)
---> - _Display_sysfsSetup()
@0x00183f2a:[T:0x4001f930] ti.sdo.dmai - [Display] Display Device = /dev/fb/2
width=640, height=480, virtual=480
@0x00184215:[T:0x400[k]--->mode : 640x480
1f930] ti.sdo.dm[k]--->mode : 640x480
ai - [BufTab] AlMUX: initialized GPIO46_47
locating BufTab MUX: initialized GPIO0
for 1 buffers
@MUX: initialized RGB666
0x0018443a:[T:0xMUX: initialized LOEEN
4001f930] ti.sdo[k]--->mode : 640x480
.dmai - [Buffer]MUX: initialized GPIO46_47
Set user pointeMUX: initialized GPIO0
r 0x42449000 (phMUX: initialized RGB666
ysical 0x8070000MUX: initialized LOEEN
0)
@0x001849f7:[T:0x4001f930] ti.sdo.dmai - [Display] (1)Display buffer 0 mapped to 0x42449000 has physical address 0
---> + setDisplayBuffer()
---> - setDisplayBuffer()
---> - Display_fbdev_create()
---> Fisrt Display_create() is completed
---> + setDisplayBuffer()
---> - setDisplayBuffer()
---> - UI_create()
---> - uiSetup()
---> + displayThrFxn()
---> + - Display_create() : Display_v4l2_create
---> + Display_v4l2_create()
---> Display Device = /dev/video0
---> + _Display_sysfsSetup()
---> FileName = /sys/class/davinci_display/ch0/output), output = LCD
---> _Dmai_writeSysFs() : valString(LCD), val(LCD)
---> FileName(/sys/class/davinci_display/ch0/mode), mode = 640x480
---> _Dmai_writeSysFs() : valString(640x480), val(640x480)
---> - _Display_sysfsSetup()
@0x0019608a:[T:0x42c75490] ti.sdo.dmai - [Display] Fail to set std to auto select on Bad address <-------------------------------------- (1)
---> Display_create() is completed
Error: Failed to create display device
---> cleanup
---> captureThrFxn()
@0x0019b762:[T:0x43475490] ti.sdo.dmai - [Capture] Checking video standard
@0x001a1e9a:[T:0x43475490] ti.sdo.dmai - [Capture] Capture input set to COMPOSITE
---> videoThrFxn()
@0x001a241b:[T:0x43c75490] ti.sdo.dmai - [BufTab] Allocating BufTab for 4 buffers
@0x001a25c6:[T:0x43c75490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 691200 at 0x43c76000 (0x87bc6000 phys)
@0x001a2796:[T:0x43c75490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 691200 at 0x43d41000 (0x87afb000 phys)
@0x001a292f:[T:0x43c75490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 691200 at 0x43e0c000 (0x87a30000 phys)
@0x001a2ae4:[T:0x43c75490] ti.sdo.dmai - [Buffer] Alloc Buffer of size 691200 at 0x43ed7000 (0x87965000 phys)
@0x001a74b2:[T:0x43475490] ti.sdo.dmai - [Capture] Checking video standard
@0x001adde4:[T:0x43475490] ti.sdo.dmai - [Capture] Capture input set to COMPOSITE
@0x001adef7:[T:0x43475490] ti.sdo.dmai - [Capture] Video input connected size 720x480 pitch 1440
@0x001adff3:[T:0x43475490] ti.sdo.dmai - [BufTab] Allocating BufTab for 3 buffers
@0x001ae1a3:[T:0x43475490] ti.sdo.dmai - [Buffer] Set user pointer 0x43fa2000 (physical 0x80b00000)
@0x001b1fea:[T:0x43475490] ti.sdo.dmai - [Dmai] Driver buffer 0 mapped to 0x43fa2000 has physical address 0x80b00000
@0x001b21aa:[T:0x43475490] ti.sdo.dmai - [Buffer] Set user pointer 0x4407a000 (physical 0x80c00000)
@0x001b6064:[T:0x43475490] ti.sdo.dmai - [Dmai] Driver buffer 1 mapped to 0x4407a000 has physical address 0x80c00000
@0x001b6262:[T:0x43475490] ti.sdo.dmai - [Buffer] Set user pointer 0x44152000 (physical 0x80d00000)
@0x001ba0dc:[T:0x43475490] ti.sdo.dmai - [Dmai] Driver buffer 2 mapped to 0x44152000 has physical address 0x80d00000
@0x001be5f0:[T:0x43475490] ti.sdo.dmai - [Framecopy] Configuring resizer to copy image of resolution 720x480
---> - displayThrFxn()
@0x001c119b:[T:0x43c75490] ti.sdo.dmai - [Buffer] Free Buffer of size 691200 at 0x43c76000 (0x87bc6000 phys)
@0x001c169a:[T:0x43c75490] ti.sdo.dmai - [Buffer] Free Buffer of size 691200 at 0x43d41000 (0x87afb000 phys)
@0x001c1b10:[T:0x43c75490] ti.sdo.dmai - [Buffer] Free Buffer of size 691200 at 0x43e0c000 (0x87a30000 phys)
@0x001c1f79:[T:0x43c75490] ti.sdo.dmai - [Buffer] Free Buffer of size 691200 at 0x43ed7000 (0x87965000 phys)
---> - main()
Although we change into /dev/video2, the result is same.
[Questions]
1. Is it possible to use /dev/video0 for LCD output? I know that VID0(/dev/vidoe2) is used as display device.
2. Why can not /dev/vidoe0 and /dev/video2 be used encodedecode demo? (If we are tring VIDIOC_G_FMT, err code is returned as "Failed to detemine video display format on Invalid argument")
3. Is it possible to use encodedecode demo for LCD output?
Thank you and BRs
FYI, codes of (1) is
/* Determine the video image dimensions */
fmt.type = V4L2_BUF_TYPE_VIDEO_OUTPUT;
cur_std = VPFE_STD_AUTO;
if (ioctl(hDisplay->fd, VIDIOC_S_STD, cur_std) == -1) {
Dmai_err1("Fail to set std to auto select on %s\n", strerror(errno));
cleanup(hDisplay);
return NULL;
}