Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
Simon Glass | 3ef2a72 | 2015-04-14 21:03:42 -0600 | [diff] [blame] | 2 | /* |
| 3 | * (C) Copyright 2010 |
| 4 | * NVIDIA Corporation <www.nvidia.com> |
Simon Glass | 3ef2a72 | 2015-04-14 21:03:42 -0600 | [diff] [blame] | 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 | * |
Robert P. J. Day | 8d56db9 | 2016-07-15 13:44:45 -0400 | [diff] [blame] | 13 | * The frame buffer can be positioned by U-Boot or overridden by the fdt. |
Simon Glass | 3ef2a72 | 2015-04-14 21:03:42 -0600 | [diff] [blame] | 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 |
Heinrich Schuchardt | 47b4c02 | 2022-01-19 18:05:50 +0100 | [diff] [blame] | 19 | * Return: 0 if ok, -1 on error (unsupported bits per pixel) |
Simon Glass | 3ef2a72 | 2015-04-14 21:03:42 -0600 | [diff] [blame] | 20 | */ |
| 21 | int tegra_display_probe(const void *blob, void *default_lcd_base); |
| 22 | |
| 23 | /** |
| 24 | * Return the current display configuration |
| 25 | * |
Heinrich Schuchardt | 47b4c02 | 2022-01-19 18:05:50 +0100 | [diff] [blame] | 26 | * Return: pointer to display configuration, or NULL if there is no valid |
Simon Glass | 3ef2a72 | 2015-04-14 21:03:42 -0600 | [diff] [blame] | 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*/ |