videomodes.h 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. /*
  2. * (C) Copyright 2004
  3. * Pierre Aubert, Staubli Faverges , <p.aubert@staubli.com>
  4. *
  5. * See file CREDITS for list of people who contributed to this
  6. * project.
  7. *
  8. * This program is free software; you can redistribute it and/or
  9. * modify it under the terms of the GNU General Public License as
  10. * published by the Free Software Foundation; either version 2 of
  11. * the License, or (at your option) any later version.
  12. *
  13. * This program is distributed in the hope that it will be useful,
  14. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. * GNU General Public License for more details.
  17. *
  18. * You should have received a copy of the GNU General Public License
  19. * along with this program; if not, write to the Free Software
  20. * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
  21. * MA 02111-1307 USA
  22. */
  23. #ifndef CFG_DEFAULT_VIDEO_MODE
  24. #define CFG_DEFAULT_VIDEO_MODE 0x301
  25. #endif
  26. /* Some mode definitions */
  27. #define FB_SYNC_HOR_HIGH_ACT 1 /* horizontal sync high active */
  28. #define FB_SYNC_VERT_HIGH_ACT 2 /* vertical sync high active */
  29. #define FB_SYNC_EXT 4 /* external sync */
  30. #define FB_SYNC_COMP_HIGH_ACT 8 /* composite sync high active */
  31. #define FB_SYNC_BROADCAST 16 /* broadcast video timings */
  32. /* vtotal = 144d/288n/576i => PAL */
  33. /* vtotal = 121d/242n/484i => NTSC */
  34. #define FB_SYNC_ON_GREEN 32 /* sync on green */
  35. #define FB_VMODE_NONINTERLACED 0 /* non interlaced */
  36. #define FB_VMODE_INTERLACED 1 /* interlaced */
  37. #define FB_VMODE_DOUBLE 2 /* double scan */
  38. #define FB_VMODE_MASK 255
  39. #define FB_VMODE_YWRAP 256 /* ywrap instead of panning */
  40. #define FB_VMODE_SMOOTH_XPAN 512 /* smooth xpan possible (internally used) */
  41. #define FB_VMODE_CONUPDATE 512 /* don't update x/yoffset */
  42. /******************************************************************
  43. * Resolution Struct
  44. ******************************************************************/
  45. struct ctfb_res_modes {
  46. int xres; /* visible resolution */
  47. int yres;
  48. /* Timing: All values in pixclocks, except pixclock (of course) */
  49. int pixclock; /* pixel clock in ps (pico seconds) */
  50. int left_margin; /* time from sync to picture */
  51. int right_margin; /* time from picture to sync */
  52. int upper_margin; /* time from sync to picture */
  53. int lower_margin;
  54. int hsync_len; /* length of horizontal sync */
  55. int vsync_len; /* length of vertical sync */
  56. int sync; /* see FB_SYNC_* */
  57. int vmode; /* see FB_VMODE_* */
  58. };
  59. /******************************************************************
  60. * Vesa Mode Struct
  61. ******************************************************************/
  62. struct ctfb_vesa_modes {
  63. int vesanr; /* Vesa number as in LILO (VESA Nr + 0x200} */
  64. int resindex; /* index to resolution struct */
  65. int bits_per_pixel; /* bpp */
  66. };
  67. #define RES_MODE_640x480 0
  68. #define RES_MODE_800x600 1
  69. #define RES_MODE_1024x768 2
  70. #define RES_MODE_960_720 3
  71. #define RES_MODE_1152x864 4
  72. #define RES_MODE_1280x1024 5
  73. #define RES_MODES_COUNT 6
  74. #define VESA_MODES_COUNT 19
  75. extern const struct ctfb_vesa_modes vesa_modes[];
  76. extern const struct ctfb_res_modes res_mode_init[];
  77. int video_get_params (struct ctfb_res_modes *pPar, char *penv);