mdp_ppp.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. /* drivers/video/msm/mdp_ppp.h
  2. *
  3. * Copyright (C) 2009 Google Incorporated
  4. *
  5. * This software is licensed under the terms of the GNU General Public
  6. * License version 2, as published by the Free Software Foundation, and
  7. * may be copied, distributed, and modified under those terms.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. * GNU General Public License for more details.
  13. */
  14. #ifndef _VIDEO_MSM_MDP_PPP_H_
  15. #define _VIDEO_MSM_MDP_PPP_H_
  16. #include <linux/types.h>
  17. struct ppp_regs {
  18. uint32_t src0;
  19. uint32_t src1;
  20. uint32_t dst0;
  21. uint32_t dst1;
  22. uint32_t src_cfg;
  23. uint32_t dst_cfg;
  24. uint32_t src_pack;
  25. uint32_t dst_pack;
  26. uint32_t src_rect;
  27. uint32_t dst_rect;
  28. uint32_t src_ystride;
  29. uint32_t dst_ystride;
  30. uint32_t op;
  31. uint32_t src_bpp;
  32. uint32_t dst_bpp;
  33. uint32_t edge;
  34. uint32_t phasex_init;
  35. uint32_t phasey_init;
  36. uint32_t phasex_step;
  37. uint32_t phasey_step;
  38. uint32_t bg0;
  39. uint32_t bg1;
  40. uint32_t bg_cfg;
  41. uint32_t bg_bpp;
  42. uint32_t bg_pack;
  43. uint32_t bg_ystride;
  44. #ifdef CONFIG_MSM_MDP31
  45. uint32_t src_xy;
  46. uint32_t src_img_sz;
  47. uint32_t dst_xy;
  48. uint32_t bg_xy;
  49. uint32_t bg_img_sz;
  50. uint32_t bg_alpha_sel;
  51. uint32_t scale_cfg;
  52. uint32_t csc_cfg;
  53. #endif
  54. };
  55. struct mdp_info;
  56. struct mdp_rect;
  57. struct mdp_blit_req;
  58. void mdp_ppp_init_scale(const struct mdp_info *mdp);
  59. int mdp_ppp_cfg_scale(const struct mdp_info *mdp, struct ppp_regs *regs,
  60. struct mdp_rect *src_rect, struct mdp_rect *dst_rect,
  61. uint32_t src_format, uint32_t dst_format);
  62. int mdp_ppp_load_blur(const struct mdp_info *mdp);
  63. #ifndef CONFIG_MSM_MDP31
  64. int mdp_ppp_cfg_edge_cond(struct mdp_blit_req *req, struct ppp_regs *regs);
  65. #else
  66. static inline int mdp_ppp_cfg_edge_cond(struct mdp_blit_req *req,
  67. struct ppp_regs *regs)
  68. {
  69. return 0;
  70. }
  71. #endif
  72. #endif /* _VIDEO_MSM_MDP_PPP_H_ */