1 #ifndef __UAPI_MSM_SDE_ROTATOR_H__ 2 #define __UAPI_MSM_SDE_ROTATOR_H__ 3 4 #include <linux/videodev2.h> 5 #include <linux/types.h> 6 #include <linux/ioctl.h> 7 8 /* SDE Rotator pixel format definitions */ 9 #define SDE_PIX_FMT_XRGB_8888 V4L2_PIX_FMT_XBGR32 10 #define SDE_PIX_FMT_ARGB_8888 V4L2_PIX_FMT_ABGR32 11 #define SDE_PIX_FMT_ABGR_8888 V4L2_PIX_FMT_SDE_ABGR_8888 12 #define SDE_PIX_FMT_RGBA_8888 V4L2_PIX_FMT_SDE_RGBA_8888 13 #define SDE_PIX_FMT_BGRA_8888 V4L2_PIX_FMT_ARGB32 14 #define SDE_PIX_FMT_RGBX_8888 V4L2_PIX_FMT_SDE_RGBX_8888 15 #define SDE_PIX_FMT_BGRX_8888 V4L2_PIX_FMT_XRGB32 16 #define SDE_PIX_FMT_XBGR_8888 V4L2_PIX_FMT_SDE_XBGR_8888 17 #define SDE_PIX_FMT_RGBA_5551 V4L2_PIX_FMT_SDE_RGBA_5551 18 #define SDE_PIX_FMT_ARGB_1555 V4L2_PIX_FMT_ARGB555 19 #define SDE_PIX_FMT_ABGR_1555 V4L2_PIX_FMT_SDE_ABGR_1555 20 #define SDE_PIX_FMT_BGRA_5551 V4L2_PIX_FMT_SDE_BGRA_5551 21 #define SDE_PIX_FMT_BGRX_5551 V4L2_PIX_FMT_SDE_BGRX_5551 22 #define SDE_PIX_FMT_RGBX_5551 V4L2_PIX_FMT_SDE_RGBX_5551 23 #define SDE_PIX_FMT_XBGR_1555 V4L2_PIX_FMT_SDE_XBGR_1555 24 #define SDE_PIX_FMT_XRGB_1555 V4L2_PIX_FMT_XRGB555 25 #define SDE_PIX_FMT_ARGB_4444 V4L2_PIX_FMT_ARGB444 26 #define SDE_PIX_FMT_RGBA_4444 V4L2_PIX_FMT_SDE_RGBA_4444 27 #define SDE_PIX_FMT_BGRA_4444 V4L2_PIX_FMT_SDE_BGRA_4444 28 #define SDE_PIX_FMT_ABGR_4444 V4L2_PIX_FMT_SDE_ABGR_4444 29 #define SDE_PIX_FMT_RGBX_4444 V4L2_PIX_FMT_SDE_RGBX_4444 30 #define SDE_PIX_FMT_XRGB_4444 V4L2_PIX_FMT_XRGB444 31 #define SDE_PIX_FMT_BGRX_4444 V4L2_PIX_FMT_SDE_BGRX_4444 32 #define SDE_PIX_FMT_XBGR_4444 V4L2_PIX_FMT_SDE_XBGR_4444 33 #define SDE_PIX_FMT_RGB_888 V4L2_PIX_FMT_RGB24 34 #define SDE_PIX_FMT_BGR_888 V4L2_PIX_FMT_BGR24 35 #define SDE_PIX_FMT_RGB_565 V4L2_PIX_FMT_RGB565 36 #define SDE_PIX_FMT_BGR_565 V4L2_PIX_FMT_SDE_BGR_565 37 #define SDE_PIX_FMT_Y_CB_CR_H2V2 V4L2_PIX_FMT_YUV420 38 #define SDE_PIX_FMT_Y_CR_CB_H2V2 V4L2_PIX_FMT_YVU420 39 #define SDE_PIX_FMT_Y_CR_CB_GH2V2 V4L2_PIX_FMT_SDE_Y_CR_CB_GH2V2 40 #define SDE_PIX_FMT_Y_CBCR_H2V2 V4L2_PIX_FMT_NV12 41 #define SDE_PIX_FMT_Y_CRCB_H2V2 V4L2_PIX_FMT_NV21 42 #define SDE_PIX_FMT_Y_CBCR_H1V2 V4L2_PIX_FMT_SDE_Y_CBCR_H1V2 43 #define SDE_PIX_FMT_Y_CRCB_H1V2 V4L2_PIX_FMT_SDE_Y_CRCB_H1V2 44 #define SDE_PIX_FMT_Y_CBCR_H2V1 V4L2_PIX_FMT_NV16 45 #define SDE_PIX_FMT_Y_CRCB_H2V1 V4L2_PIX_FMT_NV61 46 #define SDE_PIX_FMT_YCBYCR_H2V1 V4L2_PIX_FMT_YUYV 47 #define SDE_PIX_FMT_Y_CBCR_H2V2_VENUS V4L2_PIX_FMT_SDE_Y_CBCR_H2V2_VENUS 48 #define SDE_PIX_FMT_Y_CRCB_H2V2_VENUS V4L2_PIX_FMT_SDE_Y_CRCB_H2V2_VENUS 49 #define SDE_PIX_FMT_RGBA_8888_UBWC V4L2_PIX_FMT_RGBA8888_UBWC 50 #define SDE_PIX_FMT_RGBX_8888_UBWC V4L2_PIX_FMT_SDE_RGBX_8888_UBWC 51 #define SDE_PIX_FMT_RGB_565_UBWC V4L2_PIX_FMT_SDE_RGB_565_UBWC 52 #define SDE_PIX_FMT_Y_CBCR_H2V2_UBWC V4L2_PIX_FMT_NV12_UBWC 53 #define SDE_PIX_FMT_RGBA_1010102 V4L2_PIX_FMT_SDE_RGBA_1010102 54 #define SDE_PIX_FMT_RGBX_1010102 V4L2_PIX_FMT_SDE_RGBX_1010102 55 #define SDE_PIX_FMT_ARGB_2101010 V4L2_PIX_FMT_SDE_ARGB_2101010 56 #define SDE_PIX_FMT_XRGB_2101010 V4L2_PIX_FMT_SDE_XRGB_2101010 57 #define SDE_PIX_FMT_BGRA_1010102 V4L2_PIX_FMT_SDE_BGRA_1010102 58 #define SDE_PIX_FMT_BGRX_1010102 V4L2_PIX_FMT_SDE_BGRX_1010102 59 #define SDE_PIX_FMT_ABGR_2101010 V4L2_PIX_FMT_SDE_ABGR_2101010 60 #define SDE_PIX_FMT_XBGR_2101010 V4L2_PIX_FMT_SDE_XBGR_2101010 61 #define SDE_PIX_FMT_RGBA_1010102_UBWC V4L2_PIX_FMT_SDE_RGBA_1010102_UBWC 62 #define SDE_PIX_FMT_RGBX_1010102_UBWC V4L2_PIX_FMT_SDE_RGBX_1010102_UBWC 63 #define SDE_PIX_FMT_Y_CBCR_H2V2_P010 V4L2_PIX_FMT_SDE_Y_CBCR_H2V2_P010 64 #define SDE_PIX_FMT_Y_CBCR_H2V2_P010_VENUS \ 65 V4L2_PIX_FMT_SDE_Y_CBCR_H2V2_P010_VENUS 66 #define SDE_PIX_FMT_Y_CBCR_H2V2_TP10 V4L2_PIX_FMT_SDE_Y_CBCR_H2V2_TP10 67 #define SDE_PIX_FMT_Y_CBCR_H2V2_TP10_UBWC V4L2_PIX_FMT_NV12_TP10_UBWC 68 #define SDE_PIX_FMT_Y_CBCR_H2V2_P010_UBWC V4L2_PIX_FMT_NV12_P010_UBWC 69 70 /* 71 * struct msm_sde_rotator_fence - v4l2 buffer fence info 72 * @index: id number of the buffer 73 * @type: enum v4l2_buf_type; buffer type 74 * @fd: file descriptor of the fence associated with this buffer 75 */ 76 struct msm_sde_rotator_fence { 77 __u32 index; 78 __u32 type; 79 __s32 fd; 80 __u32 reserved[5]; 81 }; 82 83 /* 84 * struct msm_sde_rotator_comp_ratio - v4l2 buffer compression ratio 85 * @index: id number of the buffer 86 * @type: enum v4l2_buf_type; buffer type 87 * @numer: numerator of the ratio 88 * @denom: denominator of the ratio 89 */ 90 struct msm_sde_rotator_comp_ratio { 91 __u32 index; 92 __u32 type; 93 __u32 numer; 94 __u32 denom; 95 __u32 reserved[4]; 96 }; 97 98 /* SDE Rotator private ioctl ID */ 99 #define VIDIOC_G_SDE_ROTATOR_FENCE \ 100 _IOWR('V', BASE_VIDIOC_PRIVATE + 10, struct msm_sde_rotator_fence) 101 #define VIDIOC_S_SDE_ROTATOR_FENCE \ 102 _IOWR('V', BASE_VIDIOC_PRIVATE + 11, struct msm_sde_rotator_fence) 103 #define VIDIOC_G_SDE_ROTATOR_COMP_RATIO \ 104 _IOWR('V', BASE_VIDIOC_PRIVATE + 12, struct msm_sde_rotator_comp_ratio) 105 #define VIDIOC_S_SDE_ROTATOR_COMP_RATIO \ 106 _IOWR('V', BASE_VIDIOC_PRIVATE + 13, struct msm_sde_rotator_comp_ratio) 107 108 /* SDE Rotator private control ID's */ 109 #define V4L2_CID_SDE_ROTATOR_SECURE (V4L2_CID_USER_BASE + 0x1000) 110 111 /* 112 * This control Id indicates this context is associated with the 113 * secure camera. 114 */ 115 #define V4L2_CID_SDE_ROTATOR_SECURE_CAMERA (V4L2_CID_USER_BASE + 0x2000) 116 117 #endif /* __UAPI_MSM_SDE_ROTATOR_H__ */ 118