Added USB back into the main build
[tpg/acess2.git] / KernelLand / Modules / Display / Tegra2Vid / tegra2.h
1 /*
2  * Acess2 NVidia Tegra2 Display Driver
3  * - By John Hodge (thePowersGang)
4  *
5  * tegra2.h
6  * - Driver definitions
7  */
8 #ifndef _TEGRA2_DISP_H_
9 #define _TEGRA2_DISP_H_
10
11 #define TEGRA2VID_BASE  0x54200000      // 0x40000 Large (256 KB)
12
13 const struct sTegra2_Disp_Mode
14 {
15         Uint16  W,   H;
16         Uint16  HFP, VFP;
17         Uint16  HS,  VS;
18         Uint16  HBP, VBP;
19 }       caTegra2Vid_Modes[] = {
20         // TODO: VESA timings
21         {720,  487,  16,33,   63, 33,   59, 133},       // NTSC 2
22         {720,  576,  12,33,   63, 33,   69, 193},       // PAL 2 (VFP shown as 2/33, used 33)
23         {720,  483,  16, 6,   63,  6,   59,  30},       // 480p
24         {1280, 720,  70, 5,  804,  6,  220,  20},       // 720p
25         {1920,1080,  44, 4,  884,  5,  148,  36},       // 1080p
26         // TODO: Can all but HA/VA be constant and those select the resolution?
27 };
28 const int ciTegra2Vid_ModeCount = sizeof(caTegra2Vid_Modes)/sizeof(caTegra2Vid_Modes[0]);
29
30 enum eTegra2_Disp_Regs
31 {
32         DC_DISP_DISP_SIGNAL_OPTIONS0_0 = 0x400,
33         DC_DISP_DISP_SIGNAL_OPTIONS1_0, // 401
34         DC_DISP_DISP_WIN_OPTIONS_0,     // 402
35         DC_DISP_MEM_HIGH_PRIORITY_0,    // 403
36         DC_DISP_MEM_HIGH_PRIORITY_TIMER_0,      // 404
37         DC_DISP_DISP_TIMING_OPTIONS_0,  // 405
38         DC_DISP_REF_TO_SYNC_0,          // 406 (TrimSlice 0x0001 000B)
39         DC_DISP_SYNC_WIDTH_0,           // 407 (TrimSlice 0x0004 003A)
40         DC_DISP_BACK_PORCH_0,           // 408 (TrimSlice 0x0004 003A)
41         DC_DISP_DISP_ACTIVE_0,          // 409 (TrimSlice 0x0300 0400)
42         DC_DISP_FRONT_PORCH_0,          // 40A (TrimSlice 0x0004 003A)
43
44         DC_DISP_H_PULSE0_CONTROL_0,     // 40B
45
46         DC_DISP_DISP_COLOR_CONTROL_0 = 0x430,
47         
48         DC_WINC_A_COLOR_PALETTE_0 = 0x500,
49         DC_WINC_A_PALETTE_COLOR_EXT_0 = 0x600,
50         DC_WIN_A_WIN_OPTIONS_0 = 0x700,
51         DC_WIN_A_BYTE_SWAP_0,           // 701
52         DC_WIN_A_BUFFER_CONTROL_0,      // 702
53         DC_WIN_A_COLOR_DEPTH_0,         // 703
54         DC_WIN_A_POSITION_0,            // 704
55         DC_WIN_A_SIZE_0,                // 705 (TrimSlice 0x0300 0400)
56         DC_WIN_A_PRESCALED_SIZE_0,
57         DC_WIN_A_H_INITIAL_DDA_0,
58         DC_WIN_A_V_INITIAL_DDA_0,
59         DC_WIN_A_DDA_INCREMENT_0,
60         DC_WIN_A_LINE_STRIDE_0,
61         DC_WIN_A_BUF_STRIDE_0,
62         DC_WIN_A_BUFFER_ADDR_MODE_0,
63         DC_WIN_A_DV_CONTROL_0,
64         DC_WIN_A_BLEND_NOKEY_0,
65         
66         DC_WINBUF_A_START_ADDR_0 = 0x800,
67         DC_WINBUF_A_START_ADDR_NS_0,
68         DC_WINBUF_A_ADDR_H_OFFSET_0,
69         DC_WINBUF_A_ADDR_H_OFFSET_NS_0,
70         DC_WINBUF_A_ADDR_V_OFFSET_0,
71         DC_WINBUF_A_ADDR_V_OFFSET_NS_0,
72 };
73
74 #endif
75

UCC git Repository :: git.ucc.asn.au