aboutsummaryrefslogtreecommitdiff
path: root/src/soc/nvidia/tegra124/display.c
diff options
context:
space:
mode:
authorVince Hsu <vinceh@nvidia.com>2014-05-16 12:46:02 +0800
committerMarc Jones <marc.jones@se-eng.com>2014-12-30 21:31:14 +0100
commitc09642e31560b63c643f4ca5a7710057b23106cd (patch)
tree61795c71bdf32f75af43bae5c6dcb9bef5c8e818 /src/soc/nvidia/tegra124/display.c
parentd72d8aa9523fae880a3be6b64ae8bcddb88fbcd3 (diff)
tegra124: display clock should be initialized before any access
We initialized the dc before the plld's initialization. So some of the dc init settings did not took effect. This patch moves the clock_display() before the dc init call. BRANCH=None BUG=chrome-os-partner:28128 TEST=Display works and system boots up on Nyan and Big Original-Change-Id: If2c40e2526fdf7a6aa33a2684ba324bd0ec40e90 Original-Signed-off-by: Vince Hsu <vinceh@nvidia.com> Original-Reviewed-on: https://chromium-review.googlesource.com/200413 Original-Reviewed-by: Tom Warren <twarren@nvidia.com> Original-Reviewed-by: Jimmy Zhang <jimmzhang@nvidia.com> Original-Reviewed-by: David Hendricks <dhendrix@chromium.org> Original-Reviewed-by: Hung-Te Lin <hungte@chromium.org> Original-Commit-Queue: David Hendricks <dhendrix@chromium.org> Original-Tested-by: David Hendricks <dhendrix@chromium.org> (cherry picked from commit dc3cc253c319c21772c30962d963ec9dfc4944a7) Signed-off-by: Marc Jones <marc.jones@se-eng.com> Change-Id: I021290f4293c740666d460f73fecbe79146896a4 Reviewed-on: http://review.coreboot.org/7950 Tested-by: build bot (Jenkins) Reviewed-by: David Hendricks <dhendrix@chromium.org>
Diffstat (limited to 'src/soc/nvidia/tegra124/display.c')
-rw-r--r--src/soc/nvidia/tegra124/display.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/soc/nvidia/tegra124/display.c b/src/soc/nvidia/tegra124/display.c
index 898e9b375b..9ad76f0ead 100644
--- a/src/soc/nvidia/tegra124/display.c
+++ b/src/soc/nvidia/tegra124/display.c
@@ -135,7 +135,7 @@ static int update_display_mode(struct display_controller *disp_ctrl,
&disp_ctrl->disp.disp_clk_ctrl);
printk(BIOS_DEBUG, "%s: PixelClock=%u, ShiftClockDiv=%u\n",
__func__, config->pixel_clock, shift_clock_div);
- return clock_display(config->pixel_clock * shift_clock_div * 2);
+ return 0;
}
static void update_window(struct display_controller *disp_ctrl,
@@ -278,6 +278,15 @@ void display_startup(device_t dev)
* light things up here once we're sure it's all working.
*/
+ /* The plld is programmed with the assumption of the SHIFT_CLK_DIVIDER
+ * and PIXEL_CLK_DIVIDER are zero (divide by 1). See the
+ * update_display_mode() for detail.
+ */
+ if (clock_display(config->pixel_clock * 2)) {
+ printk(BIOS_ERR, "dc: clock init failed\n");
+ return;
+ };
+
/* Init dc */
if (tegra_dc_init(disp_ctrl)) {
printk(BIOS_ERR, "dc: init failed\n");