[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[microblaze-uclinux] mmap fails when executed on frame buffer device /dev/fb0



I have a custom frame buffer which I believe is active.  I assume that this frame buffer is actively executing because of the following three observations:
 
1) The /dev/fb0 device exists
 
2) I can see the printk messages appear when the OS boots:
   myfb.c: framebuffer at 0x14000000, mapped to 0x14000000, using 4096K, total 4096K
   myfb.c: mode is 1024x768x32, linelength=4096
   fb0: virtual frame buffer device, using 4096K of video memory, at address 0x14000000
 
3) I can also see the I/O memory space I requested using the "cat /proc/iomem" command:
   > cat /proc/iomem
   14000000-143fffff : My Frame Buffer RAM
   ...
 
 
Now, I want to test the frame buffer.
All of the basic code examples that I have found which communicate with a frame buffer all perform a call to mmap( ).
For example:
   fbdev=open("/dev/fb0", O_RDWR);
   fb=(Uint16 *)mmap(0, 320*240*sizeof(uint16), PROT_WRITE, MAP_SHARED, fbdev, 0);
I always get ENODEV when I call mmap( ) ...
Actually the fb_mmap( ) function declared in fb_ops is not even called.
 
Any ideas on what could be causing this ?
Have I missed something ?
 
Regards,
 
Mario