display.h 1.9 KB

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