1 /**********************************************************************
3 * Copyright (C) 2009 Texas Instruments Incorporated - http://www.ti.com/
4 * Copyright(c) 2008 Imagination Technologies Ltd. All rights reserved.
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License,
8 * version 2, as published by the Free Software Foundation.
10 * This program is distributed in the hope it will be useful but, except
11 * as otherwise stated in writing, without any warranty; without even the
12 * implied warranty of merchantability or fitness for a particular purpose.
13 * See the GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License along with
16 * this program; if not, write to the Free Software Foundation, Inc.,
17 * 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
19 * The full GNU General Public License is included in this distribution in
20 * the file called "COPYING".
22 * Contact Information:
23 * Imagination Technologies Ltd. <gpl-support@imgtec.com>
24 * Home Park Estate, Kings Langley, Herts, WD4 8LZ, UK
26 ******************************************************************************/
31 #include <linux/ioctl.h>
33 #define BC_FOURCC(a,b,c,d) \
34 ((unsigned long) ((a) | (b)<<8 | (c)<<16 | (d)<<24))
36 #define BC_PIX_FMT_NV12 BC_FOURCC('N', 'V', '1', '2') /*YUV 4:2:0*/
37 #define BC_PIX_FMT_UYVY BC_FOURCC('U', 'Y', 'V', 'Y') /*YUV 4:2:2*/
38 #define BC_PIX_FMT_YUYV BC_FOURCC('Y', 'U', 'Y', 'V') /*YUV 4:2:2*/
39 #define BC_PIX_FMT_RGB565 BC_FOURCC('R', 'G', 'B', 'P') /*RGB 5:6:5*/
43 BC_MEMORY_USERPTR = 2,
46 typedef struct BCIO_package_TAG {
52 * the following types are tested for fourcc in struct bc_buf_params_t
55 * RGB565 - not tested yet
58 typedef struct bc_buf_params {
59 int count; /*number of buffers, [in/out]*/
60 int width; /*buffer width in pixel, multiple of 8 or 32*/
61 int height; /*buffer height in pixel*/
62 unsigned int fourcc; /*buffer pixel format*/
66 typedef struct bc_buf_ptr {
73 #define BC_IOWR(INDEX) _IOWR(BCIO_GID, INDEX, BCIO_package)
75 #define BCIOGET_BUFFERCOUNT BC_IOWR(0) /*obsolete, since BCIOREQ_BUFFERS
76 return the number of buffers*/
77 #define BCIOGET_BUFFERPHYADDR BC_IOWR(1) /*get physical address by index*/
78 #define BCIOGET_BUFFERIDX BC_IOWR(2) /*get index by physical address*/
80 #define BCIOREQ_BUFFERS BC_IOWR(3)
81 #define BCIOSET_BUFFERPHYADDR BC_IOWR(4)