Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  *  linux/drivers/video/kyro/kryo.h
0003  *
0004  *  Copyright (C) 2002 STMicroelectronics
0005  *  Copyright (C) 2004 Paul Mundt
0006  *
0007  * This file is subject to the terms and conditions of the GNU General Public
0008  * License.  See the file COPYING in the main directory of this archive
0009  * for more details.
0010  */
0011 
0012 #ifndef _KYRO_H
0013 #define _KYRO_H
0014 
0015 struct kyrofb_info {
0016     void __iomem *regbase;
0017 
0018     u32 palette[16];
0019     u32 HTot;   /* Hor Total Time    */
0020     u32 HFP;    /* Hor Front Porch   */
0021     u32 HST;    /* Hor Sync Time     */
0022     u32 HBP;    /* Hor Back Porch    */
0023     s32 HSP;        /* Hor Sync Polarity */
0024     u32 VTot;   /* Ver Total Time    */
0025     u32 VFP;    /* Ver Front Porch   */
0026     u32 VST;    /* Ver Sync Time     */
0027     u32 VBP;    /* Ver Back Porch    */
0028     s32 VSP;        /* Ver Sync Polarity */
0029     u32 XRES;   /* X Resolution      */
0030     u32 YRES;   /* Y Resolution      */
0031     u32 VFREQ;  /* Ver Frequency     */
0032     u32 PIXCLK; /* Pixel Clock       */
0033     u32 HCLK;   /* Hor Clock         */
0034 
0035     /* Useful to hold depth here for Linux */
0036     u8 PIXDEPTH;
0037 
0038     int wc_cookie;
0039 };
0040 
0041 extern int kyro_dev_init(void);
0042 extern void kyro_dev_reset(void);
0043 
0044 extern unsigned char *kyro_dev_physical_fb_ptr(void);
0045 extern unsigned char *kyro_dev_virtual_fb_ptr(void);
0046 extern void *kyro_dev_physical_regs_ptr(void);
0047 extern void *kyro_dev_virtual_regs_ptr(void);
0048 extern unsigned int kyro_dev_fb_size(void);
0049 extern unsigned int kyro_dev_regs_size(void);
0050 
0051 extern u32 kyro_dev_overlay_offset(void);
0052 
0053 /*
0054  * benedict.gaster@superh.com
0055  * Added the follow IOCTLS for the creation of overlay services...
0056  */
0057 #define KYRO_IOC_MAGIC 'k'
0058 
0059 #define KYRO_IOCTL_OVERLAY_CREATE       _IO(KYRO_IOC_MAGIC, 0)
0060 #define KYRO_IOCTL_OVERLAY_VIEWPORT_SET _IO(KYRO_IOC_MAGIC, 1)
0061 #define KYRO_IOCTL_SET_VIDEO_MODE       _IO(KYRO_IOC_MAGIC, 2)
0062 #define KYRO_IOCTL_UVSTRIDE             _IO(KYRO_IOC_MAGIC, 3)
0063 #define KYRO_IOCTL_OVERLAY_OFFSET       _IO(KYRO_IOC_MAGIC, 4)
0064 #define KYRO_IOCTL_STRIDE               _IO(KYRO_IOC_MAGIC, 5)
0065 
0066 /*
0067  * The follow 3 structures are used to pass data from user space into the kernel
0068  * for the creation of overlay surfaces and setting the video mode.
0069  */
0070 typedef struct _OVERLAY_CREATE {
0071     u32 ulWidth;
0072     u32 ulHeight;
0073     int bLinear;
0074 } overlay_create;
0075 
0076 typedef struct _OVERLAY_VIEWPORT_SET {
0077     u32 xOrgin;
0078     u32 yOrgin;
0079     u32 xSize;
0080     u32 ySize;
0081 } overlay_viewport_set;
0082 
0083 typedef struct _SET_VIDEO_MODE {
0084     u32 ulWidth;
0085     u32 ulHeight;
0086     u32 ulScan;
0087     u8 displayDepth;
0088     int bLinear;
0089 } set_video_mode;
0090 
0091 #endif /* _KYRO_H */