From: Antonino D. <ad...@po...> - 2003-02-23 11:42:51
|
On Sun, 2003-02-23 at 19:31, Antonino Daplas wrote: > > Yes, I saw that. What I meant was XFBDev (and most fb-based > applications) requires that video memory is mappable to userspace, > otherwise the driver will only work within the console. If you need to > have these apps work, then you have to find a way to map the video > memory. Also fix->smem_start requires a physical address, so you need > the virt_to_phys() macro. > > You can try this in xxxfb_encode_fix(): > > fix->smem_start = virt_to_phys(info.vmemory) > > If you're very lucky, vmalloc() might have given you a chunk of memory > that is linear. Do not rely on vmalloc() though, try __get_free_pages() > instead. > BTW: If you do intend to use __get_free_pages(), it will also return a virtual pointer. So you still have to use virt_to_bus() or virt_to_phys(). __get_free_pages() will probably give you around 128-512K of linear memory, possibly more, it depends on the machine architecture. Tony |