videomode.h 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * Copyright 2012 Steffen Trumtrar <s.trumtrar@pengutronix.de>
  3. *
  4. * generic videomode description
  5. *
  6. * This file is released under the GPLv2
  7. */
  8. #ifndef __LINUX_VIDEOMODE_H
  9. #define __LINUX_VIDEOMODE_H
  10. #include <linux/types.h>
  11. #include <video/display_timing.h>
  12. /*
  13. * Subsystem independent description of a videomode.
  14. * Can be generated from struct display_timing.
  15. */
  16. struct videomode {
  17. unsigned long pixelclock; /* pixelclock in Hz */
  18. u32 hactive;
  19. u32 hfront_porch;
  20. u32 hback_porch;
  21. u32 hsync_len;
  22. u32 vactive;
  23. u32 vfront_porch;
  24. u32 vback_porch;
  25. u32 vsync_len;
  26. enum display_flags flags; /* display flags */
  27. };
  28. /**
  29. * videomode_from_timing - convert display timing to videomode
  30. * @disp: structure with all possible timing entries
  31. * @vm: return value
  32. * @index: index into the list of display timings in devicetree
  33. *
  34. * DESCRIPTION:
  35. * This function converts a struct display_timing to a struct videomode.
  36. */
  37. int videomode_from_timing(const struct display_timings *disp,
  38. struct videomode *vm, unsigned int index);
  39. #endif