summaryrefslogtreecommitdiff
path: root/drivers/video
diff options
context:
space:
mode:
authorTom Wai-Hong Tam <waihong@chromium.org>2011-08-12 18:27:31 +0800
committerSimon Glass <sjg@chromium.org>2011-08-29 10:59:30 -0700
commit2efaa58738ab9c907aeb8ade8b535b9aaa9c4a64 (patch)
tree6b0d6b2bd8cffb65d7f7e33d8d6abf3558d1b19b /drivers/video
parent59838c878aa585589c758d49ae011a3fa50c36ca (diff)
CHROMIUM: Assign the frame buffer address as FDT one instead of u-boot one.
The framebuffer address should be specified in the device tree and not u-boot assigned. This FDT value should be the same as the one defined in Linux kernel; otherwise, it causes screen flicker. The FDT value overrides the framebuffer allocated at the top of memory by board_init_f(). If the framebuffer address is not defined in the FDT, falls back to use the address allocated by board_init_f(). BUG=chrome-os-partner:5338 TEST=build without error and boot Chrome OS on Aebl, see the screen not corrupted and splash screen showed. Change-Id: Ia6a996d127d74d6084900814d2c934fb95518e23 Reviewed-on: http://gerrit.chromium.org/gerrit/5877 Reviewed-by: Tom Wai-Hong Tam <waihong@chromium.org> Tested-by: Tom Wai-Hong Tam <waihong@chromium.org>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/tegra2.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/drivers/video/tegra2.c b/drivers/video/tegra2.c
index 2600d8d91cd..a8d83d3708c 100644
--- a/drivers/video/tegra2.c
+++ b/drivers/video/tegra2.c
@@ -233,12 +233,21 @@ void lcd_ctrl_init(void *lcdbase)
}
/*
- * The device tree allows for the frame buffer to be specified if
- * needed, but for now, U-Boot will set this. This may change if
- * we find that Linux is unable to use the address that U-Boot picks,
- * and this causes screen flicker.
+ * The framebuffer address should be specified in the device tree.
+ * This FDT value should be the same as the one defined in Linux kernel;
+ * otherwise, it causes screen flicker. The FDT value overrides the
+ * framebuffer allocated at the top of memory by board_init_f().
+ *
+ * If the framebuffer address is not defined in the FDT, falls back to
+ * use the address allocated by board_init_f().
*/
- config.frame_buffer = (u32)lcd_base;
+ if (config.frame_buffer != ADDR_T_NONE) {
+ gd->fb_base = config.frame_buffer;
+ lcd_base = (void *)(gd->fb_base);
+ } else {
+ config.frame_buffer = (u32)lcd_base;
+ }
+
update_panel_size(&config);
size = lcd_get_size(&line_length),