From: Wolfgang Denk Date: Fri, 31 May 2013 09:49:29 +0200 Subject: [U-Boot] [PATCH] Add splash screen support via loading from flash In-Reply-To: References: <1369947781-25077-1-git-send-email-robert.winkler@boundarydevices.com> <20130530233256.E2DA73831C2@gemini.denx.de> Message-ID: <20130531074929.5F090383082@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Robert, In message you wrote: > > > > board/boundary/nitrogen6x/nitrogen6x.c | 22 ++++++++++++++++++++++ > > > include/configs/nitrogen6x.h | 11 ++++++++++- > > > 2 files changed, 32 insertions(+), 1 deletion(-) > > > > Could you please explain why you need custom code here? > > I originally tried to use the CONFIG_SPLASH_SCREEN_PREPARE functionality. > After some frustration, I figured out that without CONFIG_LCD, it is never > actually called. > http://git.denx.de/?p=u-boot/u-boot-imx.git;a=blob;f=common/stdio.c;h=5d5117c0ed838195a2caad7c28c128247771cd92;hb=HEAD#l216 > > It does seem odd that there are 2 totally different paths and the other > splash screen related macros are used in both but the prepare function is > only called in the LCD case. OK, so this is a bug that needs to be fixed - but for all boards. > Since we use CONFIG_VIDEO and not CONFIG_LCD, this seemed to be the best, > or at least the least invasive, solution. No, this is definitely not the "best" solution, as it keeps the bug, so the next one who tries to do what you are doing will run into it again. Pleast let's fix the problem at the cause. Please fix the video code to also run splash_screen_prepare() at the appropriate place. While you are at it, please also replace this construct 1071 #ifdef CONFIG_SPLASH_SCREEN_PREPARE 1072 static inline int splash_screen_prepare(void) 1073 { 1074 return board_splash_screen_prepare(); 1075 } 1076 #else 1077 static inline int splash_screen_prepare(void) 1078 { 1079 return 0; 1080 } 1081 #endif (in "common/lcd.c") and use a "weak" function for splash_screen_prepare(). board_splash_screen_prepare() is no longer needed, then (the boards can provide their own implementation of splash_screen_prepare()). Thanks. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de Es ist offensichtlich, dass das menschliche Gehirn wie ein Computer funktioniert. Da es keine dummen Computer gibt, gibt es also auch keine dummen Menschen. Nur ein paar Leute, die unter DOS laufen. --