Usage of mmap command(in directFB)

kaka <[email protected]> Sun, 25 Nov 2007 17:59:30 +0530
Newsgroups gmane.linux.fbdev.user,gmane.linux.uclinux.devel,gmane.comp.graphics.directfb.user,gmane.comp.graphics.directfb.devel
Message-ID <[email protected]>
--===============0413291665==
Content-Type: multipart/alternative; 
	boundary="----=_Part_35026_14554447.1195993770305"

------=_Part_35026_14554447.1195993770305
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Hi All,

void *mmap(void *start, size_t length, int prot, int flags,           int
fd, off_t offset);

I am providing 1.6MB as length parameter in mmap command.
It is giving me error as Can't mmap region with error number EINVAL. I
searched for the probable causes for EINVAL error number, and cheked it that
i am satisfying all of them

on the other hand when i am providing 1.384MB as length parameter in mmap
command.
It is successful.
This mmap command is being issued from User space(from the DIrectFB code in
systems/fbdev.c)

The exact command which i am writing is
addr = mmap(NULL, dfb_fbdev->shared->fix.mmio_len, PROT_READ | PROT_WRITE,
MAO_SHARED, dfb_fbdev->fd, 0);

Can anybody provide any clue on it?
I want to access the mmio regs at offset (0.9MB to 1.6MB offset).
Also in my system MIPS board(broadcom chip), the framebuffer driver contains
support for MMIO length as 1.6MB.

-- 
Thanks & Regards,
kaka


-- 
Thanks & Regards,
kaka

------=_Part_35026_14554447.1195993770305
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

<div>Hi All,</div>
<div>&nbsp;</div>
<div>void *mmap(void *start, size_t length, int prot, int flags,&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; int<br>fd, off_t offset);<br>&nbsp;</div>
<div>I am providing&nbsp;1.6MB as length parameter in mmap command.</div>
<div>It is giving me error as Can&#39;t mmap region with error number EINVAL. I searched for the probable causes for EINVAL error number, and cheked it that i am satisfying all of them</div>
<div>&nbsp;</div>
<div>on the other hand when i am providing&nbsp;1.384MB as length parameter in mmap command.</div>
<div>It is successful.<br clear="all">This mmap command is being issued from User space(from the DIrectFB code in systems/fbdev.c)</div>
<div>&nbsp;</div>
<div>The exact command which i am writing is </div>
<div>addr = mmap(NULL, dfb_fbdev-&gt;shared-&gt;fix.mmio_len, PROT_READ | PROT_WRITE, MAO_SHARED, dfb_fbdev-&gt;fd, 0);</div>
<div>&nbsp;</div>
<div>Can anybody provide any clue on it?</div>
<div>I want to access the mmio regs at offset (0.9MB to 1.6MB offset).</div>
<div>Also&nbsp;in my system MIPS board(broadcom chip), the framebuffer driver contains support for MMIO length as 1.6MB. </div>
<div><br>-- <br>Thanks &amp; Regards,<br>kaka </div><br clear="all"><br>-- <br>Thanks &amp; Regards,<br>kaka 

------=_Part_35026_14554447.1195993770305--


--===============0413291665==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
--===============0413291665==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Linux-fbdev-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-fbdev-users

--===============0413291665==--