Stefano Babic | 92a98a4 | 2011-09-28 11:21:16 +0200 | [diff] [blame] | 1 | /* |
| 2 | * (C) Copyright 2011 |
| 3 | * Stefano Babic, DENX Software Engineering, sbabic@denx.de |
| 4 | * |
| 5 | * Based on Linux IPU driver for MX51 (ipu.h): |
| 6 | * |
| 7 | * (C) Copyright 2005-2010 Freescale Semiconductor, Inc. |
| 8 | * |
| 9 | * See file CREDITS for list of people who contributed to this |
| 10 | * project. |
| 11 | * |
| 12 | * This program is free software; you can redistribute it and/or |
| 13 | * modify it under the terms of the GNU General Public License as |
| 14 | * published by the Free Software Foundation; either version 2 of |
| 15 | * the License, or (at your option) any later version. |
| 16 | * |
| 17 | * This program is distributed in the hope that it will be useful, |
| 18 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 19 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 20 | * GNU General Public License for more details. |
| 21 | * |
| 22 | * You should have received a copy of the GNU General Public License |
| 23 | * along with this program; if not, write to the Free Software |
| 24 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
| 25 | * MA 02111-1307 USA |
| 26 | */ |
| 27 | |
| 28 | #ifndef __IPU_PIXFMT_H__ |
| 29 | #define __IPU_PIXFMT_H__ |
| 30 | |
Marek Vasut | 02ae1a1 | 2011-10-06 00:25:03 +0200 | [diff] [blame] | 31 | #include <linux/list.h> |
| 32 | #include <linux/fb.h> |
| 33 | |
Stefano Babic | 92a98a4 | 2011-09-28 11:21:16 +0200 | [diff] [blame] | 34 | /* IPU Pixel format definitions */ |
| 35 | #define fourcc(a, b, c, d)\ |
| 36 | (((__u32)(a)<<0)|((__u32)(b)<<8)|((__u32)(c)<<16)|((__u32)(d)<<24)) |
| 37 | |
| 38 | /* |
| 39 | * Pixel formats are defined with ASCII FOURCC code. The pixel format codes are |
| 40 | * the same used by V4L2 API. |
| 41 | */ |
| 42 | |
| 43 | #define IPU_PIX_FMT_GENERIC fourcc('I', 'P', 'U', '0') |
| 44 | #define IPU_PIX_FMT_GENERIC_32 fourcc('I', 'P', 'U', '1') |
| 45 | #define IPU_PIX_FMT_LVDS666 fourcc('L', 'V', 'D', '6') |
| 46 | #define IPU_PIX_FMT_LVDS888 fourcc('L', 'V', 'D', '8') |
| 47 | |
| 48 | #define IPU_PIX_FMT_RGB332 fourcc('R', 'G', 'B', '1') /*< 8 RGB-3-3-2 */ |
| 49 | #define IPU_PIX_FMT_RGB555 fourcc('R', 'G', 'B', 'O') /*< 16 RGB-5-5-5 */ |
| 50 | #define IPU_PIX_FMT_RGB565 fourcc('R', 'G', 'B', 'P') /*< 1 6 RGB-5-6-5 */ |
| 51 | #define IPU_PIX_FMT_RGB666 fourcc('R', 'G', 'B', '6') /*< 18 RGB-6-6-6 */ |
| 52 | #define IPU_PIX_FMT_BGR666 fourcc('B', 'G', 'R', '6') /*< 18 BGR-6-6-6 */ |
| 53 | #define IPU_PIX_FMT_BGR24 fourcc('B', 'G', 'R', '3') /*< 24 BGR-8-8-8 */ |
| 54 | #define IPU_PIX_FMT_RGB24 fourcc('R', 'G', 'B', '3') /*< 24 RGB-8-8-8 */ |
| 55 | #define IPU_PIX_FMT_BGR32 fourcc('B', 'G', 'R', '4') /*< 32 BGR-8-8-8-8 */ |
| 56 | #define IPU_PIX_FMT_BGRA32 fourcc('B', 'G', 'R', 'A') /*< 32 BGR-8-8-8-8 */ |
| 57 | #define IPU_PIX_FMT_RGB32 fourcc('R', 'G', 'B', '4') /*< 32 RGB-8-8-8-8 */ |
| 58 | #define IPU_PIX_FMT_RGBA32 fourcc('R', 'G', 'B', 'A') /*< 32 RGB-8-8-8-8 */ |
| 59 | #define IPU_PIX_FMT_ABGR32 fourcc('A', 'B', 'G', 'R') /*< 32 ABGR-8-8-8-8 */ |
| 60 | |
| 61 | /* YUV Interleaved Formats */ |
| 62 | #define IPU_PIX_FMT_YUYV fourcc('Y', 'U', 'Y', 'V') /*< 16 YUV 4:2:2 */ |
| 63 | #define IPU_PIX_FMT_UYVY fourcc('U', 'Y', 'V', 'Y') /*< 16 YUV 4:2:2 */ |
| 64 | #define IPU_PIX_FMT_Y41P fourcc('Y', '4', '1', 'P') /*< 12 YUV 4:1:1 */ |
| 65 | #define IPU_PIX_FMT_YUV444 fourcc('Y', '4', '4', '4') /*< 24 YUV 4:4:4 */ |
| 66 | |
| 67 | /* two planes -- one Y, one Cb + Cr interleaved */ |
| 68 | #define IPU_PIX_FMT_NV12 fourcc('N', 'V', '1', '2') /* 12 Y/CbCr 4:2:0 */ |
| 69 | |
| 70 | #define IPU_PIX_FMT_GREY fourcc('G', 'R', 'E', 'Y') /*< 8 Greyscale */ |
| 71 | #define IPU_PIX_FMT_YVU410P fourcc('Y', 'V', 'U', '9') /*< 9 YVU 4:1:0 */ |
| 72 | #define IPU_PIX_FMT_YUV410P fourcc('Y', 'U', 'V', '9') /*< 9 YUV 4:1:0 */ |
| 73 | #define IPU_PIX_FMT_YVU420P fourcc('Y', 'V', '1', '2') /*< 12 YVU 4:2:0 */ |
| 74 | #define IPU_PIX_FMT_YUV420P fourcc('I', '4', '2', '0') /*< 12 YUV 4:2:0 */ |
| 75 | #define IPU_PIX_FMT_YUV420P2 fourcc('Y', 'U', '1', '2') /*< 12 YUV 4:2:0 */ |
| 76 | #define IPU_PIX_FMT_YVU422P fourcc('Y', 'V', '1', '6') /*< 16 YVU 4:2:2 */ |
| 77 | #define IPU_PIX_FMT_YUV422P fourcc('4', '2', '2', 'P') /*< 16 YUV 4:2:2 */ |
| 78 | |
Fabio Estevam | a1b0e19 | 2012-05-10 15:07:34 +0000 | [diff] [blame] | 79 | int ipuv3_fb_init(struct fb_videomode *mode, uint8_t disp, uint32_t pixfmt); |
Marek Vasut | 02ae1a1 | 2011-10-06 00:25:03 +0200 | [diff] [blame] | 80 | |
Stefano Babic | 92a98a4 | 2011-09-28 11:21:16 +0200 | [diff] [blame] | 81 | #endif |