Hi, LSP_2.00 have a very good archtecture. And I'd like to use it.
I've ported everything from dvsdk on to it. DSPLink, CMem, CodedecEnging, etc.
But when I try to run the demo, Cmem loading is ok, DSPlink loading is ok. but when run interface, system crashed.
I just printfed some infomation and found it crashed when call FBIOPUT_VSCREENINFO. No followed msgs printfed. As the Black an Italy line shows below.
static int screenInit(void)^M
{^M
struct fb_var_screeninfo varInfo;^M
int fd;^M
unsigned short *display;^M
FILE * fp;^M
char mode[16];^M
int status = FAILURE;^M
^M
^M
printf("Will open OSD DEVICE!\n");
fd = open(OSD_DEVICE, O_RDWR);^M
^M
if (fd == -1) {^M
ERR("Failed to open fb device %s\n", OSD_DEVICE);^M
return FAILURE;^M
}^M
^M
printf("Open OSD_DEVICE OK!\n");
if (ioctl(fd, FBIOGET_VSCREENINFO, &varInfo) == -1) {^M
ERR("Failed ioctl FBIOGET_VSCREENINFO on %s\n", OSD_DEVICE);^M
return FAILURE;^M
}^M
^M
if (ioctl(fd, FBIOGET_VSCREENINFO, &varInfo) == -1) {^M
ERR("Failed ioctl FBIOGET_VSCREENINFO on %s\n", OSD_DEVICE);^M
return FAILURE;^M
}^M
printf("ioctl FBIOGET_VSCREEINFO in screenInit OK!\n");
^M
if ((fp = fopen("/sys/class/davinci_display/ch0/mode", "r")) != NULL) {^M
printf("Open davinci_display OK!\n");
fscanf(fp, "%s", mode);^M
fclose(fp);^M
if (strcmp(mode, "NTSC") == 0) {^M
DBG("NTSC selected\n");^M
gbl.yFactor = NTSCSTD;^M
status = SUCCESS;^M
}^M
else if (strcmp(mode, "PAL") == 0) {^M
DBG("PAL selected\n");^M
gbl.yFactor = PALSTD;^M
status = SUCCESS;^M
}^M
}^M
^M
/* Try the requested size */^M
varInfo.xres = SCREEN_WIDTH;^M
varInfo.yres = SCREEN_HEIGHT;^M
varInfo.yres_virtual = NUM_OSD_BUFS * SCREEN_HEIGHT;^M
varInfo.bits_per_pixel = SCREEN_BPP;^M
^M
printf("Will ioctl FBIOPUT_VSCREEINFO in screenInit!\n");
if (ioctl(fd, FBIOPUT_VSCREENINFO, &varInfo) == -1) {^M
printf("Failed ioctl FBIOPUT_VSCREENINFO on %s\n", OSD_DEVICE);
ERR("Failed ioctl FBIOPUT_VSCREENINFO on %s\n", OSD_DEVICE);^M
return FAILURE;^M
}^M
printf("Ioctl FBIOPUT_VSCREEINFO in screenInit OK!\n");
^M
if (varInfo.xres != SCREEN_WIDTH ||^M
varInfo.yres != SCREEN_HEIGHT ||^M
varInfo.bits_per_pixel != SCREEN_BPP) {^M
ERR("Failed to get the requested screen size: %dx%d at %d bpp\n",^M
SCREEN_WIDTH, SCREEN_HEIGHT, SCREEN_BPP);^M
}^M
^M
printf("will call mmap in screenInit!\n");
display = (unsigned short *) mmap(NULL, SCREEN_SIZE, PROT_READ | PROT_WRITE,^M
MAP_SHARED, fd, 0);^M
^M
if (display == MAP_FAILED) {^M
ERR("Failed mmap on %s\n", OSD_DEVICE);^M
can anybody tell me how pass through.
And because I have to run kdrive based win. I need to use new kernel over gcc-4.2.x for 20% higher performance than MVtool4.0.
Please help me!
And as anybody want I can share you my GCC toolchain and my DVSDK ports.
Thanks