s3c2410fb: BSWP vs HWSWP and colormap handling

Harald Welte laforge at openmoko.org
Sat Mar 17 16:39:57 CET 2007


On Sat, Mar 17, 2007 at 01:05:48AM +0100, Stefan Schmidt wrote:

> We need a way to make this register settings changeable in runtime.
> You already suggested that you like to switch from direct register
> poking for settings to a struct with modes.
> 
> I have not looked yet into fbset, but it should be the best place to
> allow the switching from userspace.

definitely fbset shall be used for mode switching, yes.  But that just
uses the stock ioctl() interface for the framebuffer.

I think the BSWP/HWSWP needs to be part of the mode setting/switching
code inside s3c2410_fb.  Statically, at least for all little-endian
devices.  This should not be different at all between different
machines/boards, since the memory controller and framebuffer controller
is always the same in any s3c2410 device...

> That brings me back to the point that something with the colormap
> handling within s3c2410fb seems wrong.
> 
> In pxafb.c I found the following:
> 
> f (fbi->fb.var.bits_per_pixel == 16)
>         fb_dealloc_cmap(&fbi->fb.cmap);
>     else
>         fb_alloc_cmap(&fbi->fb.cmap, 1<<fbi->fb.var.bits_per_pixel, 0);
> 
> I can't found a fb_alloc_cmap inside the s3c2410fb driver, did I miss
> something here?

No, I think s3c2410_fb just generally does not [yet] support any
non-16bit mode due to the complete lack of colormap handling.

> As somebody who is new to framebuffer development I like to know if my
> assumptions go in the right direction or are total misleading.

I'm also new to framebuffer development,  but I think you are right:
This part of the code seems just completely missing :(

-- 
- Harald Welte <laforge at openmoko.org>          	        http://openmoko.org/
============================================================================
Software for the world's first truly open Free Software mobile phone
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.openmoko.org/pipermail/openmoko-kernel/attachments/20070317/62837597/attachment.pgp 


More information about the openmoko-kernel mailing list