From 3a6ea3642fcfc56ffb1a168fbf49d8136ef8583d Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 12 Jul 2014 11:24:14 -0600 Subject: [PATCH] SAMA5 LCDC: Back out the delay kludge. Increase the LCDC input clock from MCK to 2*MCK was sufficient for all timing instbility problems --- arch/arm/src/sama5/sam_lcd.c | 12 ------------ configs/sama5d4-ek/include/board.h | 13 ------------- 2 files changed, 25 deletions(-) diff --git a/arch/arm/src/sama5/sam_lcd.c b/arch/arm/src/sama5/sam_lcd.c index 1aa9e372b0..537132ead5 100644 --- a/arch/arm/src/sama5/sam_lcd.c +++ b/arch/arm/src/sama5/sam_lcd.c @@ -2973,18 +2973,6 @@ int up_fbinitialize(void) sam_show_hcr(); #endif -#if defined(BOARD_LCDC_ENABLE_DELAY) && BOARD_LCDC_ENABLE_DELAY > 0 - /* Delay a bit after enabling the LDC. I presume that a delay of a few - * frame times allows some unstable clocking to synchronize before we - * start thrashing the framebuffer? But I am not sure why this is - * necessary and, in fact, is certainly not necessary in most LCDC - * configurations. Perhaps this delay would not be necessary if timings - * were more precise? - */ - - usleep(BOARD_LCDC_ENABLE_DELAY); -#endif - /* Enable the backlight. * * REVISIT: Backlight level could be dynamically adjustable diff --git a/configs/sama5d4-ek/include/board.h b/configs/sama5d4-ek/include/board.h index 2afad607e3..ad8a33f930 100644 --- a/configs/sama5d4-ek/include/board.h +++ b/configs/sama5d4-ek/include/board.h @@ -203,19 +203,6 @@ #define BOARD_LCDC_PIXELCLOCK \ (BOARD_LCDC_HSPERIOD * BOARD_LCDC_VSPERIOD * BOARD_LCDC_FRAMERATE) -/* This specifies a delay after enabling the LCDC. This was found - * experimentally and is very much a kludge. I presume that a delay of a - * couple of frame times allows some unstable clocking to synchronize before - * we start thrashing the framebuffer? But I am not sure why this is - * necessary and, in fact, is certainly not necessary in other LCDC - * configurations. Perhaps the delay would not be necessary if timings were - * more precise? - * - * Delays are in units of microseconds. - */ - -#define BOARD_LCDC_ENABLE_DELAY (50*1000) - /* Backlight prescaler value and PWM output polarity */ #define BOARD_LCDC_PWMPS LCDC_LCDCFG6_PWMPS_DIV1