display_gx.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. /*
  2. * Geode GX display controller
  3. *
  4. * Copyright (C) 2006 Arcom Control Systems Ltd.
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. */
  11. #ifndef __DISPLAY_GX_H__
  12. #define __DISPLAY_GX_H__
  13. int gx_frame_buffer_size(void);
  14. int gx_line_delta(int xres, int bpp);
  15. extern struct geode_dc_ops gx_dc_ops;
  16. /* Display controller registers */
  17. #define DC_UNLOCK 0x00
  18. # define DC_UNLOCK_CODE 0x00004758
  19. #define DC_GENERAL_CFG 0x04
  20. # define DC_GCFG_DFLE 0x00000001
  21. # define DC_GCFG_CURE 0x00000002
  22. # define DC_GCFG_ICNE 0x00000004
  23. # define DC_GCFG_VIDE 0x00000008
  24. # define DC_GCFG_CMPE 0x00000020
  25. # define DC_GCFG_DECE 0x00000040
  26. # define DC_GCFG_VGAE 0x00000080
  27. # define DC_GCFG_DFHPSL_MASK 0x00000F00
  28. # define DC_GCFG_DFHPSL_POS 8
  29. # define DC_GCFG_DFHPEL_MASK 0x0000F000
  30. # define DC_GCFG_DFHPEL_POS 12
  31. # define DC_GCFG_STFM 0x00010000
  32. # define DC_GCFG_FDTY 0x00020000
  33. # define DC_GCFG_VGAFT 0x00040000
  34. # define DC_GCFG_VDSE 0x00080000
  35. # define DC_GCFG_YUVM 0x00100000
  36. # define DC_GCFG_VFSL 0x00800000
  37. # define DC_GCFG_SIGE 0x01000000
  38. # define DC_GCFG_SGRE 0x02000000
  39. # define DC_GCFG_SGFR 0x04000000
  40. # define DC_GCFG_CRC_MODE 0x08000000
  41. # define DC_GCFG_DIAG 0x10000000
  42. # define DC_GCFG_CFRW 0x20000000
  43. #define DC_DISPLAY_CFG 0x08
  44. # define DC_DCFG_TGEN 0x00000001
  45. # define DC_DCFG_GDEN 0x00000008
  46. # define DC_DCFG_VDEN 0x00000010
  47. # define DC_DCFG_TRUP 0x00000040
  48. # define DC_DCFG_DISP_MODE_MASK 0x00000300
  49. # define DC_DCFG_DISP_MODE_8BPP 0x00000000
  50. # define DC_DCFG_DISP_MODE_16BPP 0x00000100
  51. # define DC_DCFG_DISP_MODE_24BPP 0x00000200
  52. # define DC_DCFG_16BPP_MODE_MASK 0x00000c00
  53. # define DC_DCFG_16BPP_MODE_565 0x00000000
  54. # define DC_DCFG_16BPP_MODE_555 0x00000100
  55. # define DC_DCFG_16BPP_MODE_444 0x00000200
  56. # define DC_DCFG_DCEN 0x00080000
  57. # define DC_DCFG_PALB 0x02000000
  58. # define DC_DCFG_FRLK 0x04000000
  59. # define DC_DCFG_VISL 0x08000000
  60. # define DC_DCFG_FRSL 0x20000000
  61. # define DC_DCFG_A18M 0x40000000
  62. # define DC_DCFG_A20M 0x80000000
  63. #define DC_FB_ST_OFFSET 0x10
  64. #define DC_LINE_SIZE 0x30
  65. # define DC_LINE_SIZE_FB_LINE_SIZE_MASK 0x000007ff
  66. # define DC_LINE_SIZE_FB_LINE_SIZE_POS 0
  67. # define DC_LINE_SIZE_CB_LINE_SIZE_MASK 0x007f0000
  68. # define DC_LINE_SIZE_CB_LINE_SIZE_POS 16
  69. # define DC_LINE_SIZE_VID_LINE_SIZE_MASK 0xff000000
  70. # define DC_LINE_SIZE_VID_LINE_SIZE_POS 24
  71. #define DC_GFX_PITCH 0x34
  72. # define DC_GFX_PITCH_FB_PITCH_MASK 0x0000ffff
  73. # define DC_GFX_PITCH_FB_PITCH_POS 0
  74. # define DC_GFX_PITCH_CB_PITCH_MASK 0xffff0000
  75. # define DC_GFX_PITCH_CB_PITCH_POS 16
  76. #define DC_H_ACTIVE_TIMING 0x40
  77. #define DC_H_BLANK_TIMING 0x44
  78. #define DC_H_SYNC_TIMING 0x48
  79. #define DC_V_ACTIVE_TIMING 0x50
  80. #define DC_V_BLANK_TIMING 0x54
  81. #define DC_V_SYNC_TIMING 0x58
  82. #define DC_PAL_ADDRESS 0x70
  83. #define DC_PAL_DATA 0x74
  84. #endif /* !__DISPLAY_GX1_H__ */