This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/TMS320DM355: DVSDK - 3_10_00_19 - OSD->win[0] already allocated issue.

Part Number: TMS320DM355
Other Parts Discussed in Thread: TVP5146

Tool/software: Linux

Board: EVMDM355 

PSP Kernel: Linux dm355-evm 2.6.32-rc2-davinci1 

dvsdk:  3_10_00_19

The problem seems to be that on BOOT up - the OSD Windows are allocated and never released.... then when the sample app TRIES to run it attempts to allocate the OSD window and fails.  Has anyone ever see this and is there a better way to correct the problem that "Ignoring" it its allocated or not?

(See below for boot / execution / hack details) 


*** Boot Kernel *** (Put in mesgs that say when the osd->win[] is allocated - and when it's released.

davinci_disp_request_layer win[]->is_allocated = 1
davincifb davincifb.0: dm_osd0_fb: Initial window configuration is invalid.
Console: switching to colour frame buffer device 90x36
davincifb davincifb.0: dm_osd0_fb: 720x576x16@0,0 with framebuffer size 2025KB
davinci_disp_request_layer win[]->is_allocated = 1
davincifb davincifb.0: dm_vid0_fb: Initial window configuration is invalid.
davincifb davincifb.0: dm_vid0_fb: 720x576x16@0,0 with framebuffer size 2500KB
davinci_disp_request_layer win[]->is_allocated = 1
davincifb davincifb.0: dm_osd1_fb: 720x480x4@0,0 with framebuffer size 1350KB
davinci_disp_request_layer win[]->is_allocated = 1
davincifb davincifb.0: dm_vid1_fb: Initial window configuration is invalid.
davincifb davincifb.0: dm_vid1_fb: 720x576x16@0,0 with framebuffer size 2500KB
imp serializer initialized
davinci_previewer initialized
davinci_resizer initialized

** Load Modules ***

root@dm355-evm:/opt/dvsdk/dm355# ./loadmodules.sh
CMEMK module: built on Feb 15 2017 at 14:29:47
Reference Linux version 2.6.32
File /home/dsmith/Desktop/dvsdk/dvsdk_3_10_00_19/linuxutils_2_25_04_10/packages/ti/sdo/linuxutils/cmem/src/module/cmemk.c
allocated heap buffer 0xc9000000 of size 0x45b000
cmemk initialized
IRQK module: built on Feb 15 2017 at 14:30:01
Reference Linux version 2.6.32
File /home/dsmith/Desktop/dvsdk/dvsdk_3_10_00_19/linuxutils_2_25_04_10/packages/ti/sdo/linuxutils/irq/src/module/irqk.c
irqk initialized
EDMAK module: built on Feb 15 2017 at 14:29:57
Reference Linux version 2.6.32
File /home/dsmith/Desktop/dvsdk/dvsdk_3_10_00_19/linuxutils_2_25_04_10/packages/ti/sdo/linuxutils/edma/src/module/edmak.c


** encode video - using example code **

root@dm355-evm:/opt/dvsdk/dm355# ./encode -r 352x240 -t 10 -v video.mpeg4
Encode demo started.
tvp514x 1-005d: tvp5146 (Version - 0x03) found at 0xba (DaVinci I2C adapter)
vpfe-capture vpfe-capture: width = 720, height = 480, bpp = 2
vpfe-capture vpfe-capture: adjusted width = 720, height = 480, bpp = 2, bytesperline = 1440, sizeimage = 691200
vpfe-capture vpfe-capture: width = 720, height = 480, bpp = 2
vpfe-capture vpfe-capture: adjusted width = 720, height = 480, bpp = 2, bytesperline = 1440, sizeimage = 691200
davinci_v4l2 davinci_v4l2.1: Unable to configure video layer for id = 0


**** IF i FORCE the is_allocated to off in set this in "drivers/media/video/davinci/davinci_osd.c"

int davinci_disp_request_layer(enum davinci_disp_layer layer)

// if (win->is_allocated) {
if (0) {
spin_unlock_irqrestore(&osd->lock, flags);
return -1;
}
win->is_allocated = 1;

****

I get this:


root@dm355-evm:/opt/dvsdk/dm355# ./encode -r 352x240 -t 10 -v video.mpeg4
JFFS2 notice: (2146) check_node_data: wrong data CRC in data node at 0x190355e8: read 0xbff8d7c2, calculated 0xe7040989.
Encode demo started.
tvp514x 1-005d: tvp5146 (Version - 0x03) found at 0xba (DaVinci I2C adapter)
vpfe-capture vpfe-capture: width = 720, height = 480, bpp = 2
vpfe-capture vpfe-capture: adjusted width = 720, height = 480, bpp = 2, bytesperline = 1440, sizeimage = 691200
vpfe-capture vpfe-capture: width = 720, height = 480, bpp = 2
vpfe-capture vpfe-capture: adjusted width = 720, height = 480, bpp = 2, bytesperline = 1440, sizeimage = 691200
davinci_disp_request_layer win[]->is_allocated = 1
davinci_v4l2 davinci_v4l2.1: Before finishing with S_FMT:
layer.pix_fmt.bytesperline = 1440,
layer.pix_fmt.width = 720,
layer.pix_fmt.height = 480,
layer.pix_fmt.sizeimage =1382400
davinci_v4l2 davinci_v4l2.1: pixfmt->width = 720,
layer->layer_info.config.line_length= 1440
davinci_resizer davinci_resizer.2: RSZ_G_CONFIG:1:0:128
davinci_resizer davinci_resizer.2: RSZ_G_CONFIG:1:0:128
davinci_disp_release_layer win[]->is_allocated = 0

** Video REcorded... Success - but with an ugly hack!