Re: Re: Monocrom Display
Antonino Daplas <[email protected]>
| Newsgroups | gmane.linux.fbdev.user |
|---|---|
| Message-ID | <[email protected]> |
On Sat, 2003-02-22 at 03:22, [email protected] wrote: > Thanks for sugesstions! > > "STATIC_PSEUDOCOLOR" I will check. Problem: My Display have no hardware palette registers. So I can not handle this. It is a fix hardware monochrome black or white. What should I do, if Xserver calls me as "set color palette register"? > If the hardware can only support black and white, then you have to export the visual as FB_VISUAL_MONO01 (1 - black, 0 - white) or FB_VISUAL_MONO10 (0 - black, 1 - white). It's possible for a black and white hardware to have 8 bpp (which means it will only accept 0x00/0xff for black/white). However, the logo drawing function assumes 1bpp only, so monochrome 8-bpp hardware will not have the logo drawn correctly. If your hardware does support 256 colors, but has no hardware registers, then you must export it as STATIC_PSEUDOCOLOR. A correctly-behaving application should recognize that and not attempt to set the color registers. Your driver must however be capable of giving the calling application the default colormap. > Memory is ok. > It's a special trick! Display have no physical memory. Can not mepped this. So a Interval Timer compare with a second shadow buffer and utpade differences to Screen Hardware. It's not good but have no other way. > > In boot process is all ok. FB Text console works. FB logo is also ok. > But how the Xserver Kdrive write only 0x00 into my video RAM? This clear only the full screen. > 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. Tony ------------------------------------------------------- This SF.net email is sponsored by: SlickEdit Inc. Develop an edge. The most comprehensive and flexible code editor you can use. Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial. www.slickedit.com/sourceforge