Re: Framebuffer with banked memory
flat view
From: alain volmat <hidden>
Date: 2002-10-31 04:02:29
The safest solution is to create custom fb_write? and fb_read? routines. Maybe James will add these hooks for hardware like yours. Then disallow mmap's except probably for the MMIO regions.
What about adding fb_write / fb_read function in the framebuffer (device dependant) driver. The same way as for fb_mmap. I saw that at the beginning of fb_mmap in fbmem.c, there is a test to see if the device driver contains its own fb_mmap function, if so the device driver fb_mmap will be used instead of the "generic" fb_mmap. What about doing the same thing for fb_write / fb_read.
PS: What's your hardware?
Well actually it's a custom chip. Alain --- Antonino Daplas [off-list ref] a écrit : > On Wed, 2002-10-30 at 18:49, alain volmat wrote:
quoted
Hi, 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 incurrentquoted
framebuffer drivers ?? If so, what is the common solution to do that ??None in the current drivers.quoted
In fact the problem remains in the case of mmap(whichquoted
is the most common ;( of course), since the memory seams to be accessed directly by pointer, theremightquoted
be no wait to detect if we need to set or not an offset. In case of fb_read fb_write, it ispossible toquoted
do that before the actual write at the end (evenif itquoted
is not sooo beautiful ... ).The safest solution is to create custom fb_write? and fb_read? routines. Maybe James will add these hooks for hardware like yours. Then disallow mmap's except probably for the MMIO regions. Creating a bank-switching mechanism, besides entailing a lot of work, is not entirely safe. Tony PS: What's your hardware?
___________________________________________________________ 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