|
From: Antonino D. <ad...@po...> - 2002-05-03 00:59:51
|
On Fri, 2002-05-03 at 08:03, Ani Joshi wrote:
>
> Well, I didn't try running this code, but its looks from your code below
> that your mmap() is wrong. The first argument in mmap is rarely used and
> typically a hint. You should be using the mmio address (fb_fix.mmio_start)
> in the last argument instead of the first, and have the first agrument 0.
> The last argument is the offset (in this case the physical offset in
> memory).
>
> After further looking at your code, it seems you are mmaping /dev/fb for
> your MMIO. Is this even possible? Shouldn't you be mapping /dev/mem?
> Has someone changed the fbdev layer so you can mmap mmio via /dev/fb?
>
>
DirectFB mmaps mmio via /dev/fb. For the first argument (length), you
have to use a value <= fix.mmio_len, and for the last argument (offset),
you have to use a value >= fix.smem_len. At (offset == fix.smem_len),
the actual mmio offset mmaped is at 0.
By the way, may have to generally use NULL for the first argument
(start).
Tony
> ani
>
>
> On Thu, 2 May 2002, James Simmons wrote:
>
> > dst2 = mmap(fb_fix.mmio_start, fb_fix.mmio_len, PROT_WRITE,MAP_SHARED, fbd, 0);
> > if (!dst2) {
> > fprintf(stderr, "MMap of MMIO of /dev/fb%d failed\n", fbnum);
> > exit(1);
> > }
>
>
>
> _______________________________________________________________
>
> Have big pipes? SourceForge.net is looking for download mirrors. We supply
> the hardware. You get the recognition. Email Us: ban...@so...
> _______________________________________________
> Linux-fbdev-devel mailing list
> Lin...@li...
> https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel
|