From: Sven Luther <sven.luther@wanadoo.fr>
To: Jim Hague <jim.hague@acm.org>
Cc: Sven Luther <sven.luther@wanadoo.fr>,
linux-fbdev-devel@lists.sourceforge.net
Subject: Re: New API and X option UseFBDev
Date: Wed, 10 Sep 2003 06:52:20 +0200 [thread overview]
Message-ID: <20030910045220.GB1560@iliana> (raw)
In-Reply-To: <XFMail.20030909235953.jim.hague@acm.org>
On Tue, Sep 09, 2003 at 11:59:53PM +0100, Jim Hague wrote:
> On 09-Sep-2003 Sven Luther wrote:
> > Mmm, notice that the :
> >
> > (--) GLINT(0): Linear framebuffer at 0xCE800000
> > (--) GLINT(0): MMIO registers at 0xCFFE0000
> > (EE) GLINT(0): mmap mmio: Invalid argument
> > (EE) GLINT(0): mmap mmio: Invalid argument
> >
> > means that the linear framebuffer and mmio registers, values given to
> > you by pm2fb, are correct (but check this fact with lspci). GLINTMapMem
> > should call fbdevHWMapVidmem, so i suppose the message you see are from
> > fbdevhw. Try enabling the DEBUG #define in glint_driver.c to get a bit
> > more context.
>
> I'd notice that. The code in question is in fbdevhw.c.
Ok.
> I've abstracted the problem out into the test program below. It mimics what
> fbdehhw.c does, namely open the frame buffer device, get the fix screen info
> and (I'm assuming) mmap() the io (I haven't delved through the detail
> of /dev/fb0).
>
> I've run this on 2.4.22-pre6-ac1 and it works fine, and by implication, since
> X via UseFBDev has worked since then, since early 2.4. Here's the output:
>
> PAGE_MASK 0xfffff000, ~PAGE_MASK 0xfff
> smem_start 0xcf000000 smem_len 0x400000, mmio_start 0xcffe0000, mmio_len 0x10000
> fb_off 0x0 fb_len 0x400000, mmio_off 0x0, mmio_len 0x10000
> mmap(NULL, 0x10000, PROT_READ | PROT_WRITE, MAP_SHARED, 3, 0x400000)
> Worked - map 0x40016000
>
> On 2.6.0-test3 and 2.6.0-test5 the mmap() fails with EINVAL. Again, the output:
>
> PAGE_MASK 0xfffff000, ~PAGE_MASK 0xfff
> smem_start 0xcf000000 smem_len 0x400000, mmio_start 0xcffe0000, mmio_len 0x10000
> fb_off 0x0 fb_len 0x400000, mmio_off 0x0, mmio_len 0x10000
> mmap(NULL, 0x10000, PROT_READ | PROT_WRITE, MAP_SHARED, 3, 0x400000)
> mmap mmio: Invalid argument (22)
>
> As you see, the parameters to mmap() are identical. The problem is fb_len -
> reduce this to, say, 0x3f0000 and mmap() works.
>
> Any suggestions as to where to look next?
It sounds like a kernel problem, and i can't help you more about this.
Still, and sorry if i am speaking non-sense, but it is early morning,
but in the :
> map = mmap(NULL, mmio_len, PROT_READ | PROT_WRITE, MAP_SHARED,
> fd, fb_len);
Code, i see nowhere that you make mention of the corresponding offsets.
In a small program i did myself for accessing my graphic card by hand, i
did :
base = mmap((caddr_t)0, Size, PROT_READ|PROT_WRITE,
MAP_SHARED|MAP_LOCKED, fd, (off_t)Base);
so your fb_len should maybe have been mmio_start, i think.
Friendly,
Sven Luther
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
next prev parent reply other threads:[~2003-09-10 4:53 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-09-09 6:49 New API and X option UseFBDev Jim Hague
2003-09-09 9:21 ` Michel Dänzer
2003-09-09 13:53 ` Jim Hague
2003-09-09 10:08 ` Sven Luther
2003-09-09 13:57 ` Jim Hague
2003-09-09 16:40 ` Sven Luther
2003-09-09 22:59 ` Jim Hague
2003-09-10 4:52 ` Sven Luther [this message]
2003-09-10 9:52 ` Jim Hague
2003-09-10 9:58 ` Sven Luther
2003-09-10 10:48 ` Jim Hague
2003-09-10 10:55 ` Sven Luther
2003-09-12 18:16 ` James Simmons
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=20030910045220.GB1560@iliana \
--to=sven.luther@wanadoo.fr \
--cc=jim.hague@acm.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).