Thanks a lot, I will try that out.

Yunfei

On Fri, Apr 17, 2009 at 3:10 PM, Chris Dollar <chris.dollar@gmail.com> wrote:
Assuming that you have a gumstix-oe build environment setup, first
check the file
<gumstix-oe>/com.gumstix.collection/conf/machine/gumstix-custom-verdex.conf
and make sure you have the rgb18 MACHINE_FEATURE enabled and not the
rgb16 option. If you don't have the setting correct you'll want to
change it and then rebuild the kernel, task-base (that might not be
required), and your image (to get the new fb kernel module).

Chris

On Fri, Apr 17, 2009 at 12:39 PM, Yunfei <qiu.yunfei@gmail.com> wrote:
> Hi, Guys:
>          Did anybody run into the same problem I have now ? I have a console
> vx 18bit and sumsung lcd . While the red color seems abnormal, I think it is
> because the problem of bits_per_pixel, we find it under
> "/sys/class/graphics/fb0/bits_per_pixel" = 16,  we have problem in changing
> it into 18 bit.
>   We are using open embedded linux-2.6.21
> the following code is how we tried to change it
>
>     fbfd = open("/dev/fb0", O_RDWR);
>     if (fbfd == -1) {
>         perror("/dev/fb0");
>         exit(1);
>     }
>
>
>     /* Get fixed screen information */
>     if (ioctl(fbfd, FBIOGET_FSCREENINFO, &finfo)) {
>         perror("FBIOGET_FSCREENINFO");
>         exit(2);
>     }
>
>     /*  Get variable screen information */
>     if (ioctl(fbfd, FBIOGET_VSCREENINFO, &vinfo)) {
>         perror("FBIOGET_VSCREENINFO");
>         exit(3);
>     }
> // set bits_per_pixel
>     vinfo.bits_per_pixel = 18;
>     printf("%dx%d, %dbpp\n", vinfo.xres, vinfo.yres, vinfo.bits_per_pixel );
>
>     /*  Set variable screen information */
>     if (ioctl(fbfd, FBIOPUT_VSCREENINFO, &vinfo)) {
>         perror("FBIOPUT_VSCREENINFO");
>         exit(4);
>     }
>
> while we get error message tells us that invalid argument, when we change
> vinfo.bits_per_pixel back to 16, everything works fine again.
> So would anybody please tell me your idea why this happens? I really
> appreciate your help. Thank you very much.
>
>
> Yunfei Qiu
> ------------------------------------------------------------------------------
> Stay on top of everything new and different, both inside and
> around Java (TM) technology - register by April 22, and save
> $200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
> 300 plus technical and hands-on sessions. Register today.
> Use priority code J9JMT32. http://p.sf.net/sfu/p
> _______________________________________________
> gumstix-users mailing list
> gumstix-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/gumstix-users
>
>

------------------------------------------------------------------------------
Stay on top of everything new and different, both inside and
around Java (TM) technology - register by April 22, and save
$200 on the JavaOne (SM) conference, June 2-5, 2009, San Francisco.
300 plus technical and hands-on sessions. Register today.
Use priority code J9JMT32. http://p.sf.net/sfu/p
_______________________________________________
gumstix-users mailing list
gumstix-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gumstix-users