msg.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. /*
  2. * (C) Copyright 2012,2015 Stephen Warren
  3. *
  4. * SPDX-License-Identifier: GPL-2.0+
  5. */
  6. #ifndef _BCM2835_MSG_H
  7. #define _BCM2835_MSG_H
  8. /**
  9. * bcm2835_power_on_module() - power on an SoC module
  10. *
  11. * @module: ID of module to power on (BCM2835_MBOX_POWER_DEVID_...)
  12. * @return 0 if OK, -EIO on error
  13. */
  14. int bcm2835_power_on_module(u32 module);
  15. /**
  16. * bcm2835_get_mmc_clock() - get the frequency of the MMC clock
  17. *
  18. * @clock_id: ID of clock to get frequency for
  19. * @return clock frequency, or -ve on error
  20. */
  21. int bcm2835_get_mmc_clock(u32 clock_id);
  22. /**
  23. * bcm2835_get_video_size() - get the current display size
  24. *
  25. * @widthp: Returns the width in pixels
  26. * @heightp: Returns the height in pixels
  27. * @return 0 if OK, -ve on error
  28. */
  29. int bcm2835_get_video_size(int *widthp, int *heightp);
  30. /**
  31. * bcm2835_set_video_params() - set the video parameters
  32. *
  33. * @widthp: Video width to request (returns the actual width selected)
  34. * @heightp: Video height to request (returns the actual height selected)
  35. * @depth_bpp: Requested bit depth
  36. * @pixel_order: Pixel order to use (BCM2835_MBOX_PIXEL_ORDER_...)
  37. * @alpha_mode: Alpha transparency mode to use (BCM2835_MBOX_ALPHA_MODE_...)
  38. * @fb_basep: Returns base address of frame buffer
  39. * @fb_sizep: Returns size of frame buffer
  40. * @pitchp: Returns number of bytes in each frame buffer line
  41. * @return 0 if OK, -ve on error
  42. */
  43. int bcm2835_set_video_params(int *widthp, int *heightp, int depth_bpp,
  44. int pixel_order, int alpha_mode, ulong *fb_basep,
  45. ulong *fb_sizep, int *pitchp);
  46. #endif