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