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