I'm doing some tests with a nonstandard LCD display (240x320 not interlaced). I've
already set the "low level" and the HW signals (HSYNC, VSYNC and so on) are
fine, but I'm having some troubles with the OSD registers. I'd like to use the 16-bit
rgb565 format for the frame buffer (which is the same used by the DVEVM demos,
apparently), therefore I've disabled all the windows except for OSD0, and I've set the
OSD registers as follows:
01C72600 (MODE)=0x00000000
01C72608 (OSDWIN0MD)=0x00002001 (16-bit, field mode)
01C72620 (OSDWIN0OFST)=0x0000000F (240 pixel per line)
01C72640 (BASEPX)=0x00000018 (like HSTART)
01C72644 (BASEPY)=0x00000005 (like VSTART)
01C72668 (OSDWIN0XP)=0x00000000
01C7266C (OSDWIN0YP)=0x00000000
01C72670 (OSDWIN0XL)=0x000000F0 (240 pixel width)
01C72674 (OSDWIN0YL)=0x00000140 (320 pixel height)
Then, I use the pointer returned by the VPBE driver's mmap():
fd = open(OSD_DEVICE, O_RDWR);
[...]
display = (unsigned short *)mmap(NULL, 320*240*2, PROT_READ | PROT_WRITE,
MAP_SHARED, fd, 0);
[...]
The problem is that when I try to write to the returned pointer, the data isn't organized
as I was expecting, like a "linear" array of 16-bit RGB565 structures starting
from the top left and ending to the bottom right. Instead it's a big mess, disaligned,
apparently divided in banks, etc. Am I missing something? What can I do in order to
allocate a linear, flat framebuffer?
Cheers, Lorenzo
_______________________________________________
Davinci-linux-open-source mailing list
[email protected]
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source