lcd2vga board video mode

anton
Hi!

I've bought mini6410 with lcd2vga board.
Everything works fine with linux 2.6.26,
but video mode. It seems vga board is working
in 16k color mode and pictures are ugly, especially,
gradients. I've tried to pass different framebuffer modes
to kernel like vga=mode, unfortunately it didn't
change anything. So, am I doing anything wrong, or
lcd2vga can't work in different mode?

Juergen Beisert
What is a "16k" colour mode?

anton
That is 16 bit mode. Not true color.

Juergen Beisert
Okay, so it is a 64 k true colour mode (RGB565). This is the default colour
depth the board file sets up for the driver.  I don't know your 2.6.26
kernel. In recent Linux kernels (3.1) you can change it in the
"linux/arch/arm/mach-s3c64xx/mach-mini6410.c" board file, search for
structure "s3c_fb_pd_win" and its member ".default_bpp".

anton
Thanks for help!

anton
So, lcd2vga does not support 16 M colour mode?

Juergen Beisert
Its not related to the lcd2vga adapter. Its only a driver setting.

anton
Thanks for help.
I've changed .default_bpp as you suggested.
But with no effect.
All things seems to be ok, except gradients.
Every picture has gradient looks not good.

Juergen Beisert
The full 24 bit RGB888 data are available at the connectors LCD3 and LCD2.
Maybe the pins at the CPU are not full configured to support 24 bits per
pixel. In recent kernels the function "s3c64xx_fb_gpio_setup_24bpp()"
exists to setup all required pins. Do you still use the 2.6.26 kernel? Is a
function like this existing in your kernel?

anton
I've downloaded linux-2.6.36 from 
friendlyarm.net and use this kernel.
I didn't found "s3c64xx_fb_gpio_setup_24bpp()"
in "linux/arch/arm/mach-s3c64xx/mach-mini6410.c"
file. Just ".setup_gpio  = s3c64xx_fb_gpio_setup_24bpp"
in "s3c_fb_platdata mini6410_lcd_pdata __initdata" structure.
So, should I get the newer kernel?
Thanks!

Juergen Beisert
Hmm, you should try with a vanilla kernel.

anton
Ok, but an "linux/arch/arm/mach-s3c64xx/mach-mini6410.c" 
is specific for mini6410 board, isn't it? 
And, as I understand, there isn't it file in kernel tree.

Juergen Beisert
Yes, the "arch/arm/mach-s3c64xx/mach-mini6410.c" file is the so called
board file and does the specific setup for the Mini6410 board. And this
file is part of the plain vanilla linux kernel. As of today:

> ls -l arch/arm/mach-s3c64xx/mach-mini6410.c
-rw-r--r-- 1 jb user 8264 Oct  7 12:10
arch/arm/mach-s3c64xx/mach-mini6410.c

anton
Thanks so much!
I'll try!

anton
I've tried vanilla kernel 3.1-rc9 as you suggested.
The "linux/arch/arm/mach-s3c64xx/mach-mini6410.c" 
board file is the same as my one in linux-2.6.36.
And there isn't "s3c64xx_fb_gpio_setup_24bpp()"
function in that file.

anton
So, if you have that function in your
"linux/arch/arm/mach-s3c64xx/mach-mini6410.c" board file, could you send me
this file, please?
Thanks!

Juergen Beisert
I just did a "git pull" here, opened the file
"arch/arm/mach-s3c64xx/mach-mini6410.c" and found in line 183 the call to
the "s3c64xx_fb_gpio_setup_24bpp()" function.

anton
Well, when I set CONFIG_S3C64XX_SETUP_FB_24BPP=y
in kernel .config file, /dev/fb0 even doesn't create
after booting.

Juergen Beisert
When I enable board support for the Mini6410, CONFIG_S3C64XX_SETUP_FB_24BPP
is always enabled due to the "select S3C64XX_SETUP_FB_24BPP" in
arch/arm/mach-s3c64xx/Kconfig, line 110. So, I don't know what you are
doing.