msm_rotator.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  1. #ifndef __MSM_ROTATOR_H__
  2. #define __MSM_ROTATOR_H__
  3. #include <linux/types.h>
  4. #include <linux/msm_mdp.h>
  5. #define MSM_ROTATOR_IOCTL_MAGIC 'R'
  6. #define MSM_ROTATOR_IOCTL_START \
  7. _IOWR(MSM_ROTATOR_IOCTL_MAGIC, 1, struct msm_rotator_img_info)
  8. #define MSM_ROTATOR_IOCTL_ROTATE \
  9. _IOW(MSM_ROTATOR_IOCTL_MAGIC, 2, struct msm_rotator_data_info)
  10. #define MSM_ROTATOR_IOCTL_FINISH \
  11. _IOW(MSM_ROTATOR_IOCTL_MAGIC, 3, int)
  12. #define ROTATOR_VERSION_01 0xA5B4C301
  13. enum rotator_clk_type {
  14. ROTATOR_CORE_CLK,
  15. ROTATOR_PCLK,
  16. ROTATOR_IMEM_CLK
  17. };
  18. struct msm_rotator_img_info {
  19. unsigned int session_id;
  20. struct msmfb_img src;
  21. struct msmfb_img dst;
  22. struct mdp_rect src_rect;
  23. unsigned int dst_x;
  24. unsigned int dst_y;
  25. unsigned char rotations;
  26. int enable;
  27. unsigned int downscale_ratio;
  28. unsigned int secure;
  29. };
  30. struct msm_rotator_data_info {
  31. int session_id;
  32. struct msmfb_data src;
  33. struct msmfb_data dst;
  34. unsigned int version_key;
  35. struct msmfb_data src_chroma;
  36. struct msmfb_data dst_chroma;
  37. };
  38. struct msm_rot_clocks {
  39. const char *clk_name;
  40. enum rotator_clk_type clk_type;
  41. unsigned int clk_rate;
  42. };
  43. struct msm_rotator_platform_data {
  44. unsigned int number_of_clocks;
  45. unsigned int hardware_version_number;
  46. struct msm_rot_clocks *rotator_clks;
  47. #ifdef CONFIG_MSM_BUS_SCALING
  48. struct msm_bus_scale_pdata *bus_scale_table;
  49. #endif
  50. char rot_iommu_split_domain;
  51. };
  52. #endif