Re: Monocrom Display

Antonino Daplas <[email protected]>
Newsgroups gmane.linux.fbdev.user
Message-ID <[email protected]>
On Fri, 2003-02-21 at 20:24, [email protected] wrote:
> Hello Andre!
> 
> I have also problem to with SED1335 controller on BW LCD. I'm using my self writing driver based on fbcon-*.c
> 
> If booting with bpp=1 the linux logo is ok, text console is ok, but Xserver/Kdrive/Xfbdev don't work. In bpp=8 console text ok, but linux logo is black only, XServer shows only a empty screen.
> 
> So I'm think it is a palette problem. In my fact: I have no palette. I have only black or white.
> I don't know how handle functions ...encode_fix, ...decode_var, ...encode_var, ...get_par and ...set_par?
> 
> ftp://ssv-embedded.de/ssv/products/trm916/sample/x86/linux/fbdev/linux-2.4.20-fb916-20.patch.gz
> 
> Henry
> 
> 

Hi,

I checked your setcolreg() function and I don't see it setting the
hardware color registers.  The logo needs index 32 to index 255 to
display the logo.  One way or another you have to set this, unless your
hardware cannot set/hardwires the color registers (in which case you
need to use STATIC_PSEUDOCOLOR).

Secondly (but I'm not sure about this), you are using virtual memory
(vmalloc) for your screen_base (vmemory).  Then you use the same value
for fix->smem_start in encode_fix.  fix->smem_start requires a physical
address, not the virtual address.  Another problem is using the
virt_to_phys() or virt_to_bus() macro with a virtual pointer may not
work, since memory allocated by vmalloc is not guaranteed to be linear,
unless you're lucky.  So, your video memory may not be mappable to
user_space and apps which uses mmap, like XFBdev, may not work.

So if you want these kinds of apps to work  you might want to consider
another method of allocating video memory.  You can try __get_free_pages
but this is too expensive and the size you get is limited (pagesize *
2^page_order)  I don't know the maximum page order but I'm pretty sure
it's not a large amount.  Perhaps another solution is to create a
scatter-gather buffer.

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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.