msm_mdp.h 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. /* include/linux/msm_mdp.h
  2. *
  3. * Copyright (C) 2007 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 _MSM_MDP_H_
  15. #define _MSM_MDP_H_
  16. #include <linux/types.h>
  17. #define MSMFB_IOCTL_MAGIC 'm'
  18. #define MSMFB_GRP_DISP _IOW(MSMFB_IOCTL_MAGIC, 1, unsigned int)
  19. #define MSMFB_BLIT _IOW(MSMFB_IOCTL_MAGIC, 2, unsigned int)
  20. enum {
  21. MDP_RGB_565, /* RGB 565 planar */
  22. MDP_XRGB_8888, /* RGB 888 padded */
  23. MDP_Y_CBCR_H2V2, /* Y and CbCr, pseudo planar w/ Cb is in MSB */
  24. MDP_ARGB_8888, /* ARGB 888 */
  25. MDP_RGB_888, /* RGB 888 planar */
  26. MDP_Y_CRCB_H2V2, /* Y and CrCb, pseudo planar w/ Cr is in MSB */
  27. MDP_YCRYCB_H2V1, /* YCrYCb interleave */
  28. MDP_Y_CRCB_H2V1, /* Y and CrCb, pseduo planar w/ Cr is in MSB */
  29. MDP_Y_CBCR_H2V1, /* Y and CrCb, pseduo planar w/ Cr is in MSB */
  30. MDP_RGBA_8888, /* ARGB 888 */
  31. MDP_BGRA_8888, /* ABGR 888 */
  32. MDP_RGBX_8888, /* RGBX 888 */
  33. MDP_IMGTYPE_LIMIT /* Non valid image type after this enum */
  34. };
  35. enum {
  36. PMEM_IMG,
  37. FB_IMG,
  38. };
  39. /* flag values */
  40. #define MDP_ROT_NOP 0
  41. #define MDP_FLIP_LR 0x1
  42. #define MDP_FLIP_UD 0x2
  43. #define MDP_ROT_90 0x4
  44. #define MDP_ROT_180 (MDP_FLIP_UD|MDP_FLIP_LR)
  45. #define MDP_ROT_270 (MDP_ROT_90|MDP_FLIP_UD|MDP_FLIP_LR)
  46. #define MDP_DITHER 0x8
  47. #define MDP_BLUR 0x10
  48. #define MDP_TRANSP_NOP 0xffffffff
  49. #define MDP_ALPHA_NOP 0xff
  50. struct mdp_rect {
  51. u32 x, y, w, h;
  52. };
  53. struct mdp_img {
  54. u32 width, height, format, offset;
  55. int memory_id; /* the file descriptor */
  56. };
  57. struct mdp_blit_req {
  58. struct mdp_img src;
  59. struct mdp_img dst;
  60. struct mdp_rect src_rect;
  61. struct mdp_rect dst_rect;
  62. u32 alpha, transp_mask, flags;
  63. };
  64. struct mdp_blit_req_list {
  65. u32 count;
  66. struct mdp_blit_req req[];
  67. };
  68. #endif /* _MSM_MDP_H_ */