kyro.h 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /*
  2. * linux/drivers/video/kyro/kryo.h
  3. *
  4. * Copyright (C) 2002 STMicroelectronics
  5. * Copyright (C) 2004 Paul Mundt
  6. *
  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.
  10. */
  11. #ifndef _KYRO_H
  12. #define _KYRO_H
  13. struct kyrofb_info {
  14. void __iomem *regbase;
  15. u32 palette[16];
  16. u32 HTot; /* Hor Total Time */
  17. u32 HFP; /* Hor Front Porch */
  18. u32 HST; /* Hor Sync Time */
  19. u32 HBP; /* Hor Back Porch */
  20. s32 HSP; /* Hor Sync Polarity */
  21. u32 VTot; /* Ver Total Time */
  22. u32 VFP; /* Ver Front Porch */
  23. u32 VST; /* Ver Sync Time */
  24. u32 VBP; /* Ver Back Porch */
  25. s32 VSP; /* Ver Sync Polarity */
  26. u32 XRES; /* X Resolution */
  27. u32 YRES; /* Y Resolution */
  28. u32 VFREQ; /* Ver Frequency */
  29. u32 PIXCLK; /* Pixel Clock */
  30. u32 HCLK; /* Hor Clock */
  31. /* Useful to hold depth here for Linux */
  32. u8 PIXDEPTH;
  33. #ifdef CONFIG_MTRR
  34. int mtrr_handle;
  35. #endif
  36. };
  37. extern int kyro_dev_init(void);
  38. extern void kyro_dev_reset(void);
  39. extern unsigned char *kyro_dev_physical_fb_ptr(void);
  40. extern unsigned char *kyro_dev_virtual_fb_ptr(void);
  41. extern void *kyro_dev_physical_regs_ptr(void);
  42. extern void *kyro_dev_virtual_regs_ptr(void);
  43. extern unsigned int kyro_dev_fb_size(void);
  44. extern unsigned int kyro_dev_regs_size(void);
  45. extern u32 kyro_dev_overlay_offset(void);
  46. /*
  47. * benedict.gaster@superh.com
  48. * Added the follow IOCTLS for the creation of overlay services...
  49. */
  50. #define KYRO_IOC_MAGIC 'k'
  51. #define KYRO_IOCTL_OVERLAY_CREATE _IO(KYRO_IOC_MAGIC, 0)
  52. #define KYRO_IOCTL_OVERLAY_VIEWPORT_SET _IO(KYRO_IOC_MAGIC, 1)
  53. #define KYRO_IOCTL_SET_VIDEO_MODE _IO(KYRO_IOC_MAGIC, 2)
  54. #define KYRO_IOCTL_UVSTRIDE _IO(KYRO_IOC_MAGIC, 3)
  55. #define KYRO_IOCTL_OVERLAY_OFFSET _IO(KYRO_IOC_MAGIC, 4)
  56. #define KYRO_IOCTL_STRIDE _IO(KYRO_IOC_MAGIC, 5)
  57. /*
  58. * The follow 3 structures are used to pass data from user space into the kernel
  59. * for the creation of overlay surfaces and setting the video mode.
  60. */
  61. typedef struct _OVERLAY_CREATE {
  62. u32 ulWidth;
  63. u32 ulHeight;
  64. int bLinear;
  65. } overlay_create;
  66. typedef struct _OVERLAY_VIEWPORT_SET {
  67. u32 xOrgin;
  68. u32 yOrgin;
  69. u32 xSize;
  70. u32 ySize;
  71. } overlay_viewport_set;
  72. typedef struct _SET_VIDEO_MODE {
  73. u32 ulWidth;
  74. u32 ulHeight;
  75. u32 ulScan;
  76. u8 displayDepth;
  77. int bLinear;
  78. } set_video_mode;
  79. #endif /* _KYRO_H */