Atmel website | ARM Community | AVR freaks | Technical Support
Banner
 FAQ •  Search •  Register •  Login 

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Openembedded psplash linux4sam patch (Nicolas Ferre??)
PostPosted: Sun Jun 29, 2008 3:00 pm 
Offline

Joined: Sun Sep 02, 2007 1:39 pm
Posts: 77
Perhaps something to be included in the patch set from linux4sam,
I noticed the angstrom image was really ugly, when displayed by psplash.

As the lcd board is connected BGR, the weight and order of the colors in the framebuffer code has to be changed.

I've added a simple define to the code, so everything is converted and displayed properly.

My current bitbake script is:
Code:
DESCRIPTION = "Userspace framebuffer boot logo based on usplash."
SECTION = "base"
LICENSE = "GPL"

PV = "0.0+svn${SRCDATE}"
PR = "r4"

# You can create your own pslash-hand-img.h by doing
# ./make-image-header.sh <file>.png HAND
# and rename the resulting .h to pslash-hand-img.h

SRC_URI = "svn://svn.o-hand.com/repos/misc/trunk;module=psplash;proto=http \
           file://psplash-hand-img.h \
           file://psplash-init"

S = "${WORKDIR}/psplash"

SRC_URI_append_angstrom = " file://psplash-fb-bgr555.patch;patch=1 "
inherit autotools pkgconfig update-rc.d

FILES_${PN} += "/mnt/.psplash"

do_configure_append() {
        cp ${WORKDIR}/psplash-hand-img.h ${S}/
}

do_install_prepend() {
        install -d ${D}/mnt/.psplash/
        install -d ${D}${sysconfdir}/init.d/
        install -m 0755 ${WORKDIR}/psplash-init ${D}${sysconfdir}/init.d/psplash
}

INITSCRIPT_NAME = "psplash"
INITSCRIPT_PARAMS = "start 0 S . stop 20 0 1 6 ."


and the patch:

Code:
--- psplash-org/psplash-fb.c    2007-03-30 13:25:43.000000000 +0200
+++ psplash/psplash-fb.c        2008-06-29 14:59:17.000000000 +0200
@@ -17,4 +17,7 @@
#include "psplash.h"

+#define PIXEL_BGR555(r,g,b)  ( (((b)&0xF8) << 7) | \
+                                 (((g)&0xF8) << 2) | \
+                                 (((r)&0xF8) >> 3) )
void
psplash_fb_destroy (PSplashFB *fb)
@@ -186,6 +189,8 @@
       break;
     case 16:
-      *(volatile uint16 *) (fb->data + off)
-       = ((red >> 3) << 11) | ((green >> 2) << 5) | (blue >> 3);
+//      *(volatile uint16 *) (fb->data + off)
+//     = ((red >> 3) << 11) | ((green >> 2) << 5) | (blue >> 3);
+      *(volatile uint16 *) (fb->data + off)
+       = PIXEL_BGR555(red, green, blue);
       break;
     default:


edit: fixed rgb order in macro call.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: