xref: /kernel/linux/linux-6.6/include/video/kyro.h (revision 62306a36)
162306a36Sopenharmony_ci/*
262306a36Sopenharmony_ci *  linux/drivers/video/kyro/kryo.h
362306a36Sopenharmony_ci *
462306a36Sopenharmony_ci *  Copyright (C) 2002 STMicroelectronics
562306a36Sopenharmony_ci *  Copyright (C) 2004 Paul Mundt
662306a36Sopenharmony_ci *
762306a36Sopenharmony_ci * This file is subject to the terms and conditions of the GNU General Public
862306a36Sopenharmony_ci * License.  See the file COPYING in the main directory of this archive
962306a36Sopenharmony_ci * for more details.
1062306a36Sopenharmony_ci */
1162306a36Sopenharmony_ci
1262306a36Sopenharmony_ci#ifndef _KYRO_H
1362306a36Sopenharmony_ci#define _KYRO_H
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_cistruct kyrofb_info {
1662306a36Sopenharmony_ci	void __iomem *regbase;
1762306a36Sopenharmony_ci
1862306a36Sopenharmony_ci	u32 palette[16];
1962306a36Sopenharmony_ci	u32 HTot;	/* Hor Total Time    */
2062306a36Sopenharmony_ci	u32 HFP;	/* Hor Front Porch   */
2162306a36Sopenharmony_ci	u32 HST;	/* Hor Sync Time     */
2262306a36Sopenharmony_ci	u32 HBP;	/* Hor Back Porch    */
2362306a36Sopenharmony_ci	s32 HSP;		/* Hor Sync Polarity */
2462306a36Sopenharmony_ci	u32 VTot;	/* Ver Total Time    */
2562306a36Sopenharmony_ci	u32 VFP;	/* Ver Front Porch   */
2662306a36Sopenharmony_ci	u32 VST;	/* Ver Sync Time     */
2762306a36Sopenharmony_ci	u32 VBP;	/* Ver Back Porch    */
2862306a36Sopenharmony_ci	s32 VSP;		/* Ver Sync Polarity */
2962306a36Sopenharmony_ci	u32 XRES;	/* X Resolution      */
3062306a36Sopenharmony_ci	u32 YRES;	/* Y Resolution      */
3162306a36Sopenharmony_ci	u32 VFREQ;	/* Ver Frequency     */
3262306a36Sopenharmony_ci	u32 PIXCLK;	/* Pixel Clock       */
3362306a36Sopenharmony_ci	u32 HCLK;	/* Hor Clock         */
3462306a36Sopenharmony_ci
3562306a36Sopenharmony_ci	/* Useful to hold depth here for Linux */
3662306a36Sopenharmony_ci	u8 PIXDEPTH;
3762306a36Sopenharmony_ci
3862306a36Sopenharmony_ci	int wc_cookie;
3962306a36Sopenharmony_ci};
4062306a36Sopenharmony_ci
4162306a36Sopenharmony_ci/*
4262306a36Sopenharmony_ci * benedict.gaster@superh.com
4362306a36Sopenharmony_ci * Added the follow IOCTLS for the creation of overlay services...
4462306a36Sopenharmony_ci */
4562306a36Sopenharmony_ci#define KYRO_IOC_MAGIC 'k'
4662306a36Sopenharmony_ci
4762306a36Sopenharmony_ci#define KYRO_IOCTL_OVERLAY_CREATE       _IO(KYRO_IOC_MAGIC, 0)
4862306a36Sopenharmony_ci#define KYRO_IOCTL_OVERLAY_VIEWPORT_SET _IO(KYRO_IOC_MAGIC, 1)
4962306a36Sopenharmony_ci#define KYRO_IOCTL_SET_VIDEO_MODE       _IO(KYRO_IOC_MAGIC, 2)
5062306a36Sopenharmony_ci#define KYRO_IOCTL_UVSTRIDE             _IO(KYRO_IOC_MAGIC, 3)
5162306a36Sopenharmony_ci#define KYRO_IOCTL_OVERLAY_OFFSET       _IO(KYRO_IOC_MAGIC, 4)
5262306a36Sopenharmony_ci#define KYRO_IOCTL_STRIDE               _IO(KYRO_IOC_MAGIC, 5)
5362306a36Sopenharmony_ci
5462306a36Sopenharmony_ci/*
5562306a36Sopenharmony_ci * The follow 3 structures are used to pass data from user space into the kernel
5662306a36Sopenharmony_ci * for the creation of overlay surfaces and setting the video mode.
5762306a36Sopenharmony_ci */
5862306a36Sopenharmony_citypedef struct _OVERLAY_CREATE {
5962306a36Sopenharmony_ci	u32 ulWidth;
6062306a36Sopenharmony_ci	u32 ulHeight;
6162306a36Sopenharmony_ci	int bLinear;
6262306a36Sopenharmony_ci} overlay_create;
6362306a36Sopenharmony_ci
6462306a36Sopenharmony_citypedef struct _OVERLAY_VIEWPORT_SET {
6562306a36Sopenharmony_ci	u32 xOrgin;
6662306a36Sopenharmony_ci	u32 yOrgin;
6762306a36Sopenharmony_ci	u32 xSize;
6862306a36Sopenharmony_ci	u32 ySize;
6962306a36Sopenharmony_ci} overlay_viewport_set;
7062306a36Sopenharmony_ci
7162306a36Sopenharmony_citypedef struct _SET_VIDEO_MODE {
7262306a36Sopenharmony_ci	u32 ulWidth;
7362306a36Sopenharmony_ci	u32 ulHeight;
7462306a36Sopenharmony_ci	u32 ulScan;
7562306a36Sopenharmony_ci	u8 displayDepth;
7662306a36Sopenharmony_ci	int bLinear;
7762306a36Sopenharmony_ci} set_video_mode;
7862306a36Sopenharmony_ci
7962306a36Sopenharmony_ci#endif /* _KYRO_H */
80