Hi everyone,
I`m working on DM8148 boot logo on DVO2 with 720P60 ..
Now the dvo2 port of hdvpss is set to 720P60 and work well (tv can detecte 720p60 signal correctly).
But there is no logo data on tv. Just something like background data(black screen) is show on tv.
I have no idea to debug on tihis problem. Something wrong with grpx / vpdma setting ? Can you give me some advise to debug ? Thanks verymuch.
My logo data is loaded by tftp at uboot stage : "tftp 0x82000000 car.bmp; "
start logo display at uboot stage : " logo on 0x82000000 0xA0000000 0x81600000 10 60 "
(logo on img_src img_dst vpdma_desc_dest disp_time disp_fps)
here is the code .
/**************************************************************/
static int do_boot_logo(cmd_tbl_t * cmdtp,int flag, int argc, char *argv[])
{
uint32_t *firmware_addr;
uint32_t *list_addr;
uint32_t *payload_buffer;
uint32_t size;
uint32_t image_source = 0;
uint32_t disp_time = 0;
uint32_t disp_fps = 0;
uint32_t image_dest = 0;
uint32_t vpdma_desc_dest = 0;
uint32_t paddr;
/* check whether the arguments passed are correct */
if (argc < 2)
{
cmd_usage(cmdtp);
return 1;
}
else if (strcmp(argv[1],"on") == 0)
{
if (argc != 7)
{
cmd_usage(cmdtp);
return 1;
}
else
{
/* address in memory where bmp image is loaded */
image_source = simple_strtoul(argv[2], NULL, 16);
image_dest = simple_strtoul(argv[3], NULL, 16);
vpdma_desc_dest = simple_strtoul(argv[4], NULL, 16); /* set by arguement --- 0x81600000 */
disp_time = simple_strtoul(argv[5], NULL, 10);
if(disp_time <= 0)
{
printf("Bootup splash display time is out of range, using default value(60s)\n");
disp_time = DEFAULT_BOOT_LOGO_DISPLAY_TIME_IN_SECS;
}
disp_fps = simple_strtoul(argv[6], NULL, 10);
if((disp_fps > 60) || (disp_fps < 1))
{
printf("Bootup splash display FPS entered is out of range, using default value(60fps)\n");
disp_fps = DEFAULT_BOOT_LOGO_DISPLAY_FPS;
}
}
}
else if (strcmp(argv[1],"off") == 0)
{
vpdma_write32(VPDMA_LIST_ATTR, vpdma_read32(VPDMA_LIST_ATTR)
| (VPDMA_LIST_NUMBER_HD<<24) /* list number */
| (1<<20) /* stop bit for list */
);
vpdma_write32(VPDMA_LIST_ATTR, vpdma_read32(VPDMA_LIST_ATTR)
| (VPDMA_LIST_NUMBER_SD<<24) /* list number */
| (1<<20) /* stop bit for list */
);
return 0;
}
else
{
cmd_usage(cmdtp);
return 1;
}
/* memory address for loading vpdma firmware and descriptors, payload */
firmware_addr = (uint32_t*)(vpdma_desc_dest+VPDMA_DESC_FIRMWARE_OFFSET);
payload_buffer = (uint32_t*)(vpdma_desc_dest+VPDMA_DESC_PAYLOAD_OFFSET);
list_addr = (uint32_t*)(vpdma_desc_dest+VPDMA_DESC_LIST_OFFSET);
/* memory address for displaying the image formatted on the hdmi, the offset from the source location is 2 * WIDTH * HEIGHT */
//image_dest = image_source + 3 * 3 * WIDTH * HEIGHT;
if(image_source == image_dest)
{
printf("\nERROR: <logo_read_address> & <final_bmp address> cannot be same\n");
return -1;
}
if((image_source == 0) || (image_dest == 0))
{
printf("\nERROR: <logo_read_address> or <final_bmp address> is NULL\n");
return -1;
}
/* reading the bmp image from the specified location */
if(ti810x_read_bmp_image(image_source,image_dest) == -1)
{
printf("\nERROR: reading BMP image failed\n");
return -1;
}
/********************[SET DVO2 PORT]*******************/
if(ti810x_prcm_init() == -1)
{
#ifdef DEBUG_VPSS
printf("\nERROR: ti810x_prcm_init failed\n");
#endif
return -1;
}
/**Control module PINMUX settings**/
//ti810x_control_pinmux();
if(ti810x_pll_init() == -1)
{
#ifdef DEBUG_VPSS
printf("\nERROR: ti810x_pll_init failed\n");
#endif
return -1;
}
if(ti810x_vps_init() == -1)
{
#ifdef DEBUG_VPSS
printf("\nERROR: ti810x_vps_init failed\n");
#endif
return -1;
}
if(ti810x_set_mode(1,WIDTH,HEIGHT,argv[0]) == -1)
{
#ifdef DEBUG_VPSS
printf("\nERROR: ti810x_set_mode failed\n");
#endif
return -1;
}
#if 0 /* We don`t use SD port && won`t set i2c-device under hdvpss */
#ifdef CONFIG_I2C
#ifndef CONFIG_TI814X
configure_i2c_sd_thsfilter();
#endif
#ifndef CONFIG_UD8107_DVR
configure_i2c_sii9022a();
#endif
#endif
//set the SD clocks Video0 PLL to fixed 54MHz
ti810x_pll_configure_SD();
//configure the SD Venc parameters, and set the work mode as normal mode
ti810x_configure_SD_venc_registers(NORMAL_MODE);
#endif
/********************[SET DVO2 PORT]*******************/
if (ti810x_vpdma_load_firmware(firmware_addr) == -1)
{
#ifdef DEBUG_VPSS
printf("\nERROR: vpdma_load_firmware failed\n");
#endif
return -1;
}
/* destination address */
paddr = image_dest;
/* HDMI->VGA Configuration Desc:GRPX0 */
/* Allocate physical memory for MV data */
size = ti810x_dispmgr_create_grpx_conf_descriptor(0, list_addr, payload_buffer,WIDTH,HEIGHT);
ti810x_vpdma_send_list(list_addr, size, 0);//last param 0, list number hardcoded for HDMI->VGA
/* wait for list complete interrupt */
if(ti810x_dispmgr_wait_for_list_complete(1) == -1)
{
#ifdef DEBUG_VPSS
printf("\nERROR: wait for list complete FAILED!\n");
#endif
return -1;
}
/* DVO2 Configuration Desc:GRPX1 */ /*Review[VIVB]*/
/* Allocate physical memory for MV data */
size = ti810x_dispmgr_create_grpx_conf_descriptor(1, list_addr + 0x40000, payload_buffer + 0x10,WIDTH,HEIGHT);
ti810x_vpdma_send_list(list_addr + 0x40000, size, 1);//last param 1, list number hardcoded for DVO2
/* wait for list complete interrupt */
if(ti810x_dispmgr_wait_for_list_complete(1) == -1)
{
#ifdef DEBUG_VPSS
printf("\nERROR: wait for list complete FAILED!\n");
#endif
return -1;
}
#if 0 /* We don`t use SD port */
//SD Configuration Desc:GRPX2
size = ti810x_dispmgr_create_grpx_conf_descriptor(2, list_addr + 0x20000, payload_buffer + 0x8,WIDTH,HEIGHT);
ti810x_vpdma_send_list(list_addr + 0x20000, size, 2);
// wait for list complete interrupt
if(ti810x_dispmgr_wait_for_list_complete(2) == -1)
{
#ifdef DEBUG_VPSS
printf("\nERROR: wait for list complete FAILED!\n");
#endif
return -1;
}
#endif
// the frame start event must be properly set, or will cause screen scroll issue
//set the frame start event of GRPX2 to 'channel active'
vpdma_write32(VPDMA_GRPX0_DATA_CSTAT,0x00001C00);// Hardcoded: HDMI(+VGA)->GRPX0 (0x00001C00)(0x00000000)
vpdma_write32(VPDMA_GRPX1_DATA_CSTAT,0x00001C00);// Hardcoded: DVO2->GRPX1 (0x00001C00)(0x00000400)
//vpdma_write32(VPDMA_GRPX2_DATA_CSTAT,0x00000C00);// Hardcoded: SD->GRPX2
//set the frame start event of GRPX1 to 'SD field ID changes'
//DATA Descriptors for HDMI/VGA
size = ti810x_dispmgr_setup_layers(list_addr,STRIDE,WIDTH,HEIGHT,disp_time,disp_fps,paddr);
ti810x_vpdma_send_list(list_addr, size, VPDMA_LIST_NUMBER_HD); //list_no = 4
//create data transfer descriptor for GRPX1
//the list_addr has 0x10000 offset, because 2 GRPX share the same GRPX desc buffer = 4096 descs
size = ti810x_dispmgr_setup_layers_DVO2(list_addr + 0x40000,STRIDE,WIDTH,HEIGHT,disp_time,disp_fps,paddr);
ti810x_vpdma_send_list(list_addr + 0x40000, size, VPDMA_LIST_NUMBER_DVO2); //list_no = 3
#if 0 /* We don`t use SD port */
//DATA Descriptors for SD
size = ti810x_dispmgr_setup_layers_SD(list_addr + 0x20000,STRIDE,WIDTH,HEIGHT,disp_time,disp_fps,paddr);
ti810x_vpdma_send_list(list_addr + 0x20000, size, VPDMA_LIST_NUMBER_SD); //list_no = 5
#endif
while (ti810x_dispmgr_wait_for_list_complete(1) == -1)
{
printf("ti810x_dispmgr_wait_for_list_complete is busy \n");
};
return 0;
}
/************************************************************************************************************************/