display.h 1.9 KB

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