1 /*
2  *  (C) Copyright 2010
3  *  NVIDIA Corporation <www.nvidia.com>
4  *
5  * SPDX-License-Identifier:	GPL-2.0+
6  */
7 
8 #ifndef __ASM_ARCH_TEGRA_DISPLAY_H
9 #define __ASM_ARCH_TEGRA_DISPLAY_H
10 
11 /**
12  * Register a new display based on device tree configuration.
13  *
14  * The frame buffer can be positioned by U-Boot or overriden by the fdt.
15  * You should pass in the U-Boot address here, and check the contents of
16  * struct fdt_disp_config to see what was actually chosen.
17  *
18  * @param blob			Device tree blob
19  * @param default_lcd_base	Default address of LCD frame buffer
20  * @return 0 if ok, -1 on error (unsupported bits per pixel)
21  */
22 int tegra_display_probe(const void *blob, void *default_lcd_base);
23 
24 /**
25  * Return the current display configuration
26  *
27  * @return pointer to display configuration, or NULL if there is no valid
28  * config
29  */
30 struct fdt_disp_config *tegra_display_get_config(void);
31 
32 /**
33  * Perform the next stage of the LCD init if it is time to do so.
34  *
35  * LCD init can be time-consuming because of the number of delays we need
36  * while waiting for the backlight power supply, etc. This function can
37  * be called at various times during U-Boot operation to advance the
38  * initialization of the LCD to the next stage if sufficient time has
39  * passed since the last stage. It keeps track of what stage it is up to
40  * and the time that it is permitted to move to the next stage.
41  *
42  * The final call should have wait=1 to complete the init.
43  *
44  * @param blob	fdt blob containing LCD information
45  * @param wait	1 to wait until all init is complete, and then return
46  *		0 to return immediately, potentially doing nothing if it is
47  *		not yet time for the next init.
48  */
49 int tegra_lcd_check_next_stage(const void *blob, int wait);
50 
51 /**
52  * Set up the maximum LCD size so we can size the frame buffer.
53  *
54  * @param blob	fdt blob containing LCD information
55  */
56 void tegra_lcd_early_init(const void *blob);
57 
58 #endif /*__ASM_ARCH_TEGRA_DISPLAY_H*/
59