Re: user_to_phys() without mmap?



Neil Steiner wrote:
I'm trying to use a framebuffer from user space (think plain video ram,
not some PCI or AGP video card), but mmap'ing from kernel space into
user space is causing large latencies and unsightly artifacts.

Maybe you should map it uncached?

It appears that anything written into the mmap'ed user memory is in
fact being copied into kernel space.

You mean that every access causes a page fault and the performs the access
from inside the kernel? That would basically mean that the memory-mapping
was incomplete/incorrect. Hard to tell without knowing what is going on...


What I was actually hoping was that the memory manager would simply map
the underlying physical pages directly into the user's address space.

I did something similar with Linux 2.2 and 2.4, though it was less than one
page for some buffers and registers. I copied the code from some other
driver in the kernel though, I think it was from some TV receiver card.
Maybe the driver is still there and by reading a bit you could do the same.

Just one thing though: why not use the Linux framebuffer interface?

Uli

.



Relevant Pages

  • Re: kernel source install
    ... Different versions of the wireless tools were used to compile the driver ... Unless you configure the interface to be WEP/WPA ...
    (Fedora)
  • Communication with PCIe device; reading/writing hw registers
    ... I'm fairly new to driver development, but I am supposed to write a driver ... In Linux it is done in such a way that all the device's registers are mapped ... user space and kernel space? ... handle from kernel space to user space, which will allow me to work with the ...
    (microsoft.public.development.device.drivers)
  • sparc ffb drm driver...
    ... This driver is broken and has been since my first CVS merge went in back ... there is no current user space to go with the kernel space driver (Mesa ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Re: sparc ffb drm driver...
    ... > b) there is no current user space to go with the kernel space driver (Mesa ... send the line "unsubscribe linux-kernel" in ...
    (Linux-Kernel)
  • Unbusy sleeping in kernel driver.
    ... I'm writing some char device driver and need to do some unbusy ... sleeping. ... functions provided there in kernel space. ...
    (comp.os.linux.development.system)