Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
vpbe_osd.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2007-2009 Texas Instruments Inc
3  * Copyright (C) 2007 MontaVista Software, Inc.
4  *
5  * Andy Lowe ([email protected]), MontaVista Software
6  * - Initial version
7  * Murali Karicheri ([email protected]), Texas Instruments Ltd.
8  * - ported to sub device interface
9  *
10  * This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation version 2..
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the GNU General Public License
20  * along with this program; if not, write to the Free Software
21  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22  *
23  */
24 #ifndef _OSD_H
25 #define _OSD_H
26 
28 
29 #define VPBE_OSD_SUBDEV_NAME "vpbe-osd"
30 
41 enum osd_layer {
46 };
47 
59 };
60 
88 };
89 
103 };
104 
116 };
117 
131 };
132 
141 enum osd_clut {
144 };
145 
157 };
158 
182 };
183 
199 };
200 
221 };
222 
243 };
244 
262  unsigned xsize;
263  unsigned ysize;
264  unsigned xpos;
265  unsigned ypos;
270  unsigned char clut_index;
271 };
272 
290  unsigned line_length;
291  unsigned xsize;
292  unsigned ysize;
293  unsigned xpos;
294  unsigned ypos;
296 };
297 
298 /* parameters that apply on a per-window (OSD or video) basis */
302  unsigned long fb_base_phys;
306 };
307 
308 /* parameters that apply on a per-OSD-window basis */
313  unsigned colorkey;
315  /* index is pixel value */
316  unsigned char palette_map[16];
317 };
318 
319 /* hardware rectangular cursor parameters */
323 };
324 
325 struct osd_state;
326 
327 struct vpbe_osd_ops {
328  int (*initialize)(struct osd_state *sd);
329  int (*request_layer)(struct osd_state *sd, enum osd_layer layer);
330  void (*release_layer)(struct osd_state *sd, enum osd_layer layer);
331  int (*enable_layer)(struct osd_state *sd, enum osd_layer layer,
332  int otherwin);
333  void (*disable_layer)(struct osd_state *sd, enum osd_layer layer);
334  int (*set_layer_config)(struct osd_state *sd, enum osd_layer layer,
335  struct osd_layer_config *lconfig);
336  void (*get_layer_config)(struct osd_state *sd, enum osd_layer layer,
337  struct osd_layer_config *lconfig);
338  void (*start_layer)(struct osd_state *sd, enum osd_layer layer,
339  unsigned long fb_base_phys,
340  unsigned long cbcr_ofst);
345  enum osd_h_exp_ratio h_exp,
346  enum osd_v_exp_ratio v_exp);
348  enum osd_h_exp_ratio *h_exp,
349  enum osd_v_exp_ratio *v_exp);
350  void (*set_zoom)(struct osd_state *sd, enum osd_layer layer,
351  enum osd_zoom_factor h_zoom,
352  enum osd_zoom_factor v_zoom);
353 };
354 
355 struct osd_state {
358  struct device *dev;
360  unsigned long osd_base;
361  unsigned long osd_size;
362  /* 1-->the isr will toggle the VID0 ping-pong buffer */
363  int pingpong;
374  /* attribute window blinking enabled */
376  /* YCbCrI or YCrCbI */
378  /* columns are Y, Cb, Cr */
379  unsigned char clut_ram[256][3];
381  /* OSD0, VID0, OSD1, VID1 */
383  /* OSD0, OSD1 */
385  /* OSD device Operations */
387 };
388 
392 };
393 
394 #endif