3 * NVIDIA Corporation <www.nvidia.com>
5 * SPDX-License-Identifier: GPL-2.0+
8 #ifndef __ASM_ARCH_TEGRA_DISPLAY_H
9 #define __ASM_ARCH_TEGRA_DISPLAY_H
11 #include <asm/arch-tegra/dc.h>
15 /* This holds information about a window which can be displayed */
17 enum win_color_depth_id fmt
; /* Color depth/format */
18 unsigned bpp
; /* Bits per pixel */
19 phys_addr_t phys_addr
; /* Physical address in memory */
20 unsigned x
; /* Horizontal address offset (bytes) */
21 unsigned y
; /* Veritical address offset (bytes) */
22 unsigned w
; /* Width of source window */
23 unsigned h
; /* Height of source window */
24 unsigned stride
; /* Number of bytes per line */
25 unsigned out_x
; /* Left edge of output window (col) */
26 unsigned out_y
; /* Top edge of output window (row) */
27 unsigned out_w
; /* Width of output window in pixels */
28 unsigned out_h
; /* Height of output window in pixels */
31 #define FDT_LCD_TIMINGS 4
34 FDT_LCD_TIMING_REF_TO_SYNC
,
35 FDT_LCD_TIMING_SYNC_WIDTH
,
36 FDT_LCD_TIMING_BACK_PORCH
,
37 FDT_LCD_TIMING_FRONT_PORCH
,
43 FDT_LCD_CACHE_OFF
= 0,
44 FDT_LCD_CACHE_WRITE_THROUGH
= 1 << 0,
45 FDT_LCD_CACHE_WRITE_BACK
= 1 << 1,
46 FDT_LCD_CACHE_FLUSH
= 1 << 2,
47 FDT_LCD_CACHE_WRITE_BACK_FLUSH
= FDT_LCD_CACHE_WRITE_BACK
|
52 * Perform the next stage of the LCD init if it is time to do so.
54 * LCD init can be time-consuming because of the number of delays we need
55 * while waiting for the backlight power supply, etc. This function can
56 * be called at various times during U-Boot operation to advance the
57 * initialization of the LCD to the next stage if sufficient time has
58 * passed since the last stage. It keeps track of what stage it is up to
59 * and the time that it is permitted to move to the next stage.
61 * The final call should have wait=1 to complete the init.
63 * @param blob fdt blob containing LCD information
64 * @param wait 1 to wait until all init is complete, and then return
65 * 0 to return immediately, potentially doing nothing if it is
66 * not yet time for the next init.
68 int tegra_lcd_check_next_stage(const void *blob
, int wait
);
71 * Set up the maximum LCD size so we can size the frame buffer.
73 * @param blob fdt blob containing LCD information
75 void tegra_lcd_early_init(const void *blob
);
77 #endif /*__ASM_ARCH_TEGRA_DISPLAY_H*/