linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Framebuffer with banked memory
@ 2002-10-30 10:49 alain volmat
  2002-10-31  0:36 ` Antonino Daplas
  0 siblings, 1 reply; 9+ messages in thread
From: alain volmat @ 2002-10-30 10:49 UTC (permalink / raw)
  To: linux-fbdev-devel

Hi,

I've been searching on the mailing list concerning the
case of writing a framebuffer for a video card which
DOESN'T have linear video memory. Actually I didn't
found any reply to my question.
(well this might means that there is no solution to my
problem .. but in that case I would like
confirmation).

As I said the video card I am now writing a
framebuffer for, doesn't have linear memory, which
means that I can only access a small part of the
memory at a time and then set offset registers in
order to access another part of the memory.

I would like to know if there is such case in current
framebuffer drivers ?? If so, what is the common
solution to do that ??

In fact the problem remains in the case of mmap (which
is the most common ;( of course), since the memory
seams to be accessed directly by pointer, there might
be no wait to detect if we need to set or not an
offset. In case of fb_read fb_write, it is possible to
do that before the actual write at the end (even if it
is not sooo beautiful ... ).

Anyway, it would be very helpful to me if I could get
an answer to this question.
Thanks by advance.

Alain Volmat

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


-------------------------------------------------------
This sf.net email is sponsored by: Influence the future 
of Java(TM) technology. Join the Java Community 
Process(SM) (JCP(SM)) program now. 
http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en

^ permalink raw reply	[flat|nested] 9+ messages in thread
* RE: Framebuffer with banked memory
@ 2002-10-30 21:09 Sottek, Matthew J
  2002-10-31 21:48 ` James Simmons
  0 siblings, 1 reply; 9+ messages in thread
From: Sottek, Matthew J @ 2002-10-30 21:09 UTC (permalink / raw)
  To: 'alain volmat', linux-fbdev-devel


Alain,
   I worked on an i810 driver that would use the banked memory instead of
requiring agp to be functioning at boot time (See the other thread going on
now).  Basically the i810 can use banked memory OR have agpgart.
  The short answer to your problem is that, sadly, much of the 2.4
framebuffer is badly implemented, allowing device independent code to
directly access device memory etc. Some of this is cleaned up for 2.5, but
as I've not looked at it lately I'm not sure how much.  Here are some
pointers as to what is required for 2.4.

#1 The Boot penguin code directly accesses your video memory. If you have
banked memory this will likely fall off the end of a pointer and oops the
kernel or worse.

#2 Read/Write Access video memory directly. I had added a read/write
handler to the fb_ops to hook these out and switch banks. 
Read/write are also incorrect if your pitch != width.

#3 Memory map can't be done. I had coded up a working version that would
map a single back and page fault in the banks as necessary. This worked
but would get hung up on unaligned accesses where one instruction accessed
two memory banks at the same time. So memory map isn't possible.

 The jist was that I could disable memory map. Implement character drawing
with bank switching. Implement read/write handlers that did bank switching,
then make the read/write fops use the handlers. Then lastly redo the
penguin drawing code to use the write handler rather than direct access.
All this to get a console... and not much else.

-Matt



-----Original Message-----
From: alain volmat [mailto:avolmat@yahoo.fr]
Sent: Wednesday, October 30, 2002 2:49 AM
To: linux-fbdev-devel@lists.sourceforge.net
Subject: [Linux-fbdev-devel] Framebuffer with banked memory


Hi,

I've been searching on the mailing list concerning the
case of writing a framebuffer for a video card which
DOESN'T have linear video memory. Actually I didn't
found any reply to my question.
(well this might means that there is no solution to my
problem .. but in that case I would like
confirmation).

As I said the video card I am now writing a
framebuffer for, doesn't have linear memory, which
means that I can only access a small part of the
memory at a time and then set offset registers in
order to access another part of the memory.

I would like to know if there is such case in current
framebuffer drivers ?? If so, what is the common
solution to do that ??

In fact the problem remains in the case of mmap (which
is the most common ;( of course), since the memory
seams to be accessed directly by pointer, there might
be no wait to detect if we need to set or not an
offset. In case of fb_read fb_write, it is possible to
do that before the actual write at the end (even if it
is not sooo beautiful ... ).

Anyway, it would be very helpful to me if I could get
an answer to this question.
Thanks by advance.

Alain Volmat

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


-------------------------------------------------------
This sf.net email is sponsored by: Influence the future 
of Java(TM) technology. Join the Java Community 
Process(SM) (JCP(SM)) program now. 
http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en
_______________________________________________
Linux-fbdev-devel mailing list
Linux-fbdev-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel


-------------------------------------------------------
This sf.net email is sponsored by: Influence the future
of Java(TM) technology. Join the Java Community
Process(SM) (JCP(SM)) program now.
http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en

^ permalink raw reply	[flat|nested] 9+ messages in thread
[parent not found: <1036024422.643.24.camel@daplas>]
* RE: Framebuffer with banked memory
@ 2002-10-31 21:18 Sottek, Matthew J
  0 siblings, 0 replies; 9+ messages in thread
From: Sottek, Matthew J @ 2002-10-31 21:18 UTC (permalink / raw)
  To: 'James Simmons'; +Cc: 'alain volmat', linux-fbdev-devel


>:-( Even with providing your own mmap function you still couldn't get it
>to work.

Is that a question?
I did make it work. It worked just fine however when a client accesses a
bank via the mmap you have to fault in that bank and _unmap_ the other
bank from the client's mmap. This isn't something the kernel lets you
do from a module (for good reason).

The problem is that when one instruction accesses two banks at the same
time there is no possible way to have both banks present and the fault
handler would get stuck trying to satisfy the impossible. It doesn't
happen in normal aligned accesses (I had XFree running on it) but it
is a timebomb waiting to go off so I stopped pursuing it.

-Matt




-------------------------------------------------------
This sf.net email is sponsored by: Influence the future 
of Java(TM) technology. Join the Java Community 
Process(SM) (JCP(SM)) program now. 
http://ads.sourceforge.net/cgi-bin/redirect.pl?sunm0004en

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2002-10-31 21:21 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-10-30 10:49 Framebuffer with banked memory alain volmat
2002-10-31  0:36 ` Antonino Daplas
  -- strict thread matches above, loose matches on Subject: below --
2002-10-30 21:09 Sottek, Matthew J
2002-10-31 21:48 ` James Simmons
     [not found] <1036024422.643.24.camel@daplas>
2002-10-31  4:02 ` alain volmat
2002-10-31 11:04   ` Antonino Daplas
2002-10-31 21:44     ` James Simmons
2002-10-31 21:16       ` Antonino Daplas
2002-10-31 21:18 Sottek, Matthew J

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).