msg.h 1.5 KB

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