MOXA linux-2.6.x / linux-2.6.9-uc0 from sdlinux-moxaart.tgz
[linux-2.6.9-moxart.git] / include / video / kyro.h
blobc5f9b0f001e7d5767651f81ebc8ae39749cab87d
1 /*
2 * linux/drivers/video/kyro/kryo.h
4 * Copyright (C) 2002 STMicroelectronics
5 * Copyright (C) 2004 Paul Mundt
7 * This file is subject to the terms and conditions of the GNU General Public
8 * License. See the file COPYING in the main directory of this archive
9 * for more details.
12 #ifndef _KYRO_H
13 #define _KYRO_H
15 struct kyrofb_info {
16 void *regbase;
18 u32 HTot; /* Hor Total Time */
19 u32 HFP; /* Hor Front Porch */
20 u32 HST; /* Hor Sync Time */
21 u32 HBP; /* Hor Back Porch */
22 s32 HSP; /* Hor Sync Polarity */
23 u32 VTot; /* Ver Total Time */
24 u32 VFP; /* Ver Front Porch */
25 u32 VST; /* Ver Sync Time */
26 u32 VBP; /* Ver Back Porch */
27 s32 VSP; /* Ver Sync Polarity */
28 u32 XRES; /* X Resolution */
29 u32 YRES; /* Y Resolution */
30 u32 VFREQ; /* Ver Frequency */
31 u32 PIXCLK; /* Pixel Clock */
32 u32 HCLK; /* Hor Clock */
34 /* Usefull to hold depth here for Linux */
35 u8 PIXDEPTH;
37 #ifdef CONFIG_MTRR
38 int mtrr_handle;
39 #endif
42 extern int kyro_dev_init(void);
43 extern void kyro_dev_reset(void);
45 extern unsigned char *kyro_dev_physical_fb_ptr(void);
46 extern unsigned char *kyro_dev_virtual_fb_ptr(void);
47 extern void *kyro_dev_physical_regs_ptr(void);
48 extern void *kyro_dev_virtual_regs_ptr(void);
49 extern unsigned int kyro_dev_fb_size(void);
50 extern unsigned int kyro_dev_regs_size(void);
52 extern int kyro_dev_overlay_create(u32 width, u32 height, int bLinear);
53 extern u32 kyro_dev_overlay_offset(void);
54 extern int kyro_dev_overlay_viewport_set(u32 x, u32 y, u32 width, u32 height);
57 * benedict.gaster@superh.com
58 * Added the follow IOCTLS for the creation of overlay services...
60 #define KYRO_IOC_MAGIC 'k'
62 #define KYRO_IOCTL_OVERLAY_CREATE _IO(KYRO_IOC_MAGIC, 0)
63 #define KYRO_IOCTL_OVERLAY_VIEWPORT_SET _IO(KYRO_IOC_MAGIC, 1)
64 #define KYRO_IOCTL_SET_VIDEO_MODE _IO(KYRO_IOC_MAGIC, 2)
65 #define KYRO_IOCTL_UVSTRIDE _IO(KYRO_IOC_MAGIC, 3)
66 #define KYRO_IOCTL_OVERLAY_OFFSET _IO(KYRO_IOC_MAGIC, 4)
67 #define KYRO_IOCTL_STRIDE _IO(KYRO_IOC_MAGIC, 5)
70 * The follow 3 structures are used to pass data from user space into the kernel
71 * for the creation of overlay surfaces and setting the video mode.
73 typedef struct _OVERLAY_CREATE {
74 u32 ulWidth;
75 u32 ulHeight;
76 int bLinear;
77 } overlay_create;
79 typedef struct _OVERLAY_VIEWPORT_SET {
80 u32 xOrgin;
81 u32 yOrgin;
82 u32 xSize;
83 u32 ySize;
84 } overlay_viewport_set;
86 typedef struct _SET_VIDEO_MODE {
87 u32 ulWidth;
88 u32 ulHeight;
89 u32 ulScan;
90 u8 displayDepth;
91 int bLinear;
92 } set_video_mode;
94 #endif /* _KYRO_H */