From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mike Frysinger Date: Thu, 19 Jul 2012 12:52:08 -0400 Subject: [U-Boot] [PATCH v3 13/18] lcd: Add support for flushing LCD fb from dcache after update In-Reply-To: <1342106718-3058-14-git-send-email-sjg@chromium.org> References: <1342106718-3058-1-git-send-email-sjg@chromium.org> <1342106718-3058-14-git-send-email-sjg@chromium.org> Message-ID: <201207191252.10058.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Thursday 12 July 2012 11:25:13 Simon Glass wrote: > +void lcd_sync(void) > +{ > + /* > + * flush_dcache_range() is declared in common.h but it seems that some > + * architectures do not actually implement it. Is there a way to find > + * out whether it exists? For now, ARM is safe. > + */ > +#ifdef CONFIG_ARM > + int line_length; > + > + if (lcd_flush_dcache) > + flush_dcache_range((u32)lcd_base, > + (u32)(lcd_base + lcd_get_size(&line_length))); > +#endif > +} hmm, i think this should be more fine grained > /* Clear the last one */ > memset (CONSOLE_ROW_LAST, COLOR_MASK(lcd_color_bg), CONSOLE_ROW_SIZE); > + lcd_sync(); > } this requires only updating one row and not the entire display right ? so we should only flush that one line. seems like other parts suffer similar over- flushing behavior. > +/** > + * Set whether we need to flush the dcache when changing the LCD image. > + * This defaults to off. i wonder if this default is correct. perhaps it should default to 1 since setting up custom memory maps to disable cache is fairly specially. -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: This is a digitally signed message part. URL: