From: "Antonino A. Daplas" <adaplas@gmail.com>
To: linux-fbdev-devel@lists.sourceforge.net
Subject: Re: Gives Bus error in memcpy() in coping /dev/fb0 to a file.
Date: Fri, 09 Mar 2007 05:49:39 +0800 [thread overview]
Message-ID: <1173390579.6201.7.camel@daplas> (raw)
In-Reply-To: <c4f20e170703080939m2398197dg9653dc22902f1481@mail.gmail.com>
On Thu, 2007-03-08 at 17:39 +0000, Nuno Lucas wrote:
> On 3/8/07, Antonino A. Daplas <adaplas@gmail.com> wrote:
> > On Wed, 2007-03-07 at 17:20 +0530, Vishal Soni wrote:
> > > hello,
> > >
> > > I am trying to get the snapshot of the screen through a c program by mmaping
> > > the framebuffer device /dev/fb0 .
> > > For this i compiled kernel with virtual framebuffer support and passing
> > > vga=791 as boot line argument.
> > >
> > > Though i am able to get snapshot by
> > > [root@tw pcapp]# cat /dev/fb0 > frame
> > >
> > > and see it on the screen by
> > > [root@tw pcapp]# cat frame > /dev/fb0
> > >
> > > But when i try to capture the frame buffer using the below c code, It gives
> > > bus error @ memcpy()
> > >
> > > Output :::::::::
> > >
> > > [root@tw pcapp]# ./pcapp
> > > 1024x768, 16bpp
> > > framebuffer device mapped to memory @ 0xb7db3000.
> > > FB_FRAME mapped to memory @ 0xb7c33000.
> > > Bus error
> >
> > I don't think vfb's framebuffer can be mmapped. It's fixable, but
> > nobody seems to have a need for it, yet.
>
> Having read about the Hecuba driver, using the deferred IO patch,
> isn't that a better starting point for a virtual fb driver? One could
> just ignore the deferred IO and have an instant virtual frame buffer.
> With just a little bit of effort and one could even make a
> para-virtual driver for Xen and/or KVM.
>
> I'm just a curious soul lying on this list but would appreciate
> someone to correct my thinking.
>
Yes, something like that without the mkwrite method.
The classic method was to use get_free_pages to allocate the memory and
mark the range as reserved and io.
Tony
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
next prev parent reply other threads:[~2007-03-08 21:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-07 11:50 Gives Bus error in memcpy() in coping /dev/fb0 to a file Vishal Soni
2007-03-08 13:05 ` Antonino A. Daplas
2007-03-08 17:39 ` Nuno Lucas
2007-03-08 21:49 ` Antonino A. Daplas [this message]
[not found] ` <200703091021.46041.vishal.soni@samsung.com>
2007-03-09 8:54 ` Antonino A. Daplas
2007-03-09 4:59 ` Vishal Soni
2007-03-09 9:09 ` Vishal Soni
2007-03-09 17:55 ` Antonino A. Daplas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1173390579.6201.7.camel@daplas \
--to=adaplas@gmail.com \
--cc=linux-fbdev-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.