Thread (4 messages) 4 messages, 3 authors, 2003-05-12

Re: Framebuffer on banked video memory device (MMAP/NOPAGE)

flat view

From: alain volmat <hidden>
Date: 2003-05-12 06:30:35

I forget to mention that I'm using kernel 2.4.19 on
SH3 (big endian).

Alain

 --- alain volmat [off-list ref] a écrit : > Hello
guys,
my email concern MMAP / NOPAGE but applied to
framebuffer so I decided to write here.
Actually it's about an old story I wrote about few
months ago; having a framebuffer for a custom chip
which has video memory banked (ie, I need to set
manually registers of the chip in order to select
which bank of the memory I want to be visible from
the
CPU).
FBCON works perfectly on the top of this framebuffer
(I have overwritten fb_readb/w/l and fb_writeb/w/l
to
be able to insert those bank switch thing), but I am
still facing lot of problems concerning MMAP access
to
framebuffer memory.
In case of MMAP, I cannot control bank switching as
easier as in case of FBCON. By using the NOPAGE
handler, I can switch bank but still it seems that
it
doesn't work in the perfect way.

First let me explain a bit more; the memory to be
MMAPed is physical memory (not allocated). Inside
the
mmap function nothing is done except passing the
structure for the NOPAGE handler; the NOPAGE handler
is then in charge of calling "remap_page_range" and
"pgd_offset", "pmd_offset" and "pte_offset".
I've noticed that in that case, the NOPAGE handler
is
actually only called once per bank. I mean if a page
has never been mapped before then the nopage handler
will be called, but after that the nopage handler
will
never again be called. As a result, my display is
only
refresh once (in full) and then after only 1 bank is
accessed (because the nopage handler is not called).
In order to have the nopage handler always called, I
tried to modify my NOPAGE handler to make him FORGET
about the previous mapped page. (in that case at a
time only 1 page is always mapped). I don't think
it's
a good solution but currently I use
"zap_page_range".
Well this function was not static but I had to
EXPORT
it to make it available to module. I don't think it
is
the right solution but since I didn't find anybody
who's facing this problem I've checked a bit
memory.c
to find this function.

Actually I'm quite surprise to see that nobody is
facing this problem, (well maybe it's just my
misunderstanding of the use of nopage handler), why
does the NOPAGE handler is only call once. Are there
any way to make it forget previous page ??

Even with this modification everything doesn't works
fine, well I got all the display refreshed but it
seems that (maybe due to timing issue) sometimes it
mistake bank. I know that this problem is related to
MMAP/NOPAGE because this problem doesn't happens at
all for FBCON, even if the way to control the
hardware
is same. I would like to learn more about timing of
the NOPAGE handler, when is it called ? does the
process "stop" during that time and wait or just
continue ?

Sorry ... I noticed that my email is finally more
related to MMAP/NOPAGE that actually framebuffer
itself, but I also would like to know if some people
have framebuffer on banked memory device.

Sincerely,
Alain
___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et
en français !
Yahoo! Mail : http://fr.mail.yahoo.com

-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6,
2003, Santa Clara
The only event dedicated to issues related to Linux
enterprise solutions
www.enterpriselinuxforum.com

_______________________________________________
Linux-fbdev-devel mailing list
Linux-fbdev-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel 

___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.com


-------------------------------------------------------
Enterprise Linux Forum Conference & Expo, June 4-6, 2003, Santa Clara
The only event dedicated to issues related to Linux enterprise solutions
www.enterpriselinuxforum.com
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help