Rev 4560 | Rev 5128 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 4560 | Rev 5060 | ||
---|---|---|---|
Line 24... | Line 24... | ||
24 | 24 | ||
25 | #ifndef _I915_REG_H_ |
25 | #ifndef _I915_REG_H_ |
Line 26... | Line 26... | ||
26 | #define _I915_REG_H_ |
26 | #define _I915_REG_H_ |
27 | - | ||
28 | #define _PIPE(pipe, a, b) ((a) + (pipe)*((b)-(a))) |
27 | |
Line 29... | Line 28... | ||
29 | #define _PIPE_INC(pipe, base, inc) ((base) + (pipe)*(inc)) |
28 | #define _PIPE(pipe, a, b) ((a) + (pipe)*((b)-(a))) |
- | 29 | #define _TRANSCODER(tran, a, b) ((a) + (tran)*((b)-(a))) |
|
- | 30 | ||
Line 30... | Line 31... | ||
30 | #define _TRANSCODER(tran, a, b) ((a) + (tran)*((b)-(a))) |
31 | #define _PORT(port, a, b) ((a) + (port)*((b)-(a))) |
31 | 32 | #define _PIPE3(pipe, a, b, c) ((pipe) == PIPE_A ? (a) : \ |
|
Line 32... | Line 33... | ||
32 | #define _PORT(port, a, b) ((a) + (port)*((b)-(a))) |
33 | (pipe) == PIPE_B ? (b) : (c)) |
Line 71... | Line 72... | ||
71 | #define I945_GC_RENDER_CLOCK_400_MHZ (5 << 0) |
72 | #define I945_GC_RENDER_CLOCK_400_MHZ (5 << 0) |
72 | #define I915_GC_RENDER_CLOCK_MASK (7 << 0) |
73 | #define I915_GC_RENDER_CLOCK_MASK (7 << 0) |
73 | #define I915_GC_RENDER_CLOCK_166_MHZ (0 << 0) |
74 | #define I915_GC_RENDER_CLOCK_166_MHZ (0 << 0) |
74 | #define I915_GC_RENDER_CLOCK_200_MHZ (1 << 0) |
75 | #define I915_GC_RENDER_CLOCK_200_MHZ (1 << 0) |
75 | #define I915_GC_RENDER_CLOCK_333_MHZ (4 << 0) |
76 | #define I915_GC_RENDER_CLOCK_333_MHZ (4 << 0) |
76 | #define LBB 0xf4 |
77 | #define PCI_LBPC 0xf4 /* legacy/combination backlight modes, also called LBB */ |
- | 78 | ||
Line 77... | Line 79... | ||
77 | 79 | ||
78 | /* Graphics reset regs */ |
80 | /* Graphics reset regs */ |
79 | #define I965_GDRST 0xc0 /* PCI config register */ |
- | |
80 | #define ILK_GDSR 0x2ca4 /* MCHBAR offset */ |
81 | #define I965_GDRST 0xc0 /* PCI config register */ |
81 | #define GRDOM_FULL (0<<2) |
82 | #define GRDOM_FULL (0<<2) |
82 | #define GRDOM_RENDER (1<<2) |
83 | #define GRDOM_RENDER (1<<2) |
83 | #define GRDOM_MEDIA (3<<2) |
84 | #define GRDOM_MEDIA (3<<2) |
84 | #define GRDOM_MASK (3<<2) |
85 | #define GRDOM_MASK (3<<2) |
Line -... | Line 86... | ||
- | 86 | #define GRDOM_RESET_ENABLE (1<<0) |
|
- | 87 | ||
- | 88 | #define ILK_GDSR 0x2ca4 /* MCHBAR offset */ |
|
- | 89 | #define ILK_GRDOM_FULL (0<<1) |
|
- | 90 | #define ILK_GRDOM_RENDER (1<<1) |
|
- | 91 | #define ILK_GRDOM_MEDIA (3<<1) |
|
- | 92 | #define ILK_GRDOM_MASK (3<<1) |
|
85 | #define GRDOM_RESET_ENABLE (1<<0) |
93 | #define ILK_GRDOM_RESET_ENABLE (1<<0) |
86 | 94 | ||
87 | #define GEN6_MBCUNIT_SNPCR 0x900c /* for LLC config */ |
95 | #define GEN6_MBCUNIT_SNPCR 0x900c /* for LLC config */ |
88 | #define GEN6_MBC_SNPCR_SHIFT 21 |
96 | #define GEN6_MBC_SNPCR_SHIFT 21 |
89 | #define GEN6_MBC_SNPCR_MASK (3<<21) |
97 | #define GEN6_MBC_SNPCR_MASK (3<<21) |
90 | #define GEN6_MBC_SNPCR_MAX (0<<21) |
98 | #define GEN6_MBC_SNPCR_MAX (0<<21) |
91 | #define GEN6_MBC_SNPCR_MED (1<<21) |
99 | #define GEN6_MBC_SNPCR_MED (1<<21) |
Line -... | Line 100... | ||
- | 100 | #define GEN6_MBC_SNPCR_LOW (2<<21) |
|
- | 101 | #define GEN6_MBC_SNPCR_MIN (3<<21) /* only 1/16th of the cache is shared */ |
|
- | 102 | ||
92 | #define GEN6_MBC_SNPCR_LOW (2<<21) |
103 | #define VLV_G3DCTL 0x9024 |
93 | #define GEN6_MBC_SNPCR_MIN (3<<21) /* only 1/16th of the cache is shared */ |
104 | #define VLV_GSCKGCTL 0x9028 |
94 | 105 | ||
95 | #define GEN6_MBCTL 0x0907c |
106 | #define GEN6_MBCTL 0x0907c |
96 | #define GEN6_MBCTL_ENABLE_BOOT_FETCH (1 << 4) |
107 | #define GEN6_MBCTL_ENABLE_BOOT_FETCH (1 << 4) |
Line 173... | Line 184... | ||
173 | #define VGA_CR_DATA_MDA 0x3b5 |
184 | #define VGA_CR_DATA_MDA 0x3b5 |
174 | #define VGA_CR_INDEX_CGA 0x3d4 |
185 | #define VGA_CR_INDEX_CGA 0x3d4 |
175 | #define VGA_CR_DATA_CGA 0x3d5 |
186 | #define VGA_CR_DATA_CGA 0x3d5 |
Line 176... | Line 187... | ||
176 | 187 | ||
- | 188 | /* |
|
- | 189 | * Instruction field definitions used by the command parser |
|
- | 190 | */ |
|
- | 191 | #define INSTR_CLIENT_SHIFT 29 |
|
- | 192 | #define INSTR_CLIENT_MASK 0xE0000000 |
|
- | 193 | #define INSTR_MI_CLIENT 0x0 |
|
- | 194 | #define INSTR_BC_CLIENT 0x2 |
|
- | 195 | #define INSTR_RC_CLIENT 0x3 |
|
- | 196 | #define INSTR_SUBCLIENT_SHIFT 27 |
|
- | 197 | #define INSTR_SUBCLIENT_MASK 0x18000000 |
|
- | 198 | #define INSTR_MEDIA_SUBCLIENT 0x2 |
|
- | 199 | ||
177 | /* |
200 | /* |
178 | * Memory interface instructions used by the kernel |
201 | * Memory interface instructions used by the kernel |
179 | */ |
202 | */ |
- | 203 | #define MI_INSTR(opcode, flags) (((opcode) << 23) | (flags)) |
|
- | 204 | /* Many MI commands use bit 22 of the header dword for GGTT vs PPGTT */ |
|
Line 180... | Line 205... | ||
180 | #define MI_INSTR(opcode, flags) (((opcode) << 23) | (flags)) |
205 | #define MI_GLOBAL_GTT (1<<22) |
181 | 206 | ||
182 | #define MI_NOOP MI_INSTR(0, 0) |
207 | #define MI_NOOP MI_INSTR(0, 0) |
183 | #define MI_USER_INTERRUPT MI_INSTR(0x02, 0) |
208 | #define MI_USER_INTERRUPT MI_INSTR(0x02, 0) |
Line 213... | Line 238... | ||
213 | #define MI_DISPLAY_FLIP_IVB_PLANE_B (1 << 19) |
238 | #define MI_DISPLAY_FLIP_IVB_PLANE_B (1 << 19) |
214 | #define MI_DISPLAY_FLIP_IVB_SPRITE_A (2 << 19) |
239 | #define MI_DISPLAY_FLIP_IVB_SPRITE_A (2 << 19) |
215 | #define MI_DISPLAY_FLIP_IVB_SPRITE_B (3 << 19) |
240 | #define MI_DISPLAY_FLIP_IVB_SPRITE_B (3 << 19) |
216 | #define MI_DISPLAY_FLIP_IVB_PLANE_C (4 << 19) |
241 | #define MI_DISPLAY_FLIP_IVB_PLANE_C (4 << 19) |
217 | #define MI_DISPLAY_FLIP_IVB_SPRITE_C (5 << 19) |
242 | #define MI_DISPLAY_FLIP_IVB_SPRITE_C (5 << 19) |
218 | #define MI_SEMAPHORE_MBOX MI_INSTR(0x16, 1) /* gen6+ */ |
243 | #define MI_SEMAPHORE_MBOX MI_INSTR(0x16, 1) /* gen6, gen7 */ |
219 | #define MI_SEMAPHORE_GLOBAL_GTT (1<<22) |
244 | #define MI_SEMAPHORE_GLOBAL_GTT (1<<22) |
220 | #define MI_SEMAPHORE_UPDATE (1<<21) |
245 | #define MI_SEMAPHORE_UPDATE (1<<21) |
221 | #define MI_SEMAPHORE_COMPARE (1<<20) |
246 | #define MI_SEMAPHORE_COMPARE (1<<20) |
222 | #define MI_SEMAPHORE_REGISTER (1<<18) |
247 | #define MI_SEMAPHORE_REGISTER (1<<18) |
223 | #define MI_SEMAPHORE_SYNC_VR (0<<16) /* RCS wait for VCS (RVSYNC) */ |
248 | #define MI_SEMAPHORE_SYNC_VR (0<<16) /* RCS wait for VCS (RVSYNC) */ |
Line 231... | Line 256... | ||
231 | #define MI_SEMAPHORE_SYNC_VB (2<<16) /* BCS wait for VCS (BVSYNC) */ |
256 | #define MI_SEMAPHORE_SYNC_VB (2<<16) /* BCS wait for VCS (BVSYNC) */ |
232 | #define MI_SEMAPHORE_SYNC_BVE (0<<16) /* VECS wait for BCS (VEBSYNC) */ |
257 | #define MI_SEMAPHORE_SYNC_BVE (0<<16) /* VECS wait for BCS (VEBSYNC) */ |
233 | #define MI_SEMAPHORE_SYNC_VVE (1<<16) /* VECS wait for VCS (VEVSYNC) */ |
258 | #define MI_SEMAPHORE_SYNC_VVE (1<<16) /* VECS wait for VCS (VEVSYNC) */ |
234 | #define MI_SEMAPHORE_SYNC_RVE (2<<16) /* VECS wait for RCS (VERSYNC) */ |
259 | #define MI_SEMAPHORE_SYNC_RVE (2<<16) /* VECS wait for RCS (VERSYNC) */ |
235 | #define MI_SEMAPHORE_SYNC_INVALID (3<<16) |
260 | #define MI_SEMAPHORE_SYNC_INVALID (3<<16) |
- | 261 | #define MI_SEMAPHORE_SYNC_MASK (3<<16) |
|
236 | #define MI_SET_CONTEXT MI_INSTR(0x18, 0) |
262 | #define MI_SET_CONTEXT MI_INSTR(0x18, 0) |
237 | #define MI_MM_SPACE_GTT (1<<8) |
263 | #define MI_MM_SPACE_GTT (1<<8) |
238 | #define MI_MM_SPACE_PHYSICAL (0<<8) |
264 | #define MI_MM_SPACE_PHYSICAL (0<<8) |
239 | #define MI_SAVE_EXT_STATE_EN (1<<3) |
265 | #define MI_SAVE_EXT_STATE_EN (1<<3) |
240 | #define MI_RESTORE_EXT_STATE_EN (1<<2) |
266 | #define MI_RESTORE_EXT_STATE_EN (1<<2) |
241 | #define MI_FORCE_RESTORE (1<<1) |
267 | #define MI_FORCE_RESTORE (1<<1) |
242 | #define MI_RESTORE_INHIBIT (1<<0) |
268 | #define MI_RESTORE_INHIBIT (1<<0) |
- | 269 | #define MI_SEMAPHORE_SIGNAL MI_INSTR(0x1b, 0) /* GEN8+ */ |
|
- | 270 | #define MI_SEMAPHORE_TARGET(engine) ((engine)<<15) |
|
- | 271 | #define MI_SEMAPHORE_WAIT MI_INSTR(0x1c, 2) /* GEN8+ */ |
|
- | 272 | #define MI_SEMAPHORE_POLL (1<<15) |
|
- | 273 | #define MI_SEMAPHORE_SAD_GTE_SDD (1<<12) |
|
243 | #define MI_STORE_DWORD_IMM MI_INSTR(0x20, 1) |
274 | #define MI_STORE_DWORD_IMM MI_INSTR(0x20, 1) |
244 | #define MI_MEM_VIRTUAL (1 << 22) /* 965+ only */ |
275 | #define MI_MEM_VIRTUAL (1 << 22) /* 965+ only */ |
245 | #define MI_STORE_DWORD_INDEX MI_INSTR(0x21, 1) |
276 | #define MI_STORE_DWORD_INDEX MI_INSTR(0x21, 1) |
246 | #define MI_STORE_DWORD_INDEX_SHIFT 2 |
277 | #define MI_STORE_DWORD_INDEX_SHIFT 2 |
247 | /* Official intel docs are somewhat sloppy concerning MI_LOAD_REGISTER_IMM: |
278 | /* Official intel docs are somewhat sloppy concerning MI_LOAD_REGISTER_IMM: |
248 | * - Always issue a MI_NOOP _before_ the MI_LOAD_REGISTER_IMM - otherwise hw |
279 | * - Always issue a MI_NOOP _before_ the MI_LOAD_REGISTER_IMM - otherwise hw |
249 | * simply ignores the register load under certain conditions. |
280 | * simply ignores the register load under certain conditions. |
250 | * - One can actually load arbitrary many arbitrary registers: Simply issue x |
281 | * - One can actually load arbitrary many arbitrary registers: Simply issue x |
251 | * address/value pairs. Don't overdue it, though, x <= 2^4 must hold! |
282 | * address/value pairs. Don't overdue it, though, x <= 2^4 must hold! |
252 | */ |
283 | */ |
253 | #define MI_LOAD_REGISTER_IMM(x) MI_INSTR(0x22, 2*x-1) |
284 | #define MI_LOAD_REGISTER_IMM(x) MI_INSTR(0x22, 2*(x)-1) |
254 | #define MI_STORE_REGISTER_MEM(x) MI_INSTR(0x24, 2*x-1) |
285 | #define MI_STORE_REGISTER_MEM(x) MI_INSTR(0x24, 2*(x)-1) |
- | 286 | #define MI_STORE_REGISTER_MEM_GEN8(x) MI_INSTR(0x24, 3*(x)-1) |
|
255 | #define MI_SRM_LRM_GLOBAL_GTT (1<<22) |
287 | #define MI_SRM_LRM_GLOBAL_GTT (1<<22) |
256 | #define MI_FLUSH_DW MI_INSTR(0x26, 1) /* for GEN6 */ |
288 | #define MI_FLUSH_DW MI_INSTR(0x26, 1) /* for GEN6 */ |
257 | #define MI_FLUSH_DW_STORE_INDEX (1<<21) |
289 | #define MI_FLUSH_DW_STORE_INDEX (1<<21) |
258 | #define MI_INVALIDATE_TLB (1<<18) |
290 | #define MI_INVALIDATE_TLB (1<<18) |
259 | #define MI_FLUSH_DW_OP_STOREDW (1<<14) |
291 | #define MI_FLUSH_DW_OP_STOREDW (1<<14) |
- | 292 | #define MI_FLUSH_DW_OP_MASK (3<<14) |
|
- | 293 | #define MI_FLUSH_DW_NOTIFY (1<<8) |
|
260 | #define MI_INVALIDATE_BSD (1<<7) |
294 | #define MI_INVALIDATE_BSD (1<<7) |
261 | #define MI_FLUSH_DW_USE_GTT (1<<2) |
295 | #define MI_FLUSH_DW_USE_GTT (1<<2) |
262 | #define MI_FLUSH_DW_USE_PPGTT (0<<2) |
296 | #define MI_FLUSH_DW_USE_PPGTT (0<<2) |
263 | #define MI_BATCH_BUFFER MI_INSTR(0x30, 1) |
297 | #define MI_BATCH_BUFFER MI_INSTR(0x30, 1) |
264 | #define MI_BATCH_NON_SECURE (1) |
298 | #define MI_BATCH_NON_SECURE (1) |
Line 316... | Line 350... | ||
316 | #define ASYNC_FLIP (1<<22) |
350 | #define ASYNC_FLIP (1<<22) |
317 | #define DISPLAY_PLANE_A (0<<20) |
351 | #define DISPLAY_PLANE_A (0<<20) |
318 | #define DISPLAY_PLANE_B (1<<20) |
352 | #define DISPLAY_PLANE_B (1<<20) |
319 | #define GFX_OP_PIPE_CONTROL(len) ((0x3<<29)|(0x3<<27)|(0x2<<24)|(len-2)) |
353 | #define GFX_OP_PIPE_CONTROL(len) ((0x3<<29)|(0x3<<27)|(0x2<<24)|(len-2)) |
320 | #define PIPE_CONTROL_GLOBAL_GTT_IVB (1<<24) /* gen7+ */ |
354 | #define PIPE_CONTROL_GLOBAL_GTT_IVB (1<<24) /* gen7+ */ |
- | 355 | #define PIPE_CONTROL_MMIO_WRITE (1<<23) |
|
- | 356 | #define PIPE_CONTROL_STORE_DATA_INDEX (1<<21) |
|
321 | #define PIPE_CONTROL_CS_STALL (1<<20) |
357 | #define PIPE_CONTROL_CS_STALL (1<<20) |
322 | #define PIPE_CONTROL_TLB_INVALIDATE (1<<18) |
358 | #define PIPE_CONTROL_TLB_INVALIDATE (1<<18) |
323 | #define PIPE_CONTROL_QW_WRITE (1<<14) |
359 | #define PIPE_CONTROL_QW_WRITE (1<<14) |
- | 360 | #define PIPE_CONTROL_POST_SYNC_OP_MASK (3<<14) |
|
324 | #define PIPE_CONTROL_DEPTH_STALL (1<<13) |
361 | #define PIPE_CONTROL_DEPTH_STALL (1<<13) |
325 | #define PIPE_CONTROL_WRITE_FLUSH (1<<12) |
362 | #define PIPE_CONTROL_WRITE_FLUSH (1<<12) |
326 | #define PIPE_CONTROL_RENDER_TARGET_CACHE_FLUSH (1<<12) /* gen6+ */ |
363 | #define PIPE_CONTROL_RENDER_TARGET_CACHE_FLUSH (1<<12) /* gen6+ */ |
327 | #define PIPE_CONTROL_INSTRUCTION_CACHE_INVALIDATE (1<<11) /* MBZ on Ironlake */ |
364 | #define PIPE_CONTROL_INSTRUCTION_CACHE_INVALIDATE (1<<11) /* MBZ on Ironlake */ |
328 | #define PIPE_CONTROL_TEXTURE_CACHE_INVALIDATE (1<<10) /* GM45+ only */ |
365 | #define PIPE_CONTROL_TEXTURE_CACHE_INVALIDATE (1<<10) /* GM45+ only */ |
329 | #define PIPE_CONTROL_INDIRECT_STATE_DISABLE (1<<9) |
366 | #define PIPE_CONTROL_INDIRECT_STATE_DISABLE (1<<9) |
330 | #define PIPE_CONTROL_NOTIFY (1<<8) |
367 | #define PIPE_CONTROL_NOTIFY (1<<8) |
- | 368 | #define PIPE_CONTROL_FLUSH_ENABLE (1<<7) /* gen7+ */ |
|
331 | #define PIPE_CONTROL_VF_CACHE_INVALIDATE (1<<4) |
369 | #define PIPE_CONTROL_VF_CACHE_INVALIDATE (1<<4) |
332 | #define PIPE_CONTROL_CONST_CACHE_INVALIDATE (1<<3) |
370 | #define PIPE_CONTROL_CONST_CACHE_INVALIDATE (1<<3) |
333 | #define PIPE_CONTROL_STATE_CACHE_INVALIDATE (1<<2) |
371 | #define PIPE_CONTROL_STATE_CACHE_INVALIDATE (1<<2) |
334 | #define PIPE_CONTROL_STALL_AT_SCOREBOARD (1<<1) |
372 | #define PIPE_CONTROL_STALL_AT_SCOREBOARD (1<<1) |
335 | #define PIPE_CONTROL_DEPTH_CACHE_FLUSH (1<<0) |
373 | #define PIPE_CONTROL_DEPTH_CACHE_FLUSH (1<<0) |
336 | #define PIPE_CONTROL_GLOBAL_GTT (1<<2) /* in addr dword */ |
374 | #define PIPE_CONTROL_GLOBAL_GTT (1<<2) /* in addr dword */ |
Line -... | Line 375... | ||
- | 375 | ||
- | 376 | /* |
|
- | 377 | * Commands used only by the command parser |
|
- | 378 | */ |
|
- | 379 | #define MI_SET_PREDICATE MI_INSTR(0x01, 0) |
|
- | 380 | #define MI_ARB_CHECK MI_INSTR(0x05, 0) |
|
- | 381 | #define MI_RS_CONTROL MI_INSTR(0x06, 0) |
|
- | 382 | #define MI_URB_ATOMIC_ALLOC MI_INSTR(0x09, 0) |
|
- | 383 | #define MI_PREDICATE MI_INSTR(0x0C, 0) |
|
- | 384 | #define MI_RS_CONTEXT MI_INSTR(0x0F, 0) |
|
- | 385 | #define MI_TOPOLOGY_FILTER MI_INSTR(0x0D, 0) |
|
- | 386 | #define MI_LOAD_SCAN_LINES_EXCL MI_INSTR(0x13, 0) |
|
- | 387 | #define MI_URB_CLEAR MI_INSTR(0x19, 0) |
|
- | 388 | #define MI_UPDATE_GTT MI_INSTR(0x23, 0) |
|
- | 389 | #define MI_CLFLUSH MI_INSTR(0x27, 0) |
|
- | 390 | #define MI_REPORT_PERF_COUNT MI_INSTR(0x28, 0) |
|
- | 391 | #define MI_REPORT_PERF_COUNT_GGTT (1<<0) |
|
- | 392 | #define MI_LOAD_REGISTER_MEM MI_INSTR(0x29, 0) |
|
- | 393 | #define MI_LOAD_REGISTER_REG MI_INSTR(0x2A, 0) |
|
- | 394 | #define MI_RS_STORE_DATA_IMM MI_INSTR(0x2B, 0) |
|
- | 395 | #define MI_LOAD_URB_MEM MI_INSTR(0x2C, 0) |
|
- | 396 | #define MI_STORE_URB_MEM MI_INSTR(0x2D, 0) |
|
- | 397 | #define MI_CONDITIONAL_BATCH_BUFFER_END MI_INSTR(0x36, 0) |
|
- | 398 | ||
- | 399 | #define PIPELINE_SELECT ((0x3<<29)|(0x1<<27)|(0x1<<24)|(0x4<<16)) |
|
- | 400 | #define GFX_OP_3DSTATE_VF_STATISTICS ((0x3<<29)|(0x1<<27)|(0x0<<24)|(0xB<<16)) |
|
- | 401 | #define MEDIA_VFE_STATE ((0x3<<29)|(0x2<<27)|(0x0<<24)|(0x0<<16)) |
|
- | 402 | #define MEDIA_VFE_STATE_MMIO_ACCESS_MASK (0x18) |
|
- | 403 | #define GPGPU_OBJECT ((0x3<<29)|(0x2<<27)|(0x1<<24)|(0x4<<16)) |
|
- | 404 | #define GPGPU_WALKER ((0x3<<29)|(0x2<<27)|(0x1<<24)|(0x5<<16)) |
|
- | 405 | #define GFX_OP_3DSTATE_DX9_CONSTANTF_VS \ |
|
- | 406 | ((0x3<<29)|(0x3<<27)|(0x0<<24)|(0x39<<16)) |
|
- | 407 | #define GFX_OP_3DSTATE_DX9_CONSTANTF_PS \ |
|
- | 408 | ((0x3<<29)|(0x3<<27)|(0x0<<24)|(0x3A<<16)) |
|
- | 409 | #define GFX_OP_3DSTATE_SO_DECL_LIST \ |
|
- | 410 | ((0x3<<29)|(0x3<<27)|(0x1<<24)|(0x17<<16)) |
|
- | 411 | ||
- | 412 | #define GFX_OP_3DSTATE_BINDING_TABLE_EDIT_VS \ |
|
- | 413 | ((0x3<<29)|(0x3<<27)|(0x0<<24)|(0x43<<16)) |
|
- | 414 | #define GFX_OP_3DSTATE_BINDING_TABLE_EDIT_GS \ |
|
- | 415 | ((0x3<<29)|(0x3<<27)|(0x0<<24)|(0x44<<16)) |
|
- | 416 | #define GFX_OP_3DSTATE_BINDING_TABLE_EDIT_HS \ |
|
- | 417 | ((0x3<<29)|(0x3<<27)|(0x0<<24)|(0x45<<16)) |
|
- | 418 | #define GFX_OP_3DSTATE_BINDING_TABLE_EDIT_DS \ |
|
- | 419 | ((0x3<<29)|(0x3<<27)|(0x0<<24)|(0x46<<16)) |
|
- | 420 | #define GFX_OP_3DSTATE_BINDING_TABLE_EDIT_PS \ |
|
- | 421 | ((0x3<<29)|(0x3<<27)|(0x0<<24)|(0x47<<16)) |
|
- | 422 | ||
- | 423 | #define MFX_WAIT ((0x3<<29)|(0x1<<27)|(0x0<<16)) |
|
- | 424 | ||
- | 425 | #define COLOR_BLT ((0x2<<29)|(0x40<<22)) |
|
- | 426 | #define SRC_COPY_BLT ((0x2<<29)|(0x43<<22)) |
|
- | 427 | ||
- | 428 | /* |
|
- | 429 | * Registers used only by the command parser |
|
- | 430 | */ |
|
- | 431 | #define BCS_SWCTRL 0x22200 |
|
- | 432 | ||
- | 433 | #define HS_INVOCATION_COUNT 0x2300 |
|
- | 434 | #define DS_INVOCATION_COUNT 0x2308 |
|
- | 435 | #define IA_VERTICES_COUNT 0x2310 |
|
- | 436 | #define IA_PRIMITIVES_COUNT 0x2318 |
|
- | 437 | #define VS_INVOCATION_COUNT 0x2320 |
|
- | 438 | #define GS_INVOCATION_COUNT 0x2328 |
|
- | 439 | #define GS_PRIMITIVES_COUNT 0x2330 |
|
- | 440 | #define CL_INVOCATION_COUNT 0x2338 |
|
- | 441 | #define CL_PRIMITIVES_COUNT 0x2340 |
|
- | 442 | #define PS_INVOCATION_COUNT 0x2348 |
|
- | 443 | #define PS_DEPTH_COUNT 0x2350 |
|
- | 444 | ||
- | 445 | /* There are the 4 64-bit counter registers, one for each stream output */ |
|
- | 446 | #define GEN7_SO_NUM_PRIMS_WRITTEN(n) (0x5200 + (n) * 8) |
|
- | 447 | ||
- | 448 | #define GEN7_SO_PRIM_STORAGE_NEEDED(n) (0x5240 + (n) * 8) |
|
- | 449 | ||
- | 450 | #define GEN7_3DPRIM_END_OFFSET 0x2420 |
|
- | 451 | #define GEN7_3DPRIM_START_VERTEX 0x2430 |
|
- | 452 | #define GEN7_3DPRIM_VERTEX_COUNT 0x2434 |
|
- | 453 | #define GEN7_3DPRIM_INSTANCE_COUNT 0x2438 |
|
- | 454 | #define GEN7_3DPRIM_START_INSTANCE 0x243C |
|
- | 455 | #define GEN7_3DPRIM_BASE_VERTEX 0x2440 |
|
- | 456 | ||
- | 457 | #define OACONTROL 0x2360 |
|
- | 458 | ||
- | 459 | #define _GEN7_PIPEA_DE_LOAD_SL 0x70068 |
|
- | 460 | #define _GEN7_PIPEB_DE_LOAD_SL 0x71068 |
|
- | 461 | #define GEN7_PIPE_DE_LOAD_SL(pipe) _PIPE(pipe, \ |
|
- | 462 | _GEN7_PIPEA_DE_LOAD_SL, \ |
|
Line 337... | Line 463... | ||
337 | 463 | _GEN7_PIPEB_DE_LOAD_SL) |
|
338 | 464 | ||
339 | /* |
465 | /* |
340 | * Reset registers |
466 | * Reset registers |
Line 356... | Line 482... | ||
356 | #define IOSF_SB_BUSY (1<<0) |
482 | #define IOSF_SB_BUSY (1<<0) |
357 | #define IOSF_PORT_BUNIT 0x3 |
483 | #define IOSF_PORT_BUNIT 0x3 |
358 | #define IOSF_PORT_PUNIT 0x4 |
484 | #define IOSF_PORT_PUNIT 0x4 |
359 | #define IOSF_PORT_NC 0x11 |
485 | #define IOSF_PORT_NC 0x11 |
360 | #define IOSF_PORT_DPIO 0x12 |
486 | #define IOSF_PORT_DPIO 0x12 |
- | 487 | #define IOSF_PORT_DPIO_2 0x1a |
|
361 | #define IOSF_PORT_GPIO_NC 0x13 |
488 | #define IOSF_PORT_GPIO_NC 0x13 |
362 | #define IOSF_PORT_CCK 0x14 |
489 | #define IOSF_PORT_CCK 0x14 |
363 | #define IOSF_PORT_CCU 0xA9 |
490 | #define IOSF_PORT_CCU 0xA9 |
364 | #define IOSF_PORT_GPS_CORE 0x48 |
491 | #define IOSF_PORT_GPS_CORE 0x48 |
365 | #define IOSF_PORT_FLISDSI 0x1B |
492 | #define IOSF_PORT_FLISDSI 0x1B |
Line 367... | Line 494... | ||
367 | #define VLV_IOSF_ADDR (VLV_DISPLAY_BASE + 0x2108) |
494 | #define VLV_IOSF_ADDR (VLV_DISPLAY_BASE + 0x2108) |
Line 368... | Line 495... | ||
368 | 495 | ||
369 | /* See configdb bunit SB addr map */ |
496 | /* See configdb bunit SB addr map */ |
Line 370... | Line -... | ||
370 | #define BUNIT_REG_BISOC 0x11 |
- | |
371 | - | ||
372 | #define PUNIT_OPCODE_REG_READ 6 |
- | |
373 | #define PUNIT_OPCODE_REG_WRITE 7 |
497 | #define BUNIT_REG_BISOC 0x11 |
374 | 498 | ||
375 | #define PUNIT_REG_DSPFREQ 0x36 |
499 | #define PUNIT_REG_DSPFREQ 0x36 |
376 | #define DSPFREQSTAT_SHIFT 30 |
500 | #define DSPFREQSTAT_SHIFT 30 |
377 | #define DSPFREQSTAT_MASK (0x3 << DSPFREQSTAT_SHIFT) |
501 | #define DSPFREQSTAT_MASK (0x3 << DSPFREQSTAT_SHIFT) |
- | 502 | #define DSPFREQGUAR_SHIFT 14 |
|
- | 503 | #define DSPFREQGUAR_MASK (0x3 << DSPFREQGUAR_SHIFT) |
|
- | 504 | ||
- | 505 | /* See the PUNIT HAS v0.8 for the below bits */ |
|
- | 506 | enum punit_power_well { |
|
- | 507 | PUNIT_POWER_WELL_RENDER = 0, |
|
- | 508 | PUNIT_POWER_WELL_MEDIA = 1, |
|
- | 509 | PUNIT_POWER_WELL_DISP2D = 3, |
|
- | 510 | PUNIT_POWER_WELL_DPIO_CMN_BC = 5, |
|
- | 511 | PUNIT_POWER_WELL_DPIO_TX_B_LANES_01 = 6, |
|
- | 512 | PUNIT_POWER_WELL_DPIO_TX_B_LANES_23 = 7, |
|
- | 513 | PUNIT_POWER_WELL_DPIO_TX_C_LANES_01 = 8, |
|
- | 514 | PUNIT_POWER_WELL_DPIO_TX_C_LANES_23 = 9, |
|
- | 515 | PUNIT_POWER_WELL_DPIO_RX0 = 10, |
|
- | 516 | PUNIT_POWER_WELL_DPIO_RX1 = 11, |
|
- | 517 | ||
- | 518 | PUNIT_POWER_WELL_NUM, |
|
378 | #define DSPFREQGUAR_SHIFT 14 |
519 | }; |
379 | #define DSPFREQGUAR_MASK (0x3 << DSPFREQGUAR_SHIFT) |
520 | |
380 | #define PUNIT_REG_PWRGT_CTRL 0x60 |
- | |
381 | #define PUNIT_REG_PWRGT_STATUS 0x61 |
521 | #define PUNIT_REG_PWRGT_CTRL 0x60 |
382 | #define PUNIT_CLK_GATE 1 |
522 | #define PUNIT_REG_PWRGT_STATUS 0x61 |
383 | #define PUNIT_PWR_RESET 2 |
523 | #define PUNIT_PWRGT_MASK(power_well) (3 << ((power_well) * 2)) |
384 | #define PUNIT_PWR_GATE 3 |
524 | #define PUNIT_PWRGT_PWR_ON(power_well) (0 << ((power_well) * 2)) |
385 | #define RENDER_PWRGT (PUNIT_PWR_GATE << 0) |
525 | #define PUNIT_PWRGT_CLK_GATE(power_well) (1 << ((power_well) * 2)) |
Line 386... | Line 526... | ||
386 | #define MEDIA_PWRGT (PUNIT_PWR_GATE << 2) |
526 | #define PUNIT_PWRGT_RESET(power_well) (2 << ((power_well) * 2)) |
387 | #define DISP2D_PWRGT (PUNIT_PWR_GATE << 6) |
527 | #define PUNIT_PWRGT_PWR_GATE(power_well) (3 << ((power_well) * 2)) |
388 | 528 | ||
389 | #define PUNIT_REG_GPU_LFM 0xd3 |
529 | #define PUNIT_REG_GPU_LFM 0xd3 |
390 | #define PUNIT_REG_GPU_FREQ_REQ 0xd4 |
530 | #define PUNIT_REG_GPU_FREQ_REQ 0xd4 |
- | 531 | #define PUNIT_REG_GPU_FREQ_STS 0xd8 |
|
Line 391... | Line 532... | ||
391 | #define PUNIT_REG_GPU_FREQ_STS 0xd8 |
532 | #define GENFREQSTATUS (1<<0) |
392 | #define GENFREQSTATUS (1<<0) |
533 | #define PUNIT_REG_MEDIA_TURBO_FREQ_REQ 0xdc |
Line -... | Line 534... | ||
- | 534 | #define PUNIT_REG_CZ_TIMESTAMP 0xce |
|
- | 535 | ||
- | 536 | #define PUNIT_FUSE_BUS2 0xf6 /* bits 47:40 */ |
|
- | 537 | #define PUNIT_FUSE_BUS1 0xf5 /* bits 55:48 */ |
|
- | 538 | ||
- | 539 | #define PUNIT_GPU_STATUS_REG 0xdb |
|
- | 540 | #define PUNIT_GPU_STATUS_MAX_FREQ_SHIFT 16 |
|
- | 541 | #define PUNIT_GPU_STATUS_MAX_FREQ_MASK 0xff |
|
- | 542 | #define PUNIT_GPU_STATIS_GFX_MIN_FREQ_SHIFT 8 |
|
- | 543 | #define PUNIT_GPU_STATUS_GFX_MIN_FREQ_MASK 0xff |
|
393 | #define PUNIT_REG_MEDIA_TURBO_FREQ_REQ 0xdc |
544 | |
394 | 545 | #define PUNIT_GPU_DUTYCYCLE_REG 0xdf |
|
395 | #define PUNIT_FUSE_BUS2 0xf6 /* bits 47:40 */ |
546 | #define PUNIT_GPU_DUTYCYCLE_RPE_FREQ_SHIFT 8 |
396 | #define PUNIT_FUSE_BUS1 0xf5 /* bits 55:48 */ |
547 | #define PUNIT_GPU_DUTYCYCLE_RPE_FREQ_MASK 0xff |
397 | 548 | ||
Line 404... | Line 555... | ||
404 | #define FB_FMAX_VMIN_FREQ_HI_MASK 0x00000007 |
555 | #define FB_FMAX_VMIN_FREQ_HI_MASK 0x00000007 |
405 | #define IOSF_NC_FB_GFX_FMAX_FUSE_LO 0x30 |
556 | #define IOSF_NC_FB_GFX_FMAX_FUSE_LO 0x30 |
406 | #define FB_FMAX_VMIN_FREQ_LO_SHIFT 27 |
557 | #define FB_FMAX_VMIN_FREQ_LO_SHIFT 27 |
407 | #define FB_FMAX_VMIN_FREQ_LO_MASK 0xf8000000 |
558 | #define FB_FMAX_VMIN_FREQ_LO_MASK 0xf8000000 |
Line -... | Line 559... | ||
- | 559 | ||
- | 560 | #define VLV_CZ_CLOCK_TO_MILLI_SEC 100000 |
|
- | 561 | #define VLV_RP_UP_EI_THRESHOLD 90 |
|
- | 562 | #define VLV_RP_DOWN_EI_THRESHOLD 70 |
|
- | 563 | #define VLV_INT_COUNT_FOR_DOWN_EI 5 |
|
408 | 564 | ||
409 | /* vlv2 north clock has */ |
565 | /* vlv2 north clock has */ |
410 | #define CCK_FUSE_REG 0x8 |
566 | #define CCK_FUSE_REG 0x8 |
411 | #define CCK_FUSE_HPLL_FREQ_MASK 0x3 |
567 | #define CCK_FUSE_HPLL_FREQ_MASK 0x3 |
412 | #define CCK_REG_DSI_PLL_FUSE 0x44 |
568 | #define CCK_REG_DSI_PLL_FUSE 0x44 |
Line 438... | Line 594... | ||
438 | #define DSI_PLL_N1_DIV_SHIFT 16 |
594 | #define DSI_PLL_N1_DIV_SHIFT 16 |
439 | #define DSI_PLL_N1_DIV_MASK (3 << 16) |
595 | #define DSI_PLL_N1_DIV_MASK (3 << 16) |
440 | #define DSI_PLL_M1_DIV_SHIFT 0 |
596 | #define DSI_PLL_M1_DIV_SHIFT 0 |
441 | #define DSI_PLL_M1_DIV_MASK (0x1ff << 0) |
597 | #define DSI_PLL_M1_DIV_MASK (0x1ff << 0) |
442 | #define CCK_DISPLAY_CLOCK_CONTROL 0x6b |
598 | #define CCK_DISPLAY_CLOCK_CONTROL 0x6b |
- | 599 | #define DISPLAY_TRUNK_FORCE_ON (1 << 17) |
|
- | 600 | #define DISPLAY_TRUNK_FORCE_OFF (1 << 16) |
|
- | 601 | #define DISPLAY_FREQUENCY_STATUS (0x1f << 8) |
|
- | 602 | #define DISPLAY_FREQUENCY_STATUS_SHIFT 8 |
|
- | 603 | #define DISPLAY_FREQUENCY_VALUES (0x1f << 0) |
|
Line 443... | Line 604... | ||
443 | 604 | ||
- | 605 | /** |
|
- | 606 | * DOC: DPIO |
|
- | 607 | * |
|
- | 608 | * VLV and CHV have slightly peculiar display PHYs for driving DP/HDMI |
|
- | 609 | * ports. DPIO is the name given to such a display PHY. These PHYs |
|
- | 610 | * don't follow the standard programming model using direct MMIO |
|
- | 611 | * registers, and instead their registers must be accessed trough IOSF |
|
444 | /* |
612 | * sideband. VLV has one such PHY for driving ports B and C, and CHV |
- | 613 | * adds another PHY for driving port D. Each PHY responds to specific |
|
- | 614 | * IOSF-SB port. |
|
- | 615 | * |
|
- | 616 | * Each display PHY is made up of one or two channels. Each channel |
|
- | 617 | * houses a common lane part which contains the PLL and other common |
|
- | 618 | * logic. CH0 common lane also contains the IOSF-SB logic for the |
|
- | 619 | * Common Register Interface (CRI) ie. the DPIO registers. CRI clock |
|
- | 620 | * must be running when any DPIO registers are accessed. |
|
- | 621 | * |
|
- | 622 | * In addition to having their own registers, the PHYs are also |
|
- | 623 | * controlled through some dedicated signals from the display |
|
- | 624 | * controller. These include PLL reference clock enable, PLL enable, |
|
- | 625 | * and CRI clock selection, for example. |
|
- | 626 | * |
|
- | 627 | * Eeach channel also has two splines (also called data lanes), and |
|
- | 628 | * each spline is made up of one Physical Access Coding Sub-Layer |
|
- | 629 | * (PCS) block and two TX lanes. So each channel has two PCS blocks |
|
- | 630 | * and four TX lanes. The TX lanes are used as DP lanes or TMDS |
|
- | 631 | * data/clock pairs depending on the output type. |
|
- | 632 | * |
|
- | 633 | * Additionally the PHY also contains an AUX lane with AUX blocks |
|
- | 634 | * for each channel. This is used for DP AUX communication, but |
|
- | 635 | * this fact isn't really relevant for the driver since AUX is |
|
- | 636 | * controlled from the display controller side. No DPIO registers |
|
- | 637 | * need to be accessed during AUX communication, |
|
- | 638 | * |
|
- | 639 | * Generally the common lane corresponds to the pipe and |
|
- | 640 | * the spline (PCS/TX) correponds to the port. |
|
- | 641 | * |
|
- | 642 | * For dual channel PHY (VLV/CHV): |
|
- | 643 | * |
|
- | 644 | * pipe A == CMN/PLL/REF CH0 |
|
- | 645 | * |
|
- | 646 | * pipe B == CMN/PLL/REF CH1 |
|
- | 647 | * |
|
- | 648 | * port B == PCS/TX CH0 |
|
- | 649 | * |
|
- | 650 | * port C == PCS/TX CH1 |
|
- | 651 | * |
|
- | 652 | * This is especially important when we cross the streams |
|
- | 653 | * ie. drive port B with pipe B, or port C with pipe A. |
|
- | 654 | * |
|
445 | * DPIO - a special bus for various display related registers to hide behind |
655 | * For single channel PHY (CHV): |
446 | * |
656 | * |
447 | * DPIO is VLV only. |
657 | * pipe C == CMN/PLL/REF CH0 |
- | 658 | * |
|
- | 659 | * port D == PCS/TX CH0 |
|
448 | * |
660 | * |
- | 661 | * Note: digital port B is DDI0, digital port C is DDI1, |
|
- | 662 | * digital port D is DDI2 |
|
- | 663 | */ |
|
- | 664 | /* |
|
- | 665 | * Dual channel PHY (VLV/CHV) |
|
- | 666 | * --------------------------------- |
|
- | 667 | * | CH0 | CH1 | |
|
- | 668 | * | CMN/PLL/REF | CMN/PLL/REF | |
|
- | 669 | * |---------------|---------------| Display PHY |
|
- | 670 | * | PCS01 | PCS23 | PCS01 | PCS23 | |
|
- | 671 | * |-------|-------|-------|-------| |
|
- | 672 | * |TX0|TX1|TX2|TX3|TX0|TX1|TX2|TX3| |
|
- | 673 | * --------------------------------- |
|
- | 674 | * | DDI0 | DDI1 | DP/HDMI ports |
|
- | 675 | * --------------------------------- |
|
- | 676 | * |
|
- | 677 | * Single channel PHY (CHV) |
|
- | 678 | * ----------------- |
|
- | 679 | * | CH0 | |
|
- | 680 | * | CMN/PLL/REF | |
|
- | 681 | * |---------------| Display PHY |
|
- | 682 | * | PCS01 | PCS23 | |
|
- | 683 | * |-------|-------| |
|
- | 684 | * |TX0|TX1|TX2|TX3| |
|
- | 685 | * ----------------- |
|
- | 686 | * | DDI2 | DP/HDMI port |
|
449 | * Note: digital port B is DDI0, digital pot C is DDI1 |
687 | * ----------------- |
450 | */ |
688 | */ |
451 | #define DPIO_DEVFN 0 |
- | |
452 | #define DPIO_OPCODE_REG_WRITE 1 |
- | |
Line 453... | Line 689... | ||
453 | #define DPIO_OPCODE_REG_READ 0 |
689 | #define DPIO_DEVFN 0 |
454 | 690 | ||
455 | #define DPIO_CTL (VLV_DISPLAY_BASE + 0x2110) |
691 | #define DPIO_CTL (VLV_DISPLAY_BASE + 0x2110) |
456 | #define DPIO_MODSEL1 (1<<3) /* if ref clk b == 27 */ |
692 | #define DPIO_MODSEL1 (1<<3) /* if ref clk b == 27 */ |
Line 525... | Line 761... | ||
525 | #define _VLV_PCS_DW0_CH1 0x8400 |
761 | #define _VLV_PCS_DW0_CH1 0x8400 |
526 | #define DPIO_PCS_TX_LANE2_RESET (1<<16) |
762 | #define DPIO_PCS_TX_LANE2_RESET (1<<16) |
527 | #define DPIO_PCS_TX_LANE1_RESET (1<<7) |
763 | #define DPIO_PCS_TX_LANE1_RESET (1<<7) |
528 | #define VLV_PCS_DW0(ch) _PORT(ch, _VLV_PCS_DW0_CH0, _VLV_PCS_DW0_CH1) |
764 | #define VLV_PCS_DW0(ch) _PORT(ch, _VLV_PCS_DW0_CH0, _VLV_PCS_DW0_CH1) |
Line -... | Line 765... | ||
- | 765 | ||
- | 766 | #define _VLV_PCS01_DW0_CH0 0x200 |
|
- | 767 | #define _VLV_PCS23_DW0_CH0 0x400 |
|
- | 768 | #define _VLV_PCS01_DW0_CH1 0x2600 |
|
- | 769 | #define _VLV_PCS23_DW0_CH1 0x2800 |
|
- | 770 | #define VLV_PCS01_DW0(ch) _PORT(ch, _VLV_PCS01_DW0_CH0, _VLV_PCS01_DW0_CH1) |
|
- | 771 | #define VLV_PCS23_DW0(ch) _PORT(ch, _VLV_PCS23_DW0_CH0, _VLV_PCS23_DW0_CH1) |
|
529 | 772 | ||
530 | #define _VLV_PCS_DW1_CH0 0x8204 |
773 | #define _VLV_PCS_DW1_CH0 0x8204 |
- | 774 | #define _VLV_PCS_DW1_CH1 0x8404 |
|
531 | #define _VLV_PCS_DW1_CH1 0x8404 |
775 | #define CHV_PCS_REQ_SOFTRESET_EN (1<<23) |
532 | #define DPIO_PCS_CLK_CRI_RXEB_EIOS_EN (1<<22) |
776 | #define DPIO_PCS_CLK_CRI_RXEB_EIOS_EN (1<<22) |
533 | #define DPIO_PCS_CLK_CRI_RXDIGFILTSG_EN (1<<21) |
777 | #define DPIO_PCS_CLK_CRI_RXDIGFILTSG_EN (1<<21) |
534 | #define DPIO_PCS_CLK_DATAWIDTH_SHIFT (6) |
778 | #define DPIO_PCS_CLK_DATAWIDTH_SHIFT (6) |
535 | #define DPIO_PCS_CLK_SOFT_RESET (1<<5) |
779 | #define DPIO_PCS_CLK_SOFT_RESET (1<<5) |
Line -... | Line 780... | ||
- | 780 | #define VLV_PCS_DW1(ch) _PORT(ch, _VLV_PCS_DW1_CH0, _VLV_PCS_DW1_CH1) |
|
- | 781 | ||
- | 782 | #define _VLV_PCS01_DW1_CH0 0x204 |
|
- | 783 | #define _VLV_PCS23_DW1_CH0 0x404 |
|
- | 784 | #define _VLV_PCS01_DW1_CH1 0x2604 |
|
- | 785 | #define _VLV_PCS23_DW1_CH1 0x2804 |
|
- | 786 | #define VLV_PCS01_DW1(ch) _PORT(ch, _VLV_PCS01_DW1_CH0, _VLV_PCS01_DW1_CH1) |
|
536 | #define VLV_PCS_DW1(ch) _PORT(ch, _VLV_PCS_DW1_CH0, _VLV_PCS_DW1_CH1) |
787 | #define VLV_PCS23_DW1(ch) _PORT(ch, _VLV_PCS23_DW1_CH0, _VLV_PCS23_DW1_CH1) |
537 | 788 | ||
- | 789 | #define _VLV_PCS_DW8_CH0 0x8220 |
|
- | 790 | #define _VLV_PCS_DW8_CH1 0x8420 |
|
538 | #define _VLV_PCS_DW8_CH0 0x8220 |
791 | #define CHV_PCS_USEDCLKCHANNEL_OVRRIDE (1 << 20) |
Line 539... | Line 792... | ||
539 | #define _VLV_PCS_DW8_CH1 0x8420 |
792 | #define CHV_PCS_USEDCLKCHANNEL (1 << 21) |
540 | #define VLV_PCS_DW8(ch) _PORT(ch, _VLV_PCS_DW8_CH0, _VLV_PCS_DW8_CH1) |
793 | #define VLV_PCS_DW8(ch) _PORT(ch, _VLV_PCS_DW8_CH0, _VLV_PCS_DW8_CH1) |
541 | 794 | ||
Line 548... | Line 801... | ||
548 | 801 | ||
549 | #define _VLV_PCS_DW9_CH0 0x8224 |
802 | #define _VLV_PCS_DW9_CH0 0x8224 |
550 | #define _VLV_PCS_DW9_CH1 0x8424 |
803 | #define _VLV_PCS_DW9_CH1 0x8424 |
Line -... | Line 804... | ||
- | 804 | #define VLV_PCS_DW9(ch) _PORT(ch, _VLV_PCS_DW9_CH0, _VLV_PCS_DW9_CH1) |
|
- | 805 | ||
- | 806 | #define _CHV_PCS_DW10_CH0 0x8228 |
|
- | 807 | #define _CHV_PCS_DW10_CH1 0x8428 |
|
- | 808 | #define DPIO_PCS_SWING_CALC_TX0_TX2 (1<<30) |
|
- | 809 | #define DPIO_PCS_SWING_CALC_TX1_TX3 (1<<31) |
|
- | 810 | #define CHV_PCS_DW10(ch) _PORT(ch, _CHV_PCS_DW10_CH0, _CHV_PCS_DW10_CH1) |
|
- | 811 | ||
- | 812 | #define _VLV_PCS01_DW10_CH0 0x0228 |
|
- | 813 | #define _VLV_PCS23_DW10_CH0 0x0428 |
|
- | 814 | #define _VLV_PCS01_DW10_CH1 0x2628 |
|
- | 815 | #define _VLV_PCS23_DW10_CH1 0x2828 |
|
- | 816 | #define VLV_PCS01_DW10(port) _PORT(port, _VLV_PCS01_DW10_CH0, _VLV_PCS01_DW10_CH1) |
|
551 | #define VLV_PCS_DW9(ch) _PORT(ch, _VLV_PCS_DW9_CH0, _VLV_PCS_DW9_CH1) |
817 | #define VLV_PCS23_DW10(port) _PORT(port, _VLV_PCS23_DW10_CH0, _VLV_PCS23_DW10_CH1) |
552 | 818 | ||
553 | #define _VLV_PCS_DW11_CH0 0x822c |
819 | #define _VLV_PCS_DW11_CH0 0x822c |
Line 554... | Line 820... | ||
554 | #define _VLV_PCS_DW11_CH1 0x842c |
820 | #define _VLV_PCS_DW11_CH1 0x842c |
Line 566... | Line 832... | ||
566 | #define _VLV_PCS_DW23_CH1 0x845c |
832 | #define _VLV_PCS_DW23_CH1 0x845c |
567 | #define VLV_PCS_DW23(ch) _PORT(ch, _VLV_PCS_DW23_CH0, _VLV_PCS_DW23_CH1) |
833 | #define VLV_PCS_DW23(ch) _PORT(ch, _VLV_PCS_DW23_CH0, _VLV_PCS_DW23_CH1) |
Line 568... | Line 834... | ||
568 | 834 | ||
569 | #define _VLV_TX_DW2_CH0 0x8288 |
835 | #define _VLV_TX_DW2_CH0 0x8288 |
- | 836 | #define _VLV_TX_DW2_CH1 0x8488 |
|
- | 837 | #define DPIO_SWING_MARGIN_SHIFT 16 |
|
- | 838 | #define DPIO_SWING_MARGIN_MASK (0xff << DPIO_SWING_MARGIN_SHIFT) |
|
570 | #define _VLV_TX_DW2_CH1 0x8488 |
839 | #define DPIO_UNIQ_TRANS_SCALE_SHIFT 8 |
Line 571... | Line 840... | ||
571 | #define VLV_TX_DW2(ch) _PORT(ch, _VLV_TX_DW2_CH0, _VLV_TX_DW2_CH1) |
840 | #define VLV_TX_DW2(ch) _PORT(ch, _VLV_TX_DW2_CH0, _VLV_TX_DW2_CH1) |
572 | 841 | ||
- | 842 | #define _VLV_TX_DW3_CH0 0x828c |
|
- | 843 | #define _VLV_TX_DW3_CH1 0x848c |
|
573 | #define _VLV_TX_DW3_CH0 0x828c |
844 | /* The following bit for CHV phy */ |
Line 574... | Line 845... | ||
574 | #define _VLV_TX_DW3_CH1 0x848c |
845 | #define DPIO_TX_UNIQ_TRANS_SCALE_EN (1<<27) |
575 | #define VLV_TX_DW3(ch) _PORT(ch, _VLV_TX_DW3_CH0, _VLV_TX_DW3_CH1) |
846 | #define VLV_TX_DW3(ch) _PORT(ch, _VLV_TX_DW3_CH0, _VLV_TX_DW3_CH1) |
- | 847 | ||
- | 848 | #define _VLV_TX_DW4_CH0 0x8290 |
|
576 | 849 | #define _VLV_TX_DW4_CH1 0x8490 |
|
Line 577... | Line 850... | ||
577 | #define _VLV_TX_DW4_CH0 0x8290 |
850 | #define DPIO_SWING_DEEMPH9P5_SHIFT 24 |
578 | #define _VLV_TX_DW4_CH1 0x8490 |
851 | #define DPIO_SWING_DEEMPH9P5_MASK (0xff << DPIO_SWING_DEEMPH9P5_SHIFT) |
579 | #define VLV_TX_DW4(ch) _PORT(ch, _VLV_TX_DW4_CH0, _VLV_TX_DW4_CH1) |
852 | #define VLV_TX_DW4(ch) _PORT(ch, _VLV_TX_DW4_CH0, _VLV_TX_DW4_CH1) |
Line 593... | Line 866... | ||
593 | 866 | ||
594 | #define _VLV_TX_DW14_CH0 0x82b8 |
867 | #define _VLV_TX_DW14_CH0 0x82b8 |
595 | #define _VLV_TX_DW14_CH1 0x84b8 |
868 | #define _VLV_TX_DW14_CH1 0x84b8 |
Line -... | Line 869... | ||
- | 869 | #define VLV_TX_DW14(ch) _PORT(ch, _VLV_TX_DW14_CH0, _VLV_TX_DW14_CH1) |
|
- | 870 | ||
- | 871 | /* CHV dpPhy registers */ |
|
- | 872 | #define _CHV_PLL_DW0_CH0 0x8000 |
|
- | 873 | #define _CHV_PLL_DW0_CH1 0x8180 |
|
- | 874 | #define CHV_PLL_DW0(ch) _PIPE(ch, _CHV_PLL_DW0_CH0, _CHV_PLL_DW0_CH1) |
|
- | 875 | ||
- | 876 | #define _CHV_PLL_DW1_CH0 0x8004 |
|
- | 877 | #define _CHV_PLL_DW1_CH1 0x8184 |
|
- | 878 | #define DPIO_CHV_N_DIV_SHIFT 8 |
|
- | 879 | #define DPIO_CHV_M1_DIV_BY_2 (0 << 0) |
|
- | 880 | #define CHV_PLL_DW1(ch) _PIPE(ch, _CHV_PLL_DW1_CH0, _CHV_PLL_DW1_CH1) |
|
- | 881 | ||
- | 882 | #define _CHV_PLL_DW2_CH0 0x8008 |
|
- | 883 | #define _CHV_PLL_DW2_CH1 0x8188 |
|
- | 884 | #define CHV_PLL_DW2(ch) _PIPE(ch, _CHV_PLL_DW2_CH0, _CHV_PLL_DW2_CH1) |
|
- | 885 | ||
- | 886 | #define _CHV_PLL_DW3_CH0 0x800c |
|
- | 887 | #define _CHV_PLL_DW3_CH1 0x818c |
|
- | 888 | #define DPIO_CHV_FRAC_DIV_EN (1 << 16) |
|
- | 889 | #define DPIO_CHV_FIRST_MOD (0 << 8) |
|
- | 890 | #define DPIO_CHV_SECOND_MOD (1 << 8) |
|
- | 891 | #define DPIO_CHV_FEEDFWD_GAIN_SHIFT 0 |
|
- | 892 | #define CHV_PLL_DW3(ch) _PIPE(ch, _CHV_PLL_DW3_CH0, _CHV_PLL_DW3_CH1) |
|
- | 893 | ||
- | 894 | #define _CHV_PLL_DW6_CH0 0x8018 |
|
- | 895 | #define _CHV_PLL_DW6_CH1 0x8198 |
|
- | 896 | #define DPIO_CHV_GAIN_CTRL_SHIFT 16 |
|
- | 897 | #define DPIO_CHV_INT_COEFF_SHIFT 8 |
|
- | 898 | #define DPIO_CHV_PROP_COEFF_SHIFT 0 |
|
- | 899 | #define CHV_PLL_DW6(ch) _PIPE(ch, _CHV_PLL_DW6_CH0, _CHV_PLL_DW6_CH1) |
|
- | 900 | ||
- | 901 | #define _CHV_CMN_DW5_CH0 0x8114 |
|
- | 902 | #define CHV_BUFRIGHTENA1_DISABLE (0 << 20) |
|
- | 903 | #define CHV_BUFRIGHTENA1_NORMAL (1 << 20) |
|
- | 904 | #define CHV_BUFRIGHTENA1_FORCE (3 << 20) |
|
- | 905 | #define CHV_BUFRIGHTENA1_MASK (3 << 20) |
|
- | 906 | #define CHV_BUFLEFTENA1_DISABLE (0 << 22) |
|
- | 907 | #define CHV_BUFLEFTENA1_NORMAL (1 << 22) |
|
- | 908 | #define CHV_BUFLEFTENA1_FORCE (3 << 22) |
|
- | 909 | #define CHV_BUFLEFTENA1_MASK (3 << 22) |
|
- | 910 | ||
- | 911 | #define _CHV_CMN_DW13_CH0 0x8134 |
|
- | 912 | #define _CHV_CMN_DW0_CH1 0x8080 |
|
- | 913 | #define DPIO_CHV_S1_DIV_SHIFT 21 |
|
- | 914 | #define DPIO_CHV_P1_DIV_SHIFT 13 /* 3 bits */ |
|
- | 915 | #define DPIO_CHV_P2_DIV_SHIFT 8 /* 5 bits */ |
|
- | 916 | #define DPIO_CHV_K_DIV_SHIFT 4 |
|
- | 917 | #define DPIO_PLL_FREQLOCK (1 << 1) |
|
- | 918 | #define DPIO_PLL_LOCK (1 << 0) |
|
- | 919 | #define CHV_CMN_DW13(ch) _PIPE(ch, _CHV_CMN_DW13_CH0, _CHV_CMN_DW0_CH1) |
|
- | 920 | ||
- | 921 | #define _CHV_CMN_DW14_CH0 0x8138 |
|
- | 922 | #define _CHV_CMN_DW1_CH1 0x8084 |
|
- | 923 | #define DPIO_AFC_RECAL (1 << 14) |
|
- | 924 | #define DPIO_DCLKP_EN (1 << 13) |
|
- | 925 | #define CHV_BUFLEFTENA2_DISABLE (0 << 17) /* CL2 DW1 only */ |
|
- | 926 | #define CHV_BUFLEFTENA2_NORMAL (1 << 17) /* CL2 DW1 only */ |
|
- | 927 | #define CHV_BUFLEFTENA2_FORCE (3 << 17) /* CL2 DW1 only */ |
|
- | 928 | #define CHV_BUFLEFTENA2_MASK (3 << 17) /* CL2 DW1 only */ |
|
- | 929 | #define CHV_BUFRIGHTENA2_DISABLE (0 << 19) /* CL2 DW1 only */ |
|
- | 930 | #define CHV_BUFRIGHTENA2_NORMAL (1 << 19) /* CL2 DW1 only */ |
|
- | 931 | #define CHV_BUFRIGHTENA2_FORCE (3 << 19) /* CL2 DW1 only */ |
|
- | 932 | #define CHV_BUFRIGHTENA2_MASK (3 << 19) /* CL2 DW1 only */ |
|
- | 933 | #define CHV_CMN_DW14(ch) _PIPE(ch, _CHV_CMN_DW14_CH0, _CHV_CMN_DW1_CH1) |
|
- | 934 | ||
- | 935 | #define _CHV_CMN_DW19_CH0 0x814c |
|
- | 936 | #define _CHV_CMN_DW6_CH1 0x8098 |
|
- | 937 | #define CHV_CMN_USEDCLKCHANNEL (1 << 13) |
|
- | 938 | #define CHV_CMN_DW19(ch) _PIPE(ch, _CHV_CMN_DW19_CH0, _CHV_CMN_DW6_CH1) |
|
- | 939 | ||
- | 940 | #define CHV_CMN_DW30 0x8178 |
|
- | 941 | #define DPIO_LRC_BYPASS (1 << 3) |
|
- | 942 | ||
- | 943 | #define _TXLANE(ch, lane, offset) ((ch ? 0x2400 : 0) + \ |
|
- | 944 | (lane) * 0x200 + (offset)) |
|
- | 945 | ||
- | 946 | #define CHV_TX_DW0(ch, lane) _TXLANE(ch, lane, 0x80) |
|
- | 947 | #define CHV_TX_DW1(ch, lane) _TXLANE(ch, lane, 0x84) |
|
- | 948 | #define CHV_TX_DW2(ch, lane) _TXLANE(ch, lane, 0x88) |
|
- | 949 | #define CHV_TX_DW3(ch, lane) _TXLANE(ch, lane, 0x8c) |
|
- | 950 | #define CHV_TX_DW4(ch, lane) _TXLANE(ch, lane, 0x90) |
|
- | 951 | #define CHV_TX_DW5(ch, lane) _TXLANE(ch, lane, 0x94) |
|
- | 952 | #define CHV_TX_DW6(ch, lane) _TXLANE(ch, lane, 0x98) |
|
- | 953 | #define CHV_TX_DW7(ch, lane) _TXLANE(ch, lane, 0x9c) |
|
- | 954 | #define CHV_TX_DW8(ch, lane) _TXLANE(ch, lane, 0xa0) |
|
- | 955 | #define CHV_TX_DW9(ch, lane) _TXLANE(ch, lane, 0xa4) |
|
- | 956 | #define CHV_TX_DW10(ch, lane) _TXLANE(ch, lane, 0xa8) |
|
- | 957 | #define CHV_TX_DW11(ch, lane) _TXLANE(ch, lane, 0xac) |
|
- | 958 | #define DPIO_FRC_LATENCY_SHFIT 8 |
|
596 | #define VLV_TX_DW14(ch) _PORT(ch, _VLV_TX_DW14_CH0, _VLV_TX_DW14_CH1) |
959 | #define CHV_TX_DW14(ch, lane) _TXLANE(ch, lane, 0xb8) |
597 | 960 | #define DPIO_UPAR_SHIFT 30 |
|
598 | /* |
961 | /* |
599 | * Fence registers |
962 | * Fence registers |
600 | */ |
963 | */ |
Line 620... | Line 983... | ||
620 | 983 | ||
621 | #define FENCE_REG_SANDYBRIDGE_0 0x100000 |
984 | #define FENCE_REG_SANDYBRIDGE_0 0x100000 |
622 | #define SANDYBRIDGE_FENCE_PITCH_SHIFT 32 |
985 | #define SANDYBRIDGE_FENCE_PITCH_SHIFT 32 |
Line -... | Line 986... | ||
- | 986 | #define GEN7_FENCE_MAX_PITCH_VAL 0x0800 |
|
623 | #define GEN7_FENCE_MAX_PITCH_VAL 0x0800 |
987 | |
624 | 988 | ||
625 | /* control register for cpu gtt access */ |
989 | /* control register for cpu gtt access */ |
626 | #define TILECTL 0x101000 |
990 | #define TILECTL 0x101000 |
627 | #define TILECTL_SWZCTL (1 << 0) |
991 | #define TILECTL_SWZCTL (1 << 0) |
Line 628... | Line 992... | ||
628 | #define TILECTL_TLB_PREFETCH_DIS (1 << 2) |
992 | #define TILECTL_TLB_PREFETCH_DIS (1 << 2) |
629 | #define TILECTL_BACKSNOOP_DIS (1 << 3) |
993 | #define TILECTL_BACKSNOOP_DIS (1 << 3) |
630 | 994 | ||
- | 995 | /* |
|
- | 996 | * Instruction and interrupt control regs |
|
- | 997 | */ |
|
631 | /* |
998 | #define PGTBL_CTL 0x02020 |
632 | * Instruction and interrupt control regs |
999 | #define PGTBL_ADDRESS_LO_MASK 0xfffff000 /* bits [31:12] */ |
633 | */ |
1000 | #define PGTBL_ADDRESS_HI_MASK 0x000000f0 /* bits [35:32] (gen4) */ |
634 | #define PGTBL_ER 0x02024 |
1001 | #define PGTBL_ER 0x02024 |
- | 1002 | #define RENDER_RING_BASE 0x02000 |
|
635 | #define RENDER_RING_BASE 0x02000 |
1003 | #define BSD_RING_BASE 0x04000 |
636 | #define BSD_RING_BASE 0x04000 |
1004 | #define GEN6_BSD_RING_BASE 0x12000 |
637 | #define GEN6_BSD_RING_BASE 0x12000 |
1005 | #define GEN8_BSD2_RING_BASE 0x1c000 |
638 | #define VEBOX_RING_BASE 0x1a000 |
1006 | #define VEBOX_RING_BASE 0x1a000 |
639 | #define BLT_RING_BASE 0x22000 |
1007 | #define BLT_RING_BASE 0x22000 |
Line 658... | Line 1026... | ||
658 | #define GEN6_VEVSYNC (RING_SYNC_2(VEBOX_RING_BASE)) |
1026 | #define GEN6_VEVSYNC (RING_SYNC_2(VEBOX_RING_BASE)) |
659 | #define GEN6_NOSYNC 0 |
1027 | #define GEN6_NOSYNC 0 |
660 | #define RING_MAX_IDLE(base) ((base)+0x54) |
1028 | #define RING_MAX_IDLE(base) ((base)+0x54) |
661 | #define RING_HWS_PGA(base) ((base)+0x80) |
1029 | #define RING_HWS_PGA(base) ((base)+0x80) |
662 | #define RING_HWS_PGA_GEN6(base) ((base)+0x2080) |
1030 | #define RING_HWS_PGA_GEN6(base) ((base)+0x2080) |
- | 1031 | ||
- | 1032 | #define GEN7_WR_WATERMARK 0x4028 |
|
- | 1033 | #define GEN7_GFX_PRIO_CTRL 0x402C |
|
663 | #define ARB_MODE 0x04030 |
1034 | #define ARB_MODE 0x4030 |
664 | #define ARB_MODE_SWIZZLE_SNB (1<<4) |
1035 | #define ARB_MODE_SWIZZLE_SNB (1<<4) |
665 | #define ARB_MODE_SWIZZLE_IVB (1<<5) |
1036 | #define ARB_MODE_SWIZZLE_IVB (1<<5) |
- | 1037 | #define GEN7_GFX_PEND_TLB0 0x4034 |
|
- | 1038 | #define GEN7_GFX_PEND_TLB1 0x4038 |
|
- | 1039 | /* L3, CVS, ZTLB, RCC, CASC LRA min, max values */ |
|
- | 1040 | #define GEN7_LRA_LIMITS_BASE 0x403C |
|
- | 1041 | #define GEN7_LRA_LIMITS_REG_NUM 13 |
|
- | 1042 | #define GEN7_MEDIA_MAX_REQ_COUNT 0x4070 |
|
- | 1043 | #define GEN7_GFX_MAX_REQ_COUNT 0x4074 |
|
- | 1044 | ||
666 | #define GAMTARBMODE 0x04a08 |
1045 | #define GAMTARBMODE 0x04a08 |
667 | #define ARB_MODE_BWGTLB_DISABLE (1<<9) |
1046 | #define ARB_MODE_BWGTLB_DISABLE (1<<9) |
668 | #define ARB_MODE_SWIZZLE_BDW (1<<1) |
1047 | #define ARB_MODE_SWIZZLE_BDW (1<<1) |
669 | #define RENDER_HWS_PGA_GEN7 (0x04080) |
1048 | #define RENDER_HWS_PGA_GEN7 (0x04080) |
670 | #define RING_FAULT_REG(ring) (0x4094 + 0x100*(ring)->id) |
1049 | #define RING_FAULT_REG(ring) (0x4094 + 0x100*(ring)->id) |
Line 676... | Line 1055... | ||
676 | #define GEN8_PRIVATE_PAT 0x40e0 |
1055 | #define GEN8_PRIVATE_PAT 0x40e0 |
677 | #define BSD_HWS_PGA_GEN7 (0x04180) |
1056 | #define BSD_HWS_PGA_GEN7 (0x04180) |
678 | #define BLT_HWS_PGA_GEN7 (0x04280) |
1057 | #define BLT_HWS_PGA_GEN7 (0x04280) |
679 | #define VEBOX_HWS_PGA_GEN7 (0x04380) |
1058 | #define VEBOX_HWS_PGA_GEN7 (0x04380) |
680 | #define RING_ACTHD(base) ((base)+0x74) |
1059 | #define RING_ACTHD(base) ((base)+0x74) |
- | 1060 | #define RING_ACTHD_UDW(base) ((base)+0x5c) |
|
681 | #define RING_NOPID(base) ((base)+0x94) |
1061 | #define RING_NOPID(base) ((base)+0x94) |
682 | #define RING_IMR(base) ((base)+0xa8) |
1062 | #define RING_IMR(base) ((base)+0xa8) |
683 | #define RING_TIMESTAMP(base) ((base)+0x358) |
1063 | #define RING_TIMESTAMP(base) ((base)+0x358) |
684 | #define TAIL_ADDR 0x001FFFF8 |
1064 | #define TAIL_ADDR 0x001FFFF8 |
685 | #define HEAD_WRAP_COUNT 0xFFE00000 |
1065 | #define HEAD_WRAP_COUNT 0xFFE00000 |
Line 694... | Line 1074... | ||
694 | #define RING_VALID 0x00000001 |
1074 | #define RING_VALID 0x00000001 |
695 | #define RING_INVALID 0x00000000 |
1075 | #define RING_INVALID 0x00000000 |
696 | #define RING_WAIT_I8XX (1<<0) /* gen2, PRBx_HEAD */ |
1076 | #define RING_WAIT_I8XX (1<<0) /* gen2, PRBx_HEAD */ |
697 | #define RING_WAIT (1<<11) /* gen3+, PRBx_CTL */ |
1077 | #define RING_WAIT (1<<11) /* gen3+, PRBx_CTL */ |
698 | #define RING_WAIT_SEMAPHORE (1<<10) /* gen6+ */ |
1078 | #define RING_WAIT_SEMAPHORE (1<<10) /* gen6+ */ |
- | 1079 | ||
- | 1080 | #define GEN7_TLB_RD_ADDR 0x4700 |
|
- | 1081 | ||
699 | #if 0 |
1082 | #if 0 |
700 | #define PRB0_TAIL 0x02030 |
1083 | #define PRB0_TAIL 0x02030 |
701 | #define PRB0_HEAD 0x02034 |
1084 | #define PRB0_HEAD 0x02034 |
702 | #define PRB0_START 0x02038 |
1085 | #define PRB0_START 0x02038 |
703 | #define PRB0_CTL 0x0203c |
1086 | #define PRB0_CTL 0x0203c |
Line 717... | Line 1100... | ||
717 | #define RING_IPEIR(base) ((base)+0x64) |
1100 | #define RING_IPEIR(base) ((base)+0x64) |
718 | #define RING_IPEHR(base) ((base)+0x68) |
1101 | #define RING_IPEHR(base) ((base)+0x68) |
719 | #define RING_INSTDONE(base) ((base)+0x6c) |
1102 | #define RING_INSTDONE(base) ((base)+0x6c) |
720 | #define RING_INSTPS(base) ((base)+0x70) |
1103 | #define RING_INSTPS(base) ((base)+0x70) |
721 | #define RING_DMA_FADD(base) ((base)+0x78) |
1104 | #define RING_DMA_FADD(base) ((base)+0x78) |
- | 1105 | #define RING_DMA_FADD_UDW(base) ((base)+0x60) /* gen8+ */ |
|
722 | #define RING_INSTPM(base) ((base)+0xc0) |
1106 | #define RING_INSTPM(base) ((base)+0xc0) |
- | 1107 | #define RING_MI_MODE(base) ((base)+0x9c) |
|
723 | #define INSTPS 0x02070 /* 965+ only */ |
1108 | #define INSTPS 0x02070 /* 965+ only */ |
724 | #define INSTDONE1 0x0207c /* 965+ only */ |
1109 | #define INSTDONE1 0x0207c /* 965+ only */ |
725 | #define ACTHD_I965 0x02074 |
1110 | #define ACTHD_I965 0x02074 |
726 | #define HWS_PGA 0x02080 |
1111 | #define HWS_PGA 0x02080 |
727 | #define HWS_ADDRESS_MASK 0xfffff000 |
1112 | #define HWS_ADDRESS_MASK 0xfffff000 |
Line 787... | Line 1172... | ||
787 | */ |
1172 | */ |
788 | # define _3D_CHICKEN2_WM_READ_PIPELINED (1 << 14) |
1173 | # define _3D_CHICKEN2_WM_READ_PIPELINED (1 << 14) |
789 | #define _3D_CHICKEN3 0x02090 |
1174 | #define _3D_CHICKEN3 0x02090 |
790 | #define _3D_CHICKEN_SF_DISABLE_OBJEND_CULL (1 << 10) |
1175 | #define _3D_CHICKEN_SF_DISABLE_OBJEND_CULL (1 << 10) |
791 | #define _3D_CHICKEN3_SF_DISABLE_FASTCLIP_CULL (1 << 5) |
1176 | #define _3D_CHICKEN3_SF_DISABLE_FASTCLIP_CULL (1 << 5) |
792 | #define _3D_CHICKEN_SDE_LIMIT_FIFO_POLY_DEPTH(x) ((x)<<1) |
1177 | #define _3D_CHICKEN_SDE_LIMIT_FIFO_POLY_DEPTH(x) ((x)<<1) /* gen8+ */ |
- | 1178 | #define _3D_CHICKEN3_SF_DISABLE_PIPELINED_ATTR_FETCH (1 << 1) /* gen6 */ |
|
Line 793... | Line 1179... | ||
793 | 1179 | ||
794 | #define MI_MODE 0x0209c |
1180 | #define MI_MODE 0x0209c |
795 | # define VS_TIMER_DISPATCH (1 << 6) |
1181 | # define VS_TIMER_DISPATCH (1 << 6) |
796 | # define MI_FLUSH_ENABLE (1 << 12) |
1182 | # define MI_FLUSH_ENABLE (1 << 12) |
- | 1183 | # define ASYNC_FLIP_PERF_DISABLE (1 << 14) |
|
- | 1184 | # define MODE_IDLE (1 << 9) |
|
Line 797... | Line 1185... | ||
797 | # define ASYNC_FLIP_PERF_DISABLE (1 << 14) |
1185 | # define STOP_RING (1 << 8) |
798 | 1186 | ||
- | 1187 | #define GEN6_GT_MODE 0x20d0 |
|
- | 1188 | #define GEN7_GT_MODE 0x7008 |
|
- | 1189 | #define GEN6_WIZ_HASHING(hi, lo) (((hi) << 9) | ((lo) << 7)) |
|
- | 1190 | #define GEN6_WIZ_HASHING_8x8 GEN6_WIZ_HASHING(0, 0) |
|
- | 1191 | #define GEN6_WIZ_HASHING_8x4 GEN6_WIZ_HASHING(0, 1) |
|
799 | #define GEN6_GT_MODE 0x20d0 |
1192 | #define GEN6_WIZ_HASHING_16x4 GEN6_WIZ_HASHING(1, 0) |
Line 800... | Line 1193... | ||
800 | #define GEN6_GT_MODE_HI (1 << 9) |
1193 | #define GEN6_WIZ_HASHING_MASK (GEN6_WIZ_HASHING(1, 1) << 16) |
801 | #define GEN6_TD_FOUR_ROW_DISPATCH_DISABLE (1 << 5) |
1194 | #define GEN6_TD_FOUR_ROW_DISPATCH_DISABLE (1 << 5) |
802 | 1195 | ||
803 | #define GFX_MODE 0x02520 |
1196 | #define GFX_MODE 0x02520 |
804 | #define GFX_MODE_GEN7 0x0229c |
1197 | #define GFX_MODE_GEN7 0x0229c |
805 | #define RING_MODE_GEN7(ring) ((ring)->mmio_base+0x29c) |
1198 | #define RING_MODE_GEN7(ring) ((ring)->mmio_base+0x29c) |
806 | #define GFX_RUN_LIST_ENABLE (1<<15) |
1199 | #define GFX_RUN_LIST_ENABLE (1<<15) |
807 | #define GFX_TLB_INVALIDATE_ALWAYS (1<<13) |
1200 | #define GFX_TLB_INVALIDATE_EXPLICIT (1<<13) |
808 | #define GFX_SURFACE_FAULT_ENABLE (1<<12) |
1201 | #define GFX_SURFACE_FAULT_ENABLE (1<<12) |
Line 809... | Line 1202... | ||
809 | #define GFX_REPLAY_MODE (1<<11) |
1202 | #define GFX_REPLAY_MODE (1<<11) |
- | 1203 | #define GFX_PSMI_GRANULARITY (1<<10) |
|
Line -... | Line 1204... | ||
- | 1204 | #define GFX_PPGTT_ENABLE (1<<9) |
|
- | 1205 | ||
810 | #define GFX_PSMI_GRANULARITY (1<<10) |
1206 | #define VLV_DISPLAY_BASE 0x180000 |
811 | #define GFX_PPGTT_ENABLE (1<<9) |
1207 | #define VLV_MIPI_BASE VLV_DISPLAY_BASE |
812 | 1208 | ||
813 | #define VLV_DISPLAY_BASE 0x180000 |
1209 | #define VLV_GU_CTL0 (VLV_DISPLAY_BASE + 0x2030) |
814 | 1210 | #define VLV_GU_CTL1 (VLV_DISPLAY_BASE + 0x2034) |
|
815 | #define SCPD0 0x0209c /* 915+ only */ |
1211 | #define SCPD0 0x0209c /* 915+ only */ |
- | 1212 | #define IER 0x020a0 |
|
816 | #define IER 0x020a0 |
1213 | #define IIR 0x020a4 |
- | 1214 | #define IMR 0x020a8 |
|
817 | #define IIR 0x020a4 |
1215 | #define ISR 0x020ac |
818 | #define IMR 0x020a8 |
1216 | #define VLV_GUNIT_CLOCK_GATE (VLV_DISPLAY_BASE + 0x2060) |
819 | #define ISR 0x020ac |
1217 | #define GINT_DIS (1<<22) |
820 | #define VLV_GUNIT_CLOCK_GATE (VLV_DISPLAY_BASE + 0x2060) |
1218 | #define GCFG_DIS (1<<8) |
821 | #define GCFG_DIS (1<<8) |
1219 | #define VLV_GUNIT_CLOCK_GATE2 (VLV_DISPLAY_BASE + 0x2064) |
822 | #define VLV_IIR_RW (VLV_DISPLAY_BASE + 0x2084) |
1220 | #define VLV_IIR_RW (VLV_DISPLAY_BASE + 0x2084) |
- | 1221 | #define VLV_IER (VLV_DISPLAY_BASE + 0x20a0) |
|
- | 1222 | #define VLV_IIR (VLV_DISPLAY_BASE + 0x20a4) |
|
823 | #define VLV_IER (VLV_DISPLAY_BASE + 0x20a0) |
1223 | #define VLV_IMR (VLV_DISPLAY_BASE + 0x20a8) |
824 | #define VLV_IIR (VLV_DISPLAY_BASE + 0x20a4) |
1224 | #define VLV_ISR (VLV_DISPLAY_BASE + 0x20ac) |
825 | #define VLV_IMR (VLV_DISPLAY_BASE + 0x20a8) |
1225 | #define VLV_PCBR (VLV_DISPLAY_BASE + 0x2120) |
826 | #define VLV_ISR (VLV_DISPLAY_BASE + 0x20ac) |
1226 | #define VLV_PCBR_ADDR_SHIFT 12 |
827 | #define VLV_PCBR (VLV_DISPLAY_BASE + 0x2120) |
1227 | |
Line 835... | Line 1235... | ||
835 | #define GM45_ERROR_CP_PRIV (1<<3) |
1235 | #define GM45_ERROR_CP_PRIV (1<<3) |
836 | #define I915_ERROR_MEMORY_REFRESH (1<<1) |
1236 | #define I915_ERROR_MEMORY_REFRESH (1<<1) |
837 | #define I915_ERROR_INSTRUCTION (1<<0) |
1237 | #define I915_ERROR_INSTRUCTION (1<<0) |
838 | #define INSTPM 0x020c0 |
1238 | #define INSTPM 0x020c0 |
839 | #define INSTPM_SELF_EN (1<<12) /* 915GM only */ |
1239 | #define INSTPM_SELF_EN (1<<12) /* 915GM only */ |
840 | #define INSTPM_AGPBUSY_DIS (1<<11) /* gen3: when disabled, pending interrupts |
1240 | #define INSTPM_AGPBUSY_INT_EN (1<<11) /* gen3: when disabled, pending interrupts |
841 | will not assert AGPBUSY# and will only |
1241 | will not assert AGPBUSY# and will only |
842 | be delivered when out of C3. */ |
1242 | be delivered when out of C3. */ |
843 | #define INSTPM_FORCE_ORDERING (1<<7) /* GEN6+ */ |
1243 | #define INSTPM_FORCE_ORDERING (1<<7) /* GEN6+ */ |
844 | #define INSTPM_TLB_INVALIDATE (1<<9) |
1244 | #define INSTPM_TLB_INVALIDATE (1<<9) |
845 | #define INSTPM_SYNC_FLUSH (1<<5) |
1245 | #define INSTPM_SYNC_FLUSH (1<<5) |
Line 916... | Line 1316... | ||
916 | 1316 | ||
917 | /* Set display plane priority */ |
1317 | /* Set display plane priority */ |
918 | #define MI_ARB_DISPLAY_PRIORITY_A_B (0 << 0) /* display A > display B */ |
1318 | #define MI_ARB_DISPLAY_PRIORITY_A_B (0 << 0) /* display A > display B */ |
Line -... | Line 1319... | ||
- | 1319 | #define MI_ARB_DISPLAY_PRIORITY_B_A (1 << 0) /* display B > display A */ |
|
- | 1320 | ||
- | 1321 | #define MI_STATE 0x020e4 /* gen2 only */ |
|
- | 1322 | #define MI_AGPBUSY_INT_EN (1 << 1) /* 85x only */ |
|
919 | #define MI_ARB_DISPLAY_PRIORITY_B_A (1 << 0) /* display B > display A */ |
1323 | #define MI_AGPBUSY_830_MODE (1 << 0) /* 85x only */ |
920 | 1324 | ||
921 | #define CACHE_MODE_0 0x02120 /* 915+ only */ |
1325 | #define CACHE_MODE_0 0x02120 /* 915+ only */ |
922 | #define CM0_PIPELINED_RENDER_FLUSH_DISABLE (1<<8) |
1326 | #define CM0_PIPELINED_RENDER_FLUSH_DISABLE (1<<8) |
923 | #define CM0_IZ_OPT_DISABLE (1<<6) |
1327 | #define CM0_IZ_OPT_DISABLE (1<<6) |
Line 932... | Line 1336... | ||
932 | #define GFX_FLSH_CNTL_EN (1<<0) |
1336 | #define GFX_FLSH_CNTL_EN (1<<0) |
933 | #define ECOSKPD 0x021d0 |
1337 | #define ECOSKPD 0x021d0 |
934 | #define ECO_GATING_CX_ONLY (1<<3) |
1338 | #define ECO_GATING_CX_ONLY (1<<3) |
935 | #define ECO_FLIP_DONE (1<<0) |
1339 | #define ECO_FLIP_DONE (1<<0) |
Line -... | Line 1340... | ||
- | 1340 | ||
- | 1341 | #define CACHE_MODE_0_GEN7 0x7000 /* IVB+ */ |
|
- | 1342 | #define RC_OP_FLUSH_ENABLE (1<<0) |
|
936 | 1343 | #define HIZ_RAW_STALL_OPT_DISABLE (1<<2) |
|
937 | #define CACHE_MODE_1 0x7004 /* IVB+ */ |
1344 | #define CACHE_MODE_1 0x7004 /* IVB+ */ |
- | 1345 | #define PIXEL_SUBSPAN_COLLECT_OPT_DISABLE (1<<6) |
|
Line 938... | Line 1346... | ||
938 | #define PIXEL_SUBSPAN_COLLECT_OPT_DISABLE (1<<6) |
1346 | #define GEN8_4x4_STC_OPTIMIZATION_DISABLE (1<<6) |
939 | 1347 | ||
940 | #define GEN6_BLITTER_ECOSKPD 0x221d0 |
1348 | #define GEN6_BLITTER_ECOSKPD 0x221d0 |
Line -... | Line 1349... | ||
- | 1349 | #define GEN6_BLITTER_LOCK_SHIFT 16 |
|
- | 1350 | #define GEN6_BLITTER_FBC_NOTIFY (1<<3) |
|
- | 1351 | ||
- | 1352 | #define GEN6_RC_SLEEP_PSMI_CONTROL 0x2050 |
|
941 | #define GEN6_BLITTER_LOCK_SHIFT 16 |
1353 | #define GEN8_RC_SEMA_IDLE_MSG_DISABLE (1 << 12) |
942 | #define GEN6_BLITTER_FBC_NOTIFY (1<<3) |
1354 | #define GEN8_FF_DOP_CLOCK_GATE_DISABLE (1<<10) |
943 | 1355 | ||
944 | #define GEN6_BSD_SLEEP_PSMI_CONTROL 0x12050 |
1356 | #define GEN6_BSD_SLEEP_PSMI_CONTROL 0x12050 |
945 | #define GEN6_BSD_SLEEP_MSG_DISABLE (1 << 0) |
1357 | #define GEN6_BSD_SLEEP_MSG_DISABLE (1 << 0) |
Line 978... | Line 1390... | ||
978 | (GT_RENDER_L3_PARITY_ERROR_INTERRUPT | \ |
1390 | (GT_RENDER_L3_PARITY_ERROR_INTERRUPT | \ |
979 | (IS_HASWELL(dev) ? GT_RENDER_L3_PARITY_ERROR_INTERRUPT_S1 : 0)) |
1391 | (IS_HASWELL(dev) ? GT_RENDER_L3_PARITY_ERROR_INTERRUPT_S1 : 0)) |
Line 980... | Line 1392... | ||
980 | 1392 | ||
981 | /* These are all the "old" interrupts */ |
1393 | /* These are all the "old" interrupts */ |
- | 1394 | #define ILK_BSD_USER_INTERRUPT (1<<5) |
|
- | 1395 | ||
- | 1396 | #define I915_PM_INTERRUPT (1<<31) |
|
- | 1397 | #define I915_ISP_INTERRUPT (1<<22) |
|
- | 1398 | #define I915_LPE_PIPE_B_INTERRUPT (1<<21) |
|
- | 1399 | #define I915_LPE_PIPE_A_INTERRUPT (1<<20) |
|
- | 1400 | #define I915_MIPIB_INTERRUPT (1<<19) |
|
982 | #define ILK_BSD_USER_INTERRUPT (1<<5) |
1401 | #define I915_MIPIA_INTERRUPT (1<<18) |
983 | #define I915_PIPE_CONTROL_NOTIFY_INTERRUPT (1<<18) |
1402 | #define I915_PIPE_CONTROL_NOTIFY_INTERRUPT (1<<18) |
- | 1403 | #define I915_DISPLAY_PORT_INTERRUPT (1<<17) |
|
- | 1404 | #define I915_DISPLAY_PIPE_C_HBLANK_INTERRUPT (1<<16) |
|
984 | #define I915_DISPLAY_PORT_INTERRUPT (1<<17) |
1405 | #define I915_MASTER_ERROR_INTERRUPT (1<<15) |
- | 1406 | #define I915_RENDER_COMMAND_PARSER_ERROR_INTERRUPT (1<<15) |
|
985 | #define I915_RENDER_COMMAND_PARSER_ERROR_INTERRUPT (1<<15) |
1407 | #define I915_DISPLAY_PIPE_B_HBLANK_INTERRUPT (1<<14) |
- | 1408 | #define I915_GMCH_THERMAL_SENSOR_EVENT_INTERRUPT (1<<14) /* p-state */ |
|
986 | #define I915_GMCH_THERMAL_SENSOR_EVENT_INTERRUPT (1<<14) /* p-state */ |
1409 | #define I915_DISPLAY_PIPE_A_HBLANK_INTERRUPT (1<<13) |
- | 1410 | #define I915_HWB_OOM_INTERRUPT (1<<13) |
|
987 | #define I915_HWB_OOM_INTERRUPT (1<<13) |
1411 | #define I915_LPE_PIPE_C_INTERRUPT (1<<12) |
- | 1412 | #define I915_SYNC_STATUS_INTERRUPT (1<<12) |
|
988 | #define I915_SYNC_STATUS_INTERRUPT (1<<12) |
1413 | #define I915_MISC_INTERRUPT (1<<11) |
- | 1414 | #define I915_DISPLAY_PLANE_A_FLIP_PENDING_INTERRUPT (1<<11) |
|
989 | #define I915_DISPLAY_PLANE_A_FLIP_PENDING_INTERRUPT (1<<11) |
1415 | #define I915_DISPLAY_PIPE_C_VBLANK_INTERRUPT (1<<10) |
- | 1416 | #define I915_DISPLAY_PLANE_B_FLIP_PENDING_INTERRUPT (1<<10) |
|
990 | #define I915_DISPLAY_PLANE_B_FLIP_PENDING_INTERRUPT (1<<10) |
1417 | #define I915_DISPLAY_PIPE_C_EVENT_INTERRUPT (1<<9) |
- | 1418 | #define I915_OVERLAY_PLANE_FLIP_PENDING_INTERRUPT (1<<9) |
|
991 | #define I915_OVERLAY_PLANE_FLIP_PENDING_INTERRUPT (1<<9) |
1419 | #define I915_DISPLAY_PIPE_C_DPBM_INTERRUPT (1<<8) |
992 | #define I915_DISPLAY_PLANE_C_FLIP_PENDING_INTERRUPT (1<<8) |
1420 | #define I915_DISPLAY_PLANE_C_FLIP_PENDING_INTERRUPT (1<<8) |
993 | #define I915_DISPLAY_PIPE_A_VBLANK_INTERRUPT (1<<7) |
1421 | #define I915_DISPLAY_PIPE_A_VBLANK_INTERRUPT (1<<7) |
994 | #define I915_DISPLAY_PIPE_A_EVENT_INTERRUPT (1<<6) |
1422 | #define I915_DISPLAY_PIPE_A_EVENT_INTERRUPT (1<<6) |
995 | #define I915_DISPLAY_PIPE_B_VBLANK_INTERRUPT (1<<5) |
1423 | #define I915_DISPLAY_PIPE_B_VBLANK_INTERRUPT (1<<5) |
- | 1424 | #define I915_DISPLAY_PIPE_B_EVENT_INTERRUPT (1<<4) |
|
- | 1425 | #define I915_DISPLAY_PIPE_A_DPBM_INTERRUPT (1<<3) |
|
996 | #define I915_DISPLAY_PIPE_B_EVENT_INTERRUPT (1<<4) |
1426 | #define I915_DISPLAY_PIPE_B_DPBM_INTERRUPT (1<<2) |
- | 1427 | #define I915_DEBUG_INTERRUPT (1<<2) |
|
997 | #define I915_DEBUG_INTERRUPT (1<<2) |
1428 | #define I915_WINVALID_INTERRUPT (1<<1) |
998 | #define I915_USER_INTERRUPT (1<<1) |
1429 | #define I915_USER_INTERRUPT (1<<1) |
999 | #define I915_ASLE_INTERRUPT (1<<0) |
1430 | #define I915_ASLE_INTERRUPT (1<<0) |
Line 1000... | Line 1431... | ||
1000 | #define I915_BSD_USER_INTERRUPT (1 << 25) |
1431 | #define I915_BSD_USER_INTERRUPT (1<<25) |
Line 1044... | Line 1475... | ||
1044 | #define FBC_CTL_IDLE_IMM (0<<2) |
1475 | #define FBC_CTL_IDLE_IMM (0<<2) |
1045 | #define FBC_CTL_IDLE_FULL (1<<2) |
1476 | #define FBC_CTL_IDLE_FULL (1<<2) |
1046 | #define FBC_CTL_IDLE_LINE (2<<2) |
1477 | #define FBC_CTL_IDLE_LINE (2<<2) |
1047 | #define FBC_CTL_IDLE_DEBUG (3<<2) |
1478 | #define FBC_CTL_IDLE_DEBUG (3<<2) |
1048 | #define FBC_CTL_CPU_FENCE (1<<1) |
1479 | #define FBC_CTL_CPU_FENCE (1<<1) |
1049 | #define FBC_CTL_PLANEA (0<<0) |
- | |
1050 | #define FBC_CTL_PLANEB (1<<0) |
1480 | #define FBC_CTL_PLANE(plane) ((plane)<<0) |
1051 | #define FBC_FENCE_OFF 0x0321b |
1481 | #define FBC_FENCE_OFF 0x03218 /* BSpec typo has 321Bh */ |
1052 | #define FBC_TAG 0x03300 |
1482 | #define FBC_TAG 0x03300 |
Line 1053... | Line 1483... | ||
1053 | 1483 | ||
Line 1054... | Line 1484... | ||
1054 | #define FBC_LL_SIZE (1536) |
1484 | #define FBC_LL_SIZE (1536) |
1055 | 1485 | ||
1056 | /* Framebuffer compression for GM45+ */ |
1486 | /* Framebuffer compression for GM45+ */ |
1057 | #define DPFC_CB_BASE 0x3200 |
1487 | #define DPFC_CB_BASE 0x3200 |
1058 | #define DPFC_CONTROL 0x3208 |
- | |
1059 | #define DPFC_CTL_EN (1<<31) |
1488 | #define DPFC_CONTROL 0x3208 |
1060 | #define DPFC_CTL_PLANEA (0<<30) |
1489 | #define DPFC_CTL_EN (1<<31) |
1061 | #define DPFC_CTL_PLANEB (1<<30) |
1490 | #define DPFC_CTL_PLANE(plane) ((plane)<<30) |
1062 | #define IVB_DPFC_CTL_PLANE_SHIFT (29) |
1491 | #define IVB_DPFC_CTL_PLANE(plane) ((plane)<<29) |
1063 | #define DPFC_CTL_FENCE_EN (1<<29) |
1492 | #define DPFC_CTL_FENCE_EN (1<<29) |
1064 | #define IVB_DPFC_CTL_FENCE_EN (1<<28) |
1493 | #define IVB_DPFC_CTL_FENCE_EN (1<<28) |
1065 | #define DPFC_CTL_PERSISTENT_MODE (1<<25) |
1494 | #define DPFC_CTL_PERSISTENT_MODE (1<<25) |
Line 1118... | Line 1547... | ||
1118 | 1547 | ||
1119 | #define MSG_FBC_REND_STATE 0x50380 |
1548 | #define MSG_FBC_REND_STATE 0x50380 |
1120 | #define FBC_REND_NUKE (1<<2) |
1549 | #define FBC_REND_NUKE (1<<2) |
Line 1121... | Line -... | ||
1121 | #define FBC_REND_CACHE_CLEAN (1<<1) |
- | |
1122 | - | ||
1123 | #define _HSW_PIPE_SLICE_CHICKEN_1_A 0x420B0 |
- | |
1124 | #define _HSW_PIPE_SLICE_CHICKEN_1_B 0x420B4 |
- | |
1125 | #define HSW_BYPASS_FBC_QUEUE (1<<22) |
- | |
1126 | #define HSW_PIPE_SLICE_CHICKEN_1(pipe) _PIPE(pipe, + \ |
- | |
1127 | _HSW_PIPE_SLICE_CHICKEN_1_A, + \ |
- | |
1128 | _HSW_PIPE_SLICE_CHICKEN_1_B) |
1550 | #define FBC_REND_CACHE_CLEAN (1<<1) |
1129 | 1551 | ||
1130 | /* |
1552 | /* |
1131 | * GPIO regs |
1553 | * GPIO regs |
1132 | */ |
1554 | */ |
Line 1161... | Line 1583... | ||
1161 | #define GMBUS_HOLD_EXT (1<<7) /* 300ns hold time, rsvd on Pineview */ |
1583 | #define GMBUS_HOLD_EXT (1<<7) /* 300ns hold time, rsvd on Pineview */ |
1162 | #define GMBUS_PORT_DISABLED 0 |
1584 | #define GMBUS_PORT_DISABLED 0 |
1163 | #define GMBUS_PORT_SSC 1 |
1585 | #define GMBUS_PORT_SSC 1 |
1164 | #define GMBUS_PORT_VGADDC 2 |
1586 | #define GMBUS_PORT_VGADDC 2 |
1165 | #define GMBUS_PORT_PANEL 3 |
1587 | #define GMBUS_PORT_PANEL 3 |
- | 1588 | #define GMBUS_PORT_DPD_CHV 3 /* HDMID_CHV */ |
|
1166 | #define GMBUS_PORT_DPC 4 /* HDMIC */ |
1589 | #define GMBUS_PORT_DPC 4 /* HDMIC */ |
1167 | #define GMBUS_PORT_DPB 5 /* SDVO, HDMIB */ |
1590 | #define GMBUS_PORT_DPB 5 /* SDVO, HDMIB */ |
1168 | #define GMBUS_PORT_DPD 6 /* HDMID */ |
1591 | #define GMBUS_PORT_DPD 6 /* HDMID */ |
1169 | #define GMBUS_PORT_RESERVED 7 /* 7 reserved */ |
1592 | #define GMBUS_PORT_RESERVED 7 /* 7 reserved */ |
1170 | #define GMBUS_NUM_PORTS (GMBUS_PORT_DPD - GMBUS_PORT_SSC + 1) |
1593 | #define GMBUS_NUM_PORTS (GMBUS_PORT_DPD - GMBUS_PORT_SSC + 1) |
Line 1200... | Line 1623... | ||
1200 | #define GMBUS_2BYTE_INDEX_EN (1<<31) |
1623 | #define GMBUS_2BYTE_INDEX_EN (1<<31) |
Line 1201... | Line 1624... | ||
1201 | 1624 | ||
1202 | /* |
1625 | /* |
1203 | * Clock control & power management |
1626 | * Clock control & power management |
- | 1627 | */ |
|
- | 1628 | #define _DPLL_A (dev_priv->info.display_mmio_offset + 0x6014) |
|
- | 1629 | #define _DPLL_B (dev_priv->info.display_mmio_offset + 0x6018) |
|
- | 1630 | #define _CHV_DPLL_C (dev_priv->info.display_mmio_offset + 0x6030) |
|
Line 1204... | Line 1631... | ||
1204 | */ |
1631 | #define DPLL(pipe) _PIPE3((pipe), _DPLL_A, _DPLL_B, _CHV_DPLL_C) |
1205 | 1632 | ||
1206 | #define VGA0 0x6000 |
1633 | #define VGA0 0x6000 |
1207 | #define VGA1 0x6004 |
1634 | #define VGA1 0x6004 |
Line 1212... | Line 1639... | ||
1212 | #define VGA0_PD_P1_MASK (0x1f << 0) |
1639 | #define VGA0_PD_P1_MASK (0x1f << 0) |
1213 | #define VGA1_PD_P2_DIV_4 (1 << 15) |
1640 | #define VGA1_PD_P2_DIV_4 (1 << 15) |
1214 | #define VGA1_PD_P1_DIV_2 (1 << 13) |
1641 | #define VGA1_PD_P1_DIV_2 (1 << 13) |
1215 | #define VGA1_PD_P1_SHIFT 8 |
1642 | #define VGA1_PD_P1_SHIFT 8 |
1216 | #define VGA1_PD_P1_MASK (0x1f << 8) |
1643 | #define VGA1_PD_P1_MASK (0x1f << 8) |
1217 | #define _DPLL_A (dev_priv->info->display_mmio_offset + 0x6014) |
- | |
1218 | #define _DPLL_B (dev_priv->info->display_mmio_offset + 0x6018) |
- | |
1219 | #define DPLL(pipe) _PIPE(pipe, _DPLL_A, _DPLL_B) |
- | |
1220 | #define DPLL_VCO_ENABLE (1 << 31) |
1644 | #define DPLL_VCO_ENABLE (1 << 31) |
1221 | #define DPLL_SDVO_HIGH_SPEED (1 << 30) |
1645 | #define DPLL_SDVO_HIGH_SPEED (1 << 30) |
1222 | #define DPLL_DVO_2X_MODE (1 << 30) |
1646 | #define DPLL_DVO_2X_MODE (1 << 30) |
1223 | #define DPLL_EXT_BUFFER_ENABLE_VLV (1 << 30) |
1647 | #define DPLL_EXT_BUFFER_ENABLE_VLV (1 << 30) |
1224 | #define DPLL_SYNCLOCK_ENABLE (1 << 29) |
1648 | #define DPLL_SYNCLOCK_ENABLE (1 << 29) |
Line 1235... | Line 1659... | ||
1235 | #define DPLL_FPA01_P1_POST_DIV_MASK 0x00ff0000 /* i915 */ |
1659 | #define DPLL_FPA01_P1_POST_DIV_MASK 0x00ff0000 /* i915 */ |
1236 | #define DPLL_FPA01_P1_POST_DIV_MASK_PINEVIEW 0x00ff8000 /* Pineview */ |
1660 | #define DPLL_FPA01_P1_POST_DIV_MASK_PINEVIEW 0x00ff8000 /* Pineview */ |
1237 | #define DPLL_LOCK_VLV (1<<15) |
1661 | #define DPLL_LOCK_VLV (1<<15) |
1238 | #define DPLL_INTEGRATED_CRI_CLK_VLV (1<<14) |
1662 | #define DPLL_INTEGRATED_CRI_CLK_VLV (1<<14) |
1239 | #define DPLL_INTEGRATED_CLOCK_VLV (1<<13) |
1663 | #define DPLL_INTEGRATED_CLOCK_VLV (1<<13) |
- | 1664 | #define DPLL_SSC_REF_CLOCK_CHV (1<<13) |
|
1240 | #define DPLL_PORTC_READY_MASK (0xf << 4) |
1665 | #define DPLL_PORTC_READY_MASK (0xf << 4) |
1241 | #define DPLL_PORTB_READY_MASK (0xf) |
1666 | #define DPLL_PORTB_READY_MASK (0xf) |
Line 1242... | Line 1667... | ||
1242 | 1667 | ||
- | 1668 | #define DPLL_FPA01_P1_POST_DIV_MASK_I830 0x001f0000 |
|
- | 1669 | ||
- | 1670 | /* Additional CHV pll/phy registers */ |
|
- | 1671 | #define DPIO_PHY_STATUS (VLV_DISPLAY_BASE + 0x6240) |
|
- | 1672 | #define DPLL_PORTD_READY_MASK (0xf) |
|
- | 1673 | #define DISPLAY_PHY_CONTROL (VLV_DISPLAY_BASE + 0x60100) |
|
- | 1674 | #define PHY_COM_LANE_RESET_DEASSERT(phy, val) \ |
|
- | 1675 | ((phy == DPIO_PHY0) ? (val | 1) : (val | 2)) |
|
- | 1676 | #define PHY_COM_LANE_RESET_ASSERT(phy, val) \ |
|
- | 1677 | ((phy == DPIO_PHY0) ? (val & ~1) : (val & ~2)) |
|
- | 1678 | #define DISPLAY_PHY_STATUS (VLV_DISPLAY_BASE + 0x60104) |
|
- | 1679 | #define PHY_POWERGOOD(phy) ((phy == DPIO_PHY0) ? (1<<31) : (1<<30)) |
|
1243 | #define DPLL_FPA01_P1_POST_DIV_MASK_I830 0x001f0000 |
1680 | |
1244 | /* |
1681 | /* |
1245 | * The i830 generation, in LVDS mode, defines P1 as the bit number set within |
1682 | * The i830 generation, in LVDS mode, defines P1 as the bit number set within |
1246 | * this field (only one bit may be set). |
1683 | * this field (only one bit may be set). |
1247 | */ |
1684 | */ |
Line 1276... | Line 1713... | ||
1276 | * SDVO multiplier for 945G/GM. Not used on 965. |
1713 | * SDVO multiplier for 945G/GM. Not used on 965. |
1277 | */ |
1714 | */ |
1278 | #define SDVO_MULTIPLIER_MASK 0x000000ff |
1715 | #define SDVO_MULTIPLIER_MASK 0x000000ff |
1279 | #define SDVO_MULTIPLIER_SHIFT_HIRES 4 |
1716 | #define SDVO_MULTIPLIER_SHIFT_HIRES 4 |
1280 | #define SDVO_MULTIPLIER_SHIFT_VGA 0 |
1717 | #define SDVO_MULTIPLIER_SHIFT_VGA 0 |
- | 1718 | ||
1281 | #define _DPLL_A_MD (dev_priv->info->display_mmio_offset + 0x601c) /* 965+ only */ |
1719 | #define _DPLL_A_MD (dev_priv->info.display_mmio_offset + 0x601c) |
- | 1720 | #define _DPLL_B_MD (dev_priv->info.display_mmio_offset + 0x6020) |
|
- | 1721 | #define _CHV_DPLL_C_MD (dev_priv->info.display_mmio_offset + 0x603c) |
|
- | 1722 | #define DPLL_MD(pipe) _PIPE3((pipe), _DPLL_A_MD, _DPLL_B_MD, _CHV_DPLL_C_MD) |
|
- | 1723 | ||
1282 | /* |
1724 | /* |
1283 | * UDI pixel divider, controlling how many pixels are stuffed into a packet. |
1725 | * UDI pixel divider, controlling how many pixels are stuffed into a packet. |
1284 | * |
1726 | * |
1285 | * Value is pixels minus 1. Must be set to 1 pixel for SDVO. |
1727 | * Value is pixels minus 1. Must be set to 1 pixel for SDVO. |
1286 | */ |
1728 | */ |
Line 1313... | Line 1755... | ||
1313 | * This best be set to the default value (3) or the CRT won't work. No, |
1755 | * This best be set to the default value (3) or the CRT won't work. No, |
1314 | * I don't entirely understand what this does... |
1756 | * I don't entirely understand what this does... |
1315 | */ |
1757 | */ |
1316 | #define DPLL_MD_VGA_UDI_MULTIPLIER_MASK 0x0000003f |
1758 | #define DPLL_MD_VGA_UDI_MULTIPLIER_MASK 0x0000003f |
1317 | #define DPLL_MD_VGA_UDI_MULTIPLIER_SHIFT 0 |
1759 | #define DPLL_MD_VGA_UDI_MULTIPLIER_SHIFT 0 |
1318 | #define _DPLL_B_MD (dev_priv->info->display_mmio_offset + 0x6020) /* 965+ only */ |
- | |
1319 | #define DPLL_MD(pipe) _PIPE(pipe, _DPLL_A_MD, _DPLL_B_MD) |
- | |
Line 1320... | Line 1760... | ||
1320 | 1760 | ||
1321 | #define _FPA0 0x06040 |
1761 | #define _FPA0 0x06040 |
1322 | #define _FPA1 0x06044 |
1762 | #define _FPA1 0x06044 |
1323 | #define _FPB0 0x06048 |
1763 | #define _FPB0 0x06048 |
Line 1346... | Line 1786... | ||
1346 | #define D_STATE 0x6104 |
1786 | #define D_STATE 0x6104 |
1347 | #define DSTATE_GFX_RESET_I830 (1<<6) |
1787 | #define DSTATE_GFX_RESET_I830 (1<<6) |
1348 | #define DSTATE_PLL_D3_OFF (1<<3) |
1788 | #define DSTATE_PLL_D3_OFF (1<<3) |
1349 | #define DSTATE_GFX_CLOCK_GATING (1<<1) |
1789 | #define DSTATE_GFX_CLOCK_GATING (1<<1) |
1350 | #define DSTATE_DOT_CLOCK_GATING (1<<0) |
1790 | #define DSTATE_DOT_CLOCK_GATING (1<<0) |
1351 | #define DSPCLK_GATE_D (dev_priv->info->display_mmio_offset + 0x6200) |
1791 | #define DSPCLK_GATE_D (dev_priv->info.display_mmio_offset + 0x6200) |
1352 | # define DPUNIT_B_CLOCK_GATE_DISABLE (1 << 30) /* 965 */ |
1792 | # define DPUNIT_B_CLOCK_GATE_DISABLE (1 << 30) /* 965 */ |
1353 | # define VSUNIT_CLOCK_GATE_DISABLE (1 << 29) /* 965 */ |
1793 | # define VSUNIT_CLOCK_GATE_DISABLE (1 << 29) /* 965 */ |
1354 | # define VRHUNIT_CLOCK_GATE_DISABLE (1 << 28) /* 965 */ |
1794 | # define VRHUNIT_CLOCK_GATE_DISABLE (1 << 28) /* 965 */ |
1355 | # define VRDUNIT_CLOCK_GATE_DISABLE (1 << 27) /* 965 */ |
1795 | # define VRDUNIT_CLOCK_GATE_DISABLE (1 << 27) /* 965 */ |
1356 | # define AUDUNIT_CLOCK_GATE_DISABLE (1 << 26) /* 965 */ |
1796 | # define AUDUNIT_CLOCK_GATE_DISABLE (1 << 26) /* 965 */ |
Line 1375... | Line 1815... | ||
1375 | # define VRUNIT_CLOCK_GATE_DISABLE (1 << 7) /* 915+: reserved */ |
1815 | # define VRUNIT_CLOCK_GATE_DISABLE (1 << 7) /* 915+: reserved */ |
1376 | # define OVHUNIT_CLOCK_GATE_DISABLE (1 << 6) /* 830-865 */ |
1816 | # define OVHUNIT_CLOCK_GATE_DISABLE (1 << 6) /* 830-865 */ |
1377 | # define DPIOUNIT_CLOCK_GATE_DISABLE (1 << 6) /* 915-945 */ |
1817 | # define DPIOUNIT_CLOCK_GATE_DISABLE (1 << 6) /* 915-945 */ |
1378 | # define OVFUNIT_CLOCK_GATE_DISABLE (1 << 5) |
1818 | # define OVFUNIT_CLOCK_GATE_DISABLE (1 << 5) |
1379 | # define OVBUNIT_CLOCK_GATE_DISABLE (1 << 4) |
1819 | # define OVBUNIT_CLOCK_GATE_DISABLE (1 << 4) |
1380 | /** |
1820 | /* |
1381 | * This bit must be set on the 830 to prevent hangs when turning off the |
1821 | * This bit must be set on the 830 to prevent hangs when turning off the |
1382 | * overlay scaler. |
1822 | * overlay scaler. |
1383 | */ |
1823 | */ |
1384 | # define OVRUNIT_CLOCK_GATE_DISABLE (1 << 3) |
1824 | # define OVRUNIT_CLOCK_GATE_DISABLE (1 << 3) |
1385 | # define OVCUNIT_CLOCK_GATE_DISABLE (1 << 2) |
1825 | # define OVCUNIT_CLOCK_GATE_DISABLE (1 << 2) |
Line 1395... | Line 1835... | ||
1395 | # define WINDOWER_CLOCK_GATE_DISABLE (1 << 9) |
1835 | # define WINDOWER_CLOCK_GATE_DISABLE (1 << 9) |
1396 | # define INTERPOLATOR_CLOCK_GATE_DISABLE (1 << 8) |
1836 | # define INTERPOLATOR_CLOCK_GATE_DISABLE (1 << 8) |
1397 | # define COLOR_CALCULATOR_CLOCK_GATE_DISABLE (1 << 7) |
1837 | # define COLOR_CALCULATOR_CLOCK_GATE_DISABLE (1 << 7) |
1398 | # define MOTION_COMP_CLOCK_GATE_DISABLE (1 << 6) |
1838 | # define MOTION_COMP_CLOCK_GATE_DISABLE (1 << 6) |
1399 | # define MAG_CLOCK_GATE_DISABLE (1 << 5) |
1839 | # define MAG_CLOCK_GATE_DISABLE (1 << 5) |
1400 | /** This bit must be unset on 855,865 */ |
1840 | /* This bit must be unset on 855,865 */ |
1401 | # define MECI_CLOCK_GATE_DISABLE (1 << 4) |
1841 | # define MECI_CLOCK_GATE_DISABLE (1 << 4) |
1402 | # define DCMP_CLOCK_GATE_DISABLE (1 << 3) |
1842 | # define DCMP_CLOCK_GATE_DISABLE (1 << 3) |
1403 | # define MEC_CLOCK_GATE_DISABLE (1 << 2) |
1843 | # define MEC_CLOCK_GATE_DISABLE (1 << 2) |
1404 | # define MECO_CLOCK_GATE_DISABLE (1 << 1) |
1844 | # define MECO_CLOCK_GATE_DISABLE (1 << 1) |
1405 | /** This bit must be set on 855,865. */ |
1845 | /* This bit must be set on 855,865. */ |
1406 | # define SV_CLOCK_GATE_DISABLE (1 << 0) |
1846 | # define SV_CLOCK_GATE_DISABLE (1 << 0) |
1407 | # define I915_MPEG_CLOCK_GATE_DISABLE (1 << 16) |
1847 | # define I915_MPEG_CLOCK_GATE_DISABLE (1 << 16) |
1408 | # define I915_VLD_IP_PR_CLOCK_GATE_DISABLE (1 << 15) |
1848 | # define I915_VLD_IP_PR_CLOCK_GATE_DISABLE (1 << 15) |
1409 | # define I915_MOTION_COMP_CLOCK_GATE_DISABLE (1 << 14) |
1849 | # define I915_MOTION_COMP_CLOCK_GATE_DISABLE (1 << 14) |
1410 | # define I915_BD_BF_CLOCK_GATE_DISABLE (1 << 13) |
1850 | # define I915_BD_BF_CLOCK_GATE_DISABLE (1 << 13) |
Line 1421... | Line 1861... | ||
1421 | # define I915_PS_CLOCK_GATE_DISABLE (1 << 2) |
1861 | # define I915_PS_CLOCK_GATE_DISABLE (1 << 2) |
1422 | # define I915_CC_CLOCK_GATE_DISABLE (1 << 1) |
1862 | # define I915_CC_CLOCK_GATE_DISABLE (1 << 1) |
1423 | # define I915_BY_CLOCK_GATE_DISABLE (1 << 0) |
1863 | # define I915_BY_CLOCK_GATE_DISABLE (1 << 0) |
Line 1424... | Line 1864... | ||
1424 | 1864 | ||
1425 | # define I965_RCZ_CLOCK_GATE_DISABLE (1 << 30) |
1865 | # define I965_RCZ_CLOCK_GATE_DISABLE (1 << 30) |
1426 | /** This bit must always be set on 965G/965GM */ |
1866 | /* This bit must always be set on 965G/965GM */ |
1427 | # define I965_RCC_CLOCK_GATE_DISABLE (1 << 29) |
1867 | # define I965_RCC_CLOCK_GATE_DISABLE (1 << 29) |
1428 | # define I965_RCPB_CLOCK_GATE_DISABLE (1 << 28) |
1868 | # define I965_RCPB_CLOCK_GATE_DISABLE (1 << 28) |
1429 | # define I965_DAP_CLOCK_GATE_DISABLE (1 << 27) |
1869 | # define I965_DAP_CLOCK_GATE_DISABLE (1 << 27) |
1430 | # define I965_ROC_CLOCK_GATE_DISABLE (1 << 26) |
1870 | # define I965_ROC_CLOCK_GATE_DISABLE (1 << 26) |
1431 | # define I965_GW_CLOCK_GATE_DISABLE (1 << 25) |
1871 | # define I965_GW_CLOCK_GATE_DISABLE (1 << 25) |
1432 | # define I965_TD_CLOCK_GATE_DISABLE (1 << 24) |
1872 | # define I965_TD_CLOCK_GATE_DISABLE (1 << 24) |
1433 | /** This bit must always be set on 965G */ |
1873 | /* This bit must always be set on 965G */ |
1434 | # define I965_ISC_CLOCK_GATE_DISABLE (1 << 23) |
1874 | # define I965_ISC_CLOCK_GATE_DISABLE (1 << 23) |
1435 | # define I965_IC_CLOCK_GATE_DISABLE (1 << 22) |
1875 | # define I965_IC_CLOCK_GATE_DISABLE (1 << 22) |
1436 | # define I965_EU_CLOCK_GATE_DISABLE (1 << 21) |
1876 | # define I965_EU_CLOCK_GATE_DISABLE (1 << 21) |
1437 | # define I965_IF_CLOCK_GATE_DISABLE (1 << 20) |
1877 | # define I965_IF_CLOCK_GATE_DISABLE (1 << 20) |
Line 1453... | Line 1893... | ||
1453 | 1893 | ||
1454 | #define RENCLK_GATE_D2 0x6208 |
1894 | #define RENCLK_GATE_D2 0x6208 |
1455 | #define VF_UNIT_CLOCK_GATE_DISABLE (1 << 9) |
1895 | #define VF_UNIT_CLOCK_GATE_DISABLE (1 << 9) |
1456 | #define GS_UNIT_CLOCK_GATE_DISABLE (1 << 7) |
1896 | #define GS_UNIT_CLOCK_GATE_DISABLE (1 << 7) |
- | 1897 | #define CL_UNIT_CLOCK_GATE_DISABLE (1 << 6) |
|
- | 1898 | ||
- | 1899 | #define VDECCLK_GATE_D 0x620C /* g4x only */ |
|
- | 1900 | #define VCP_UNIT_CLOCK_GATE_DISABLE (1 << 4) |
|
1457 | #define CL_UNIT_CLOCK_GATE_DISABLE (1 << 6) |
1901 | |
1458 | #define RAMCLK_GATE_D 0x6210 /* CRL only */ |
1902 | #define RAMCLK_GATE_D 0x6210 /* CRL only */ |
Line 1459... | Line 1903... | ||
1459 | #define DEUC 0x6214 /* CRL only */ |
1903 | #define DEUC 0x6214 /* CRL only */ |
1460 | 1904 | ||
Line 1470... | Line 1914... | ||
1470 | #define GMBUSFREQ_VLV (VLV_DISPLAY_BASE + 0x6510) |
1914 | #define GMBUSFREQ_VLV (VLV_DISPLAY_BASE + 0x6510) |
Line 1471... | Line 1915... | ||
1471 | 1915 | ||
1472 | /* |
1916 | /* |
1473 | * Palette regs |
1917 | * Palette regs |
1474 | */ |
- | |
1475 | 1918 | */ |
|
- | 1919 | #define PALETTE_A_OFFSET 0xa000 |
|
- | 1920 | #define PALETTE_B_OFFSET 0xa800 |
|
1476 | #define _PALETTE_A (dev_priv->info->display_mmio_offset + 0xa000) |
1921 | #define CHV_PALETTE_C_OFFSET 0xc000 |
1477 | #define _PALETTE_B (dev_priv->info->display_mmio_offset + 0xa800) |
1922 | #define PALETTE(pipe) (dev_priv->info.palette_offsets[pipe] + \ |
Line 1478... | Line 1923... | ||
1478 | #define PALETTE(pipe) _PIPE(pipe, _PALETTE_A, _PALETTE_B) |
1923 | dev_priv->info.display_mmio_offset) |
Line 1479... | Line 1924... | ||
1479 | 1924 | ||
1480 | /* MCH MMIO space */ |
1925 | /* MCH MMIO space */ |
Line 1494... | Line 1939... | ||
1494 | #define MCHBAR_MIRROR_BASE_SNB 0x140000 |
1939 | #define MCHBAR_MIRROR_BASE_SNB 0x140000 |
Line 1495... | Line 1940... | ||
1495 | 1940 | ||
1496 | /* Memory controller frequency in MCHBAR for Haswell (possible SNB+) */ |
1941 | /* Memory controller frequency in MCHBAR for Haswell (possible SNB+) */ |
Line 1497... | Line 1942... | ||
1497 | #define DCLK (MCHBAR_MIRROR_BASE_SNB + 0x5e04) |
1942 | #define DCLK (MCHBAR_MIRROR_BASE_SNB + 0x5e04) |
1498 | 1943 | ||
1499 | /** 915-945 and GM965 MCH register controlling DRAM channel access */ |
1944 | /* 915-945 and GM965 MCH register controlling DRAM channel access */ |
1500 | #define DCC 0x10200 |
1945 | #define DCC 0x10200 |
1501 | #define DCC_ADDRESSING_MODE_SINGLE_CHANNEL (0 << 0) |
1946 | #define DCC_ADDRESSING_MODE_SINGLE_CHANNEL (0 << 0) |
1502 | #define DCC_ADDRESSING_MODE_DUAL_CHANNEL_ASYMMETRIC (1 << 0) |
1947 | #define DCC_ADDRESSING_MODE_DUAL_CHANNEL_ASYMMETRIC (1 << 0) |
1503 | #define DCC_ADDRESSING_MODE_DUAL_CHANNEL_INTERLEAVED (2 << 0) |
1948 | #define DCC_ADDRESSING_MODE_DUAL_CHANNEL_INTERLEAVED (2 << 0) |
1504 | #define DCC_ADDRESSING_MODE_MASK (3 << 0) |
1949 | #define DCC_ADDRESSING_MODE_MASK (3 << 0) |
Line 1505... | Line 1950... | ||
1505 | #define DCC_CHANNEL_XOR_DISABLE (1 << 10) |
1950 | #define DCC_CHANNEL_XOR_DISABLE (1 << 10) |
1506 | #define DCC_CHANNEL_XOR_BIT_17 (1 << 9) |
1951 | #define DCC_CHANNEL_XOR_BIT_17 (1 << 9) |
1507 | 1952 | ||
Line 1508... | Line 1953... | ||
1508 | /** Pineview MCH register contains DDR3 setting */ |
1953 | /* Pineview MCH register contains DDR3 setting */ |
1509 | #define CSHRDDR3CTL 0x101a8 |
1954 | #define CSHRDDR3CTL 0x101a8 |
1510 | #define CSHRDDR3CTL_DDR3 (1 << 2) |
1955 | #define CSHRDDR3CTL_DDR3 (1 << 2) |
Line 1511... | Line 1956... | ||
1511 | 1956 | ||
1512 | /** 965 MCH register controlling DRAM channel configuration */ |
1957 | /* 965 MCH register controlling DRAM channel configuration */ |
1513 | #define C0DRB3 0x10206 |
1958 | #define C0DRB3 0x10206 |
1514 | #define C1DRB3 0x10606 |
1959 | #define C1DRB3 0x10606 |
1515 | 1960 | ||
1516 | /** snb MCH registers for reading the DRAM channel configuration */ |
1961 | /* snb MCH registers for reading the DRAM channel configuration */ |
Line 1533... | Line 1978... | ||
1533 | #define MAD_DIMM_B_SIZE_SHIFT 8 |
1978 | #define MAD_DIMM_B_SIZE_SHIFT 8 |
1534 | #define MAD_DIMM_B_SIZE_MASK (0xff << MAD_DIMM_B_SIZE_SHIFT) |
1979 | #define MAD_DIMM_B_SIZE_MASK (0xff << MAD_DIMM_B_SIZE_SHIFT) |
1535 | #define MAD_DIMM_A_SIZE_SHIFT 0 |
1980 | #define MAD_DIMM_A_SIZE_SHIFT 0 |
1536 | #define MAD_DIMM_A_SIZE_MASK (0xff << MAD_DIMM_A_SIZE_SHIFT) |
1981 | #define MAD_DIMM_A_SIZE_MASK (0xff << MAD_DIMM_A_SIZE_SHIFT) |
Line 1537... | Line 1982... | ||
1537 | 1982 | ||
1538 | /** snb MCH registers for priority tuning */ |
1983 | /* snb MCH registers for priority tuning */ |
1539 | #define MCH_SSKPD (MCHBAR_MIRROR_BASE_SNB + 0x5d10) |
1984 | #define MCH_SSKPD (MCHBAR_MIRROR_BASE_SNB + 0x5d10) |
1540 | #define MCH_SSKPD_WM0_MASK 0x3f |
1985 | #define MCH_SSKPD_WM0_MASK 0x3f |
Line 1541... | Line 1986... | ||
1541 | #define MCH_SSKPD_WM0_VAL 0xc |
1986 | #define MCH_SSKPD_WM0_VAL 0xc |
Line 1837... | Line 2282... | ||
1837 | */ |
2282 | */ |
1838 | #define HSW_CXT_TOTAL_SIZE (17 * PAGE_SIZE) |
2283 | #define HSW_CXT_TOTAL_SIZE (17 * PAGE_SIZE) |
1839 | /* Same as Haswell, but 72064 bytes now. */ |
2284 | /* Same as Haswell, but 72064 bytes now. */ |
1840 | #define GEN8_CXT_TOTAL_SIZE (18 * PAGE_SIZE) |
2285 | #define GEN8_CXT_TOTAL_SIZE (18 * PAGE_SIZE) |
Line 1841... | Line -... | ||
1841 | - | ||
- | 2286 | ||
1842 | 2287 | #define CHV_CLK_CTL1 0x101100 |
|
1843 | #define VLV_CLK_CTL2 0x101104 |
2288 | #define VLV_CLK_CTL2 0x101104 |
Line 1844... | Line 2289... | ||
1844 | #define CLK_CTL2_CZCOUNT_30NS_SHIFT 28 |
2289 | #define CLK_CTL2_CZCOUNT_30NS_SHIFT 28 |
1845 | 2290 | ||
Line 1860... | Line 2305... | ||
1860 | /* |
2305 | /* |
1861 | * Display engine regs |
2306 | * Display engine regs |
1862 | */ |
2307 | */ |
Line 1863... | Line 2308... | ||
1863 | 2308 | ||
1864 | /* Pipe A CRC regs */ |
2309 | /* Pipe A CRC regs */ |
1865 | #define _PIPE_CRC_CTL_A (dev_priv->info->display_mmio_offset + 0x60050) |
2310 | #define _PIPE_CRC_CTL_A 0x60050 |
1866 | #define PIPE_CRC_ENABLE (1 << 31) |
2311 | #define PIPE_CRC_ENABLE (1 << 31) |
1867 | /* ivb+ source selection */ |
2312 | /* ivb+ source selection */ |
1868 | #define PIPE_CRC_SOURCE_PRIMARY_IVB (0 << 29) |
2313 | #define PIPE_CRC_SOURCE_PRIMARY_IVB (0 << 29) |
1869 | #define PIPE_CRC_SOURCE_SPRITE_IVB (1 << 29) |
2314 | #define PIPE_CRC_SOURCE_SPRITE_IVB (1 << 29) |
Line 1900... | Line 2345... | ||
1900 | #define _PIPE_CRC_RES_2_A_IVB 0x60068 |
2345 | #define _PIPE_CRC_RES_2_A_IVB 0x60068 |
1901 | #define _PIPE_CRC_RES_3_A_IVB 0x6006c |
2346 | #define _PIPE_CRC_RES_3_A_IVB 0x6006c |
1902 | #define _PIPE_CRC_RES_4_A_IVB 0x60070 |
2347 | #define _PIPE_CRC_RES_4_A_IVB 0x60070 |
1903 | #define _PIPE_CRC_RES_5_A_IVB 0x60074 |
2348 | #define _PIPE_CRC_RES_5_A_IVB 0x60074 |
Line 1904... | Line 2349... | ||
1904 | 2349 | ||
1905 | #define _PIPE_CRC_RES_RED_A (dev_priv->info->display_mmio_offset + 0x60060) |
2350 | #define _PIPE_CRC_RES_RED_A 0x60060 |
1906 | #define _PIPE_CRC_RES_GREEN_A (dev_priv->info->display_mmio_offset + 0x60064) |
2351 | #define _PIPE_CRC_RES_GREEN_A 0x60064 |
1907 | #define _PIPE_CRC_RES_BLUE_A (dev_priv->info->display_mmio_offset + 0x60068) |
2352 | #define _PIPE_CRC_RES_BLUE_A 0x60068 |
1908 | #define _PIPE_CRC_RES_RES1_A_I915 (dev_priv->info->display_mmio_offset + 0x6006c) |
2353 | #define _PIPE_CRC_RES_RES1_A_I915 0x6006c |
Line 1909... | Line 2354... | ||
1909 | #define _PIPE_CRC_RES_RES2_A_G4X (dev_priv->info->display_mmio_offset + 0x60080) |
2354 | #define _PIPE_CRC_RES_RES2_A_G4X 0x60080 |
1910 | 2355 | ||
1911 | /* Pipe B CRC regs */ |
2356 | /* Pipe B CRC regs */ |
1912 | #define _PIPE_CRC_RES_1_B_IVB 0x61064 |
2357 | #define _PIPE_CRC_RES_1_B_IVB 0x61064 |
1913 | #define _PIPE_CRC_RES_2_B_IVB 0x61068 |
2358 | #define _PIPE_CRC_RES_2_B_IVB 0x61068 |
1914 | #define _PIPE_CRC_RES_3_B_IVB 0x6106c |
2359 | #define _PIPE_CRC_RES_3_B_IVB 0x6106c |
Line 1915... | Line 2360... | ||
1915 | #define _PIPE_CRC_RES_4_B_IVB 0x61070 |
2360 | #define _PIPE_CRC_RES_4_B_IVB 0x61070 |
1916 | #define _PIPE_CRC_RES_5_B_IVB 0x61074 |
2361 | #define _PIPE_CRC_RES_5_B_IVB 0x61074 |
1917 | 2362 | ||
1918 | #define PIPE_CRC_CTL(pipe) _PIPE_INC(pipe, _PIPE_CRC_CTL_A, 0x01000) |
2363 | #define PIPE_CRC_CTL(pipe) _TRANSCODER2(pipe, _PIPE_CRC_CTL_A) |
1919 | #define PIPE_CRC_RES_1_IVB(pipe) \ |
2364 | #define PIPE_CRC_RES_1_IVB(pipe) \ |
1920 | _PIPE(pipe, _PIPE_CRC_RES_1_A_IVB, _PIPE_CRC_RES_1_B_IVB) |
2365 | _TRANSCODER2(pipe, _PIPE_CRC_RES_1_A_IVB) |
1921 | #define PIPE_CRC_RES_2_IVB(pipe) \ |
2366 | #define PIPE_CRC_RES_2_IVB(pipe) \ |
1922 | _PIPE(pipe, _PIPE_CRC_RES_2_A_IVB, _PIPE_CRC_RES_2_B_IVB) |
2367 | _TRANSCODER2(pipe, _PIPE_CRC_RES_2_A_IVB) |
1923 | #define PIPE_CRC_RES_3_IVB(pipe) \ |
2368 | #define PIPE_CRC_RES_3_IVB(pipe) \ |
1924 | _PIPE(pipe, _PIPE_CRC_RES_3_A_IVB, _PIPE_CRC_RES_3_B_IVB) |
2369 | _TRANSCODER2(pipe, _PIPE_CRC_RES_3_A_IVB) |
1925 | #define PIPE_CRC_RES_4_IVB(pipe) \ |
2370 | #define PIPE_CRC_RES_4_IVB(pipe) \ |
Line 1926... | Line 2371... | ||
1926 | _PIPE(pipe, _PIPE_CRC_RES_4_A_IVB, _PIPE_CRC_RES_4_B_IVB) |
2371 | _TRANSCODER2(pipe, _PIPE_CRC_RES_4_A_IVB) |
1927 | #define PIPE_CRC_RES_5_IVB(pipe) \ |
2372 | #define PIPE_CRC_RES_5_IVB(pipe) \ |
1928 | _PIPE(pipe, _PIPE_CRC_RES_5_A_IVB, _PIPE_CRC_RES_5_B_IVB) |
2373 | _TRANSCODER2(pipe, _PIPE_CRC_RES_5_A_IVB) |
1929 | 2374 | ||
1930 | #define PIPE_CRC_RES_RED(pipe) \ |
2375 | #define PIPE_CRC_RES_RED(pipe) \ |
1931 | _PIPE_INC(pipe, _PIPE_CRC_RES_RED_A, 0x01000) |
2376 | _TRANSCODER2(pipe, _PIPE_CRC_RES_RED_A) |
1932 | #define PIPE_CRC_RES_GREEN(pipe) \ |
2377 | #define PIPE_CRC_RES_GREEN(pipe) \ |
1933 | _PIPE_INC(pipe, _PIPE_CRC_RES_GREEN_A, 0x01000) |
2378 | _TRANSCODER2(pipe, _PIPE_CRC_RES_GREEN_A) |
1934 | #define PIPE_CRC_RES_BLUE(pipe) \ |
2379 | #define PIPE_CRC_RES_BLUE(pipe) \ |
1935 | _PIPE_INC(pipe, _PIPE_CRC_RES_BLUE_A, 0x01000) |
2380 | _TRANSCODER2(pipe, _PIPE_CRC_RES_BLUE_A) |
Line 1936... | Line 2381... | ||
1936 | #define PIPE_CRC_RES_RES1_I915(pipe) \ |
2381 | #define PIPE_CRC_RES_RES1_I915(pipe) \ |
1937 | _PIPE_INC(pipe, _PIPE_CRC_RES_RES1_A_I915, 0x01000) |
2382 | _TRANSCODER2(pipe, _PIPE_CRC_RES_RES1_A_I915) |
1938 | #define PIPE_CRC_RES_RES2_G4X(pipe) \ |
2383 | #define PIPE_CRC_RES_RES2_G4X(pipe) \ |
1939 | _PIPE_INC(pipe, _PIPE_CRC_RES_RES2_A_G4X, 0x01000) |
2384 | _TRANSCODER2(pipe, _PIPE_CRC_RES_RES2_A_G4X) |
1940 | 2385 | ||
1941 | /* Pipe A timing regs */ |
2386 | /* Pipe A timing regs */ |
1942 | #define _HTOTAL_A (dev_priv->info->display_mmio_offset + 0x60000) |
2387 | #define _HTOTAL_A 0x60000 |
1943 | #define _HBLANK_A (dev_priv->info->display_mmio_offset + 0x60004) |
2388 | #define _HBLANK_A 0x60004 |
1944 | #define _HSYNC_A (dev_priv->info->display_mmio_offset + 0x60008) |
2389 | #define _HSYNC_A 0x60008 |
1945 | #define _VTOTAL_A (dev_priv->info->display_mmio_offset + 0x6000c) |
2390 | #define _VTOTAL_A 0x6000c |
Line 1946... | Line 2391... | ||
1946 | #define _VBLANK_A (dev_priv->info->display_mmio_offset + 0x60010) |
2391 | #define _VBLANK_A 0x60010 |
1947 | #define _VSYNC_A (dev_priv->info->display_mmio_offset + 0x60014) |
2392 | #define _VSYNC_A 0x60014 |
1948 | #define _PIPEASRC (dev_priv->info->display_mmio_offset + 0x6001c) |
2393 | #define _PIPEASRC 0x6001c |
1949 | #define _BCLRPAT_A (dev_priv->info->display_mmio_offset + 0x60020) |
2394 | #define _BCLRPAT_A 0x60020 |
1950 | #define _VSYNCSHIFT_A (dev_priv->info->display_mmio_offset + 0x60028) |
2395 | #define _VSYNCSHIFT_A 0x60028 |
1951 | 2396 | ||
1952 | /* Pipe B timing regs */ |
2397 | /* Pipe B timing regs */ |
1953 | #define _HTOTAL_B (dev_priv->info->display_mmio_offset + 0x61000) |
2398 | #define _HTOTAL_B 0x61000 |
- | 2399 | #define _HBLANK_B 0x61004 |
|
- | 2400 | #define _HSYNC_B 0x61008 |
|
- | 2401 | #define _VTOTAL_B 0x6100c |
|
- | 2402 | #define _VBLANK_B 0x61010 |
|
- | 2403 | #define _VSYNC_B 0x61014 |
|
- | 2404 | #define _PIPEBSRC 0x6101c |
|
- | 2405 | #define _BCLRPAT_B 0x61020 |
|
- | 2406 | #define _VSYNCSHIFT_B 0x61028 |
|
- | 2407 | ||
1954 | #define _HBLANK_B (dev_priv->info->display_mmio_offset + 0x61004) |
2408 | #define TRANSCODER_A_OFFSET 0x60000 |
- | 2409 | #define TRANSCODER_B_OFFSET 0x61000 |
|
1955 | #define _HSYNC_B (dev_priv->info->display_mmio_offset + 0x61008) |
2410 | #define TRANSCODER_C_OFFSET 0x62000 |
1956 | #define _VTOTAL_B (dev_priv->info->display_mmio_offset + 0x6100c) |
2411 | #define CHV_TRANSCODER_C_OFFSET 0x63000 |
1957 | #define _VBLANK_B (dev_priv->info->display_mmio_offset + 0x61010) |
2412 | #define TRANSCODER_EDP_OFFSET 0x6f000 |
1958 | #define _VSYNC_B (dev_priv->info->display_mmio_offset + 0x61014) |
2413 | |
1959 | #define _PIPEBSRC (dev_priv->info->display_mmio_offset + 0x6101c) |
2414 | #define _TRANSCODER2(pipe, reg) (dev_priv->info.trans_offsets[(pipe)] - \ |
1960 | #define _BCLRPAT_B (dev_priv->info->display_mmio_offset + 0x61020) |
2415 | dev_priv->info.trans_offsets[TRANSCODER_A] + (reg) + \ |
1961 | #define _VSYNCSHIFT_B (dev_priv->info->display_mmio_offset + 0x61028) |
2416 | dev_priv->info.display_mmio_offset) |
1962 | 2417 | ||
1963 | #define HTOTAL(trans) _TRANSCODER(trans, _HTOTAL_A, _HTOTAL_B) |
2418 | #define HTOTAL(trans) _TRANSCODER2(trans, _HTOTAL_A) |
1964 | #define HBLANK(trans) _TRANSCODER(trans, _HBLANK_A, _HBLANK_B) |
2419 | #define HBLANK(trans) _TRANSCODER2(trans, _HBLANK_A) |
- | 2420 | #define HSYNC(trans) _TRANSCODER2(trans, _HSYNC_A) |
|
Line 1965... | Line 2421... | ||
1965 | #define HSYNC(trans) _TRANSCODER(trans, _HSYNC_A, _HSYNC_B) |
2421 | #define VTOTAL(trans) _TRANSCODER2(trans, _VTOTAL_A) |
1966 | #define VTOTAL(trans) _TRANSCODER(trans, _VTOTAL_A, _VTOTAL_B) |
2422 | #define VBLANK(trans) _TRANSCODER2(trans, _VBLANK_A) |
1967 | #define VBLANK(trans) _TRANSCODER(trans, _VBLANK_A, _VBLANK_B) |
2423 | #define VSYNC(trans) _TRANSCODER2(trans, _VSYNC_A) |
1968 | #define VSYNC(trans) _TRANSCODER(trans, _VSYNC_A, _VSYNC_B) |
2424 | #define BCLRPAT(trans) _TRANSCODER2(trans, _BCLRPAT_A) |
- | 2425 | #define VSYNCSHIFT(trans) _TRANSCODER2(trans, _VSYNCSHIFT_A) |
|
1969 | #define BCLRPAT(pipe) _PIPE(pipe, _BCLRPAT_A, _BCLRPAT_B) |
2426 | #define PIPESRC(trans) _TRANSCODER2(trans, _PIPEASRC) |
1970 | #define VSYNCSHIFT(trans) _TRANSCODER(trans, _VSYNCSHIFT_A, _VSYNCSHIFT_B) |
2427 | |
1971 | 2428 | /* HSW+ eDP PSR registers */ |
|
1972 | /* HSW+ eDP PSR registers */ |
2429 | #define EDP_PSR_BASE(dev) (IS_HASWELL(dev) ? 0x64800 : 0x6f800) |
1973 | #define EDP_PSR_BASE(dev) (IS_HASWELL(dev) ? 0x64800 : 0x6f800) |
2430 | #define EDP_PSR_CTL(dev) (EDP_PSR_BASE(dev) + 0) |
Line 2082... | Line 2539... | ||
2082 | #define ADPA_DPMS_STANDBY (2<<10) |
2539 | #define ADPA_DPMS_STANDBY (2<<10) |
2083 | #define ADPA_DPMS_OFF (3<<10) |
2540 | #define ADPA_DPMS_OFF (3<<10) |
Line 2084... | Line 2541... | ||
2084 | 2541 | ||
2085 | 2542 | ||
2086 | /* Hotplug control (945+ only) */ |
2543 | /* Hotplug control (945+ only) */ |
2087 | #define PORT_HOTPLUG_EN (dev_priv->info->display_mmio_offset + 0x61110) |
2544 | #define PORT_HOTPLUG_EN (dev_priv->info.display_mmio_offset + 0x61110) |
2088 | #define PORTB_HOTPLUG_INT_EN (1 << 29) |
2545 | #define PORTB_HOTPLUG_INT_EN (1 << 29) |
2089 | #define PORTC_HOTPLUG_INT_EN (1 << 28) |
2546 | #define PORTC_HOTPLUG_INT_EN (1 << 28) |
2090 | #define PORTD_HOTPLUG_INT_EN (1 << 27) |
2547 | #define PORTD_HOTPLUG_INT_EN (1 << 27) |
Line 2112... | Line 2569... | ||
2112 | #define CRT_HOTPLUG_DETECT_DELAY_1G (0 << 4) |
2569 | #define CRT_HOTPLUG_DETECT_DELAY_1G (0 << 4) |
2113 | #define CRT_HOTPLUG_DETECT_DELAY_2G (1 << 4) |
2570 | #define CRT_HOTPLUG_DETECT_DELAY_2G (1 << 4) |
2114 | #define CRT_HOTPLUG_DETECT_VOLTAGE_325MV (0 << 2) |
2571 | #define CRT_HOTPLUG_DETECT_VOLTAGE_325MV (0 << 2) |
2115 | #define CRT_HOTPLUG_DETECT_VOLTAGE_475MV (1 << 2) |
2572 | #define CRT_HOTPLUG_DETECT_VOLTAGE_475MV (1 << 2) |
Line 2116... | Line 2573... | ||
2116 | 2573 | ||
2117 | #define PORT_HOTPLUG_STAT (dev_priv->info->display_mmio_offset + 0x61114) |
2574 | #define PORT_HOTPLUG_STAT (dev_priv->info.display_mmio_offset + 0x61114) |
2118 | /* |
2575 | /* |
2119 | * HDMI/DP bits are gen4+ |
2576 | * HDMI/DP bits are gen4+ |
2120 | * |
2577 | * |
2121 | * WARNING: Bspec for hpd status bits on gen4 seems to be completely confused. |
2578 | * WARNING: Bspec for hpd status bits on gen4 seems to be completely confused. |
Line 2128... | Line 2585... | ||
2128 | /* VLV DP/HDMI bits again match Bspec */ |
2585 | /* VLV DP/HDMI bits again match Bspec */ |
2129 | #define PORTD_HOTPLUG_LIVE_STATUS_VLV (1 << 27) |
2586 | #define PORTD_HOTPLUG_LIVE_STATUS_VLV (1 << 27) |
2130 | #define PORTC_HOTPLUG_LIVE_STATUS_VLV (1 << 28) |
2587 | #define PORTC_HOTPLUG_LIVE_STATUS_VLV (1 << 28) |
2131 | #define PORTB_HOTPLUG_LIVE_STATUS_VLV (1 << 29) |
2588 | #define PORTB_HOTPLUG_LIVE_STATUS_VLV (1 << 29) |
2132 | #define PORTD_HOTPLUG_INT_STATUS (3 << 21) |
2589 | #define PORTD_HOTPLUG_INT_STATUS (3 << 21) |
- | 2590 | #define PORTD_HOTPLUG_INT_LONG_PULSE (2 << 21) |
|
- | 2591 | #define PORTD_HOTPLUG_INT_SHORT_PULSE (1 << 21) |
|
2133 | #define PORTC_HOTPLUG_INT_STATUS (3 << 19) |
2592 | #define PORTC_HOTPLUG_INT_STATUS (3 << 19) |
- | 2593 | #define PORTC_HOTPLUG_INT_LONG_PULSE (2 << 19) |
|
- | 2594 | #define PORTC_HOTPLUG_INT_SHORT_PULSE (1 << 19) |
|
2134 | #define PORTB_HOTPLUG_INT_STATUS (3 << 17) |
2595 | #define PORTB_HOTPLUG_INT_STATUS (3 << 17) |
- | 2596 | #define PORTB_HOTPLUG_INT_LONG_PULSE (2 << 17) |
|
- | 2597 | #define PORTB_HOTPLUG_INT_SHORT_PLUSE (1 << 17) |
|
2135 | /* CRT/TV common between gen3+ */ |
2598 | /* CRT/TV common between gen3+ */ |
2136 | #define CRT_HOTPLUG_INT_STATUS (1 << 11) |
2599 | #define CRT_HOTPLUG_INT_STATUS (1 << 11) |
2137 | #define TV_HOTPLUG_INT_STATUS (1 << 10) |
2600 | #define TV_HOTPLUG_INT_STATUS (1 << 10) |
2138 | #define CRT_HOTPLUG_MONITOR_MASK (3 << 8) |
2601 | #define CRT_HOTPLUG_MONITOR_MASK (3 << 8) |
2139 | #define CRT_HOTPLUG_MONITOR_COLOR (3 << 8) |
2602 | #define CRT_HOTPLUG_MONITOR_COLOR (3 << 8) |
Line 2175... | Line 2638... | ||
2175 | * The same register may be used for SDVO or HDMI */ |
2638 | * The same register may be used for SDVO or HDMI */ |
2176 | #define GEN3_SDVOB 0x61140 |
2639 | #define GEN3_SDVOB 0x61140 |
2177 | #define GEN3_SDVOC 0x61160 |
2640 | #define GEN3_SDVOC 0x61160 |
2178 | #define GEN4_HDMIB GEN3_SDVOB |
2641 | #define GEN4_HDMIB GEN3_SDVOB |
2179 | #define GEN4_HDMIC GEN3_SDVOC |
2642 | #define GEN4_HDMIC GEN3_SDVOC |
- | 2643 | #define CHV_HDMID 0x6116C |
|
2180 | #define PCH_SDVOB 0xe1140 |
2644 | #define PCH_SDVOB 0xe1140 |
2181 | #define PCH_HDMIB PCH_SDVOB |
2645 | #define PCH_HDMIB PCH_SDVOB |
2182 | #define PCH_HDMIC 0xe1150 |
2646 | #define PCH_HDMIC 0xe1150 |
2183 | #define PCH_HDMID 0xe1160 |
2647 | #define PCH_HDMID 0xe1160 |
Line 2184... | Line 2648... | ||
2184 | 2648 | ||
2185 | #define PORT_DFT_I9XX 0x61150 |
2649 | #define PORT_DFT_I9XX 0x61150 |
2186 | #define DC_BALANCE_RESET (1 << 25) |
2650 | #define DC_BALANCE_RESET (1 << 25) |
2187 | #define PORT_DFT2_G4X 0x61154 |
2651 | #define PORT_DFT2_G4X (dev_priv->info.display_mmio_offset + 0x61154) |
2188 | #define DC_BALANCE_RESET_VLV (1 << 31) |
2652 | #define DC_BALANCE_RESET_VLV (1 << 31) |
2189 | #define PIPE_SCRAMBLE_RESET_MASK (0x3 << 0) |
2653 | #define PIPE_SCRAMBLE_RESET_MASK (0x3 << 0) |
2190 | #define PIPE_B_SCRAMBLE_RESET (1 << 1) |
2654 | #define PIPE_B_SCRAMBLE_RESET (1 << 1) |
Line 2195... | Line 2659... | ||
2195 | #define SDVO_PIPE_SEL(pipe) ((pipe) << 30) |
2659 | #define SDVO_PIPE_SEL(pipe) ((pipe) << 30) |
2196 | #define SDVO_PIPE_SEL_MASK (1 << 30) |
2660 | #define SDVO_PIPE_SEL_MASK (1 << 30) |
2197 | #define SDVO_PIPE_B_SELECT (1 << 30) |
2661 | #define SDVO_PIPE_B_SELECT (1 << 30) |
2198 | #define SDVO_STALL_SELECT (1 << 29) |
2662 | #define SDVO_STALL_SELECT (1 << 29) |
2199 | #define SDVO_INTERRUPT_ENABLE (1 << 26) |
2663 | #define SDVO_INTERRUPT_ENABLE (1 << 26) |
2200 | /** |
2664 | /* |
2201 | * 915G/GM SDVO pixel multiplier. |
2665 | * 915G/GM SDVO pixel multiplier. |
2202 | * Programmed value is multiplier - 1, up to 5x. |
2666 | * Programmed value is multiplier - 1, up to 5x. |
2203 | * \sa DPLL_MD_UDI_MULTIPLIER_MASK |
2667 | * \sa DPLL_MD_UDI_MULTIPLIER_MASK |
2204 | */ |
2668 | */ |
2205 | #define SDVO_PORT_MULTIPLY_MASK (7 << 23) |
2669 | #define SDVO_PORT_MULTIPLY_MASK (7 << 23) |
Line 2235... | Line 2699... | ||
2235 | 2699 | ||
2236 | /* Gen 6 (CPT) SDVO/HDMI bits: */ |
2700 | /* Gen 6 (CPT) SDVO/HDMI bits: */ |
2237 | #define SDVO_PIPE_SEL_CPT(pipe) ((pipe) << 29) |
2701 | #define SDVO_PIPE_SEL_CPT(pipe) ((pipe) << 29) |
Line -... | Line 2702... | ||
- | 2702 | #define SDVO_PIPE_SEL_MASK_CPT (3 << 29) |
|
- | 2703 | ||
- | 2704 | /* CHV SDVO/HDMI bits: */ |
|
- | 2705 | #define SDVO_PIPE_SEL_CHV(pipe) ((pipe) << 24) |
|
Line 2238... | Line 2706... | ||
2238 | #define SDVO_PIPE_SEL_MASK_CPT (3 << 29) |
2706 | #define SDVO_PIPE_SEL_MASK_CHV (3 << 24) |
2239 | 2707 | ||
2240 | 2708 | ||
2241 | /* DVO port control */ |
2709 | /* DVO port control */ |
Line 2330... | Line 2798... | ||
2330 | #define VIDEO_DIP_DATA_SIZE 32 |
2798 | #define VIDEO_DIP_DATA_SIZE 32 |
2331 | #define VIDEO_DIP_VSC_DATA_SIZE 36 |
2799 | #define VIDEO_DIP_VSC_DATA_SIZE 36 |
2332 | #define VIDEO_DIP_CTL 0x61170 |
2800 | #define VIDEO_DIP_CTL 0x61170 |
2333 | /* Pre HSW: */ |
2801 | /* Pre HSW: */ |
2334 | #define VIDEO_DIP_ENABLE (1 << 31) |
2802 | #define VIDEO_DIP_ENABLE (1 << 31) |
2335 | #define VIDEO_DIP_PORT_B (1 << 29) |
- | |
2336 | #define VIDEO_DIP_PORT_C (2 << 29) |
- | |
2337 | #define VIDEO_DIP_PORT_D (3 << 29) |
2803 | #define VIDEO_DIP_PORT(port) ((port) << 29) |
2338 | #define VIDEO_DIP_PORT_MASK (3 << 29) |
2804 | #define VIDEO_DIP_PORT_MASK (3 << 29) |
2339 | #define VIDEO_DIP_ENABLE_GCP (1 << 25) |
2805 | #define VIDEO_DIP_ENABLE_GCP (1 << 25) |
2340 | #define VIDEO_DIP_ENABLE_AVI (1 << 21) |
2806 | #define VIDEO_DIP_ENABLE_AVI (1 << 21) |
2341 | #define VIDEO_DIP_ENABLE_VENDOR (2 << 21) |
2807 | #define VIDEO_DIP_ENABLE_VENDOR (2 << 21) |
2342 | #define VIDEO_DIP_ENABLE_GAMUT (4 << 21) |
2808 | #define VIDEO_DIP_ENABLE_GAMUT (4 << 21) |
Line 2389... | Line 2855... | ||
2389 | #define PP_ON_DELAYS 0x61208 |
2855 | #define PP_ON_DELAYS 0x61208 |
2390 | #define PP_OFF_DELAYS 0x6120c |
2856 | #define PP_OFF_DELAYS 0x6120c |
2391 | #define PP_DIVISOR 0x61210 |
2857 | #define PP_DIVISOR 0x61210 |
Line 2392... | Line 2858... | ||
2392 | 2858 | ||
2393 | /* Panel fitting */ |
2859 | /* Panel fitting */ |
2394 | #define PFIT_CONTROL (dev_priv->info->display_mmio_offset + 0x61230) |
2860 | #define PFIT_CONTROL (dev_priv->info.display_mmio_offset + 0x61230) |
2395 | #define PFIT_ENABLE (1 << 31) |
2861 | #define PFIT_ENABLE (1 << 31) |
2396 | #define PFIT_PIPE_MASK (3 << 29) |
2862 | #define PFIT_PIPE_MASK (3 << 29) |
2397 | #define PFIT_PIPE_SHIFT 29 |
2863 | #define PFIT_PIPE_SHIFT 29 |
2398 | #define VERT_INTERP_DISABLE (0 << 10) |
2864 | #define VERT_INTERP_DISABLE (0 << 10) |
Line 2407... | Line 2873... | ||
2407 | #define PFIT_FILTER_FUZZY (0 << 24) |
2873 | #define PFIT_FILTER_FUZZY (0 << 24) |
2408 | #define PFIT_SCALING_AUTO (0 << 26) |
2874 | #define PFIT_SCALING_AUTO (0 << 26) |
2409 | #define PFIT_SCALING_PROGRAMMED (1 << 26) |
2875 | #define PFIT_SCALING_PROGRAMMED (1 << 26) |
2410 | #define PFIT_SCALING_PILLAR (2 << 26) |
2876 | #define PFIT_SCALING_PILLAR (2 << 26) |
2411 | #define PFIT_SCALING_LETTER (3 << 26) |
2877 | #define PFIT_SCALING_LETTER (3 << 26) |
2412 | #define PFIT_PGM_RATIOS (dev_priv->info->display_mmio_offset + 0x61234) |
2878 | #define PFIT_PGM_RATIOS (dev_priv->info.display_mmio_offset + 0x61234) |
2413 | /* Pre-965 */ |
2879 | /* Pre-965 */ |
2414 | #define PFIT_VERT_SCALE_SHIFT 20 |
2880 | #define PFIT_VERT_SCALE_SHIFT 20 |
2415 | #define PFIT_VERT_SCALE_MASK 0xfff00000 |
2881 | #define PFIT_VERT_SCALE_MASK 0xfff00000 |
2416 | #define PFIT_HORIZ_SCALE_SHIFT 4 |
2882 | #define PFIT_HORIZ_SCALE_SHIFT 4 |
2417 | #define PFIT_HORIZ_SCALE_MASK 0x0000fff0 |
2883 | #define PFIT_HORIZ_SCALE_MASK 0x0000fff0 |
Line 2419... | Line 2885... | ||
2419 | #define PFIT_VERT_SCALE_SHIFT_965 16 |
2885 | #define PFIT_VERT_SCALE_SHIFT_965 16 |
2420 | #define PFIT_VERT_SCALE_MASK_965 0x1fff0000 |
2886 | #define PFIT_VERT_SCALE_MASK_965 0x1fff0000 |
2421 | #define PFIT_HORIZ_SCALE_SHIFT_965 0 |
2887 | #define PFIT_HORIZ_SCALE_SHIFT_965 0 |
2422 | #define PFIT_HORIZ_SCALE_MASK_965 0x00001fff |
2888 | #define PFIT_HORIZ_SCALE_MASK_965 0x00001fff |
Line 2423... | Line 2889... | ||
2423 | 2889 | ||
Line 2424... | Line 2890... | ||
2424 | #define PFIT_AUTO_RATIOS (dev_priv->info->display_mmio_offset + 0x61238) |
2890 | #define PFIT_AUTO_RATIOS (dev_priv->info.display_mmio_offset + 0x61238) |
2425 | 2891 | ||
2426 | #define _VLV_BLC_PWM_CTL2_A (dev_priv->info->display_mmio_offset + 0x61250) |
2892 | #define _VLV_BLC_PWM_CTL2_A (dev_priv->info.display_mmio_offset + 0x61250) |
2427 | #define _VLV_BLC_PWM_CTL2_B (dev_priv->info->display_mmio_offset + 0x61350) |
2893 | #define _VLV_BLC_PWM_CTL2_B (dev_priv->info.display_mmio_offset + 0x61350) |
Line 2428... | Line 2894... | ||
2428 | #define VLV_BLC_PWM_CTL2(pipe) _PIPE(pipe, _VLV_BLC_PWM_CTL2_A, \ |
2894 | #define VLV_BLC_PWM_CTL2(pipe) _PIPE(pipe, _VLV_BLC_PWM_CTL2_A, \ |
2429 | _VLV_BLC_PWM_CTL2_B) |
2895 | _VLV_BLC_PWM_CTL2_B) |
2430 | 2896 | ||
2431 | #define _VLV_BLC_PWM_CTL_A (dev_priv->info->display_mmio_offset + 0x61254) |
2897 | #define _VLV_BLC_PWM_CTL_A (dev_priv->info.display_mmio_offset + 0x61254) |
Line 2432... | Line 2898... | ||
2432 | #define _VLV_BLC_PWM_CTL_B (dev_priv->info->display_mmio_offset + 0x61354) |
2898 | #define _VLV_BLC_PWM_CTL_B (dev_priv->info.display_mmio_offset + 0x61354) |
2433 | #define VLV_BLC_PWM_CTL(pipe) _PIPE(pipe, _VLV_BLC_PWM_CTL_A, \ |
2899 | #define VLV_BLC_PWM_CTL(pipe) _PIPE(pipe, _VLV_BLC_PWM_CTL_A, \ |
2434 | _VLV_BLC_PWM_CTL_B) |
2900 | _VLV_BLC_PWM_CTL_B) |
2435 | 2901 | ||
Line 2436... | Line 2902... | ||
2436 | #define _VLV_BLC_HIST_CTL_A (dev_priv->info->display_mmio_offset + 0x61260) |
2902 | #define _VLV_BLC_HIST_CTL_A (dev_priv->info.display_mmio_offset + 0x61260) |
2437 | #define _VLV_BLC_HIST_CTL_B (dev_priv->info->display_mmio_offset + 0x61360) |
2903 | #define _VLV_BLC_HIST_CTL_B (dev_priv->info.display_mmio_offset + 0x61360) |
2438 | #define VLV_BLC_HIST_CTL(pipe) _PIPE(pipe, _VLV_BLC_HIST_CTL_A, \ |
2904 | #define VLV_BLC_HIST_CTL(pipe) _PIPE(pipe, _VLV_BLC_HIST_CTL_A, \ |
2439 | _VLV_BLC_HIST_CTL_B) |
2905 | _VLV_BLC_HIST_CTL_B) |
2440 | 2906 | ||
2441 | /* Backlight control */ |
2907 | /* Backlight control */ |
2442 | #define BLC_PWM_CTL2 (dev_priv->info->display_mmio_offset + 0x61250) /* 965+ only */ |
2908 | #define BLC_PWM_CTL2 (dev_priv->info.display_mmio_offset + 0x61250) /* 965+ only */ |
Line 2460... | Line 2926... | ||
2460 | #define BLM_PHASE_IN_TIME_BASE_MASK (0xff << 16) |
2926 | #define BLM_PHASE_IN_TIME_BASE_MASK (0xff << 16) |
2461 | #define BLM_PHASE_IN_COUNT_SHIFT (8) |
2927 | #define BLM_PHASE_IN_COUNT_SHIFT (8) |
2462 | #define BLM_PHASE_IN_COUNT_MASK (0xff << 8) |
2928 | #define BLM_PHASE_IN_COUNT_MASK (0xff << 8) |
2463 | #define BLM_PHASE_IN_INCR_SHIFT (0) |
2929 | #define BLM_PHASE_IN_INCR_SHIFT (0) |
2464 | #define BLM_PHASE_IN_INCR_MASK (0xff << 0) |
2930 | #define BLM_PHASE_IN_INCR_MASK (0xff << 0) |
2465 | #define BLC_PWM_CTL (dev_priv->info->display_mmio_offset + 0x61254) |
2931 | #define BLC_PWM_CTL (dev_priv->info.display_mmio_offset + 0x61254) |
2466 | /* |
2932 | /* |
2467 | * This is the most significant 15 bits of the number of backlight cycles in a |
2933 | * This is the most significant 15 bits of the number of backlight cycles in a |
2468 | * complete cycle of the modulated backlight control. |
2934 | * complete cycle of the modulated backlight control. |
2469 | * |
2935 | * |
2470 | * The actual value is this field multiplied by two. |
2936 | * The actual value is this field multiplied by two. |
Line 2482... | Line 2948... | ||
2482 | #define BACKLIGHT_DUTY_CYCLE_SHIFT (0) |
2948 | #define BACKLIGHT_DUTY_CYCLE_SHIFT (0) |
2483 | #define BACKLIGHT_DUTY_CYCLE_MASK (0xffff) |
2949 | #define BACKLIGHT_DUTY_CYCLE_MASK (0xffff) |
2484 | #define BACKLIGHT_DUTY_CYCLE_MASK_PNV (0xfffe) |
2950 | #define BACKLIGHT_DUTY_CYCLE_MASK_PNV (0xfffe) |
2485 | #define BLM_POLARITY_PNV (1 << 0) /* pnv only */ |
2951 | #define BLM_POLARITY_PNV (1 << 0) /* pnv only */ |
Line 2486... | Line 2952... | ||
2486 | 2952 | ||
Line 2487... | Line 2953... | ||
2487 | #define BLC_HIST_CTL (dev_priv->info->display_mmio_offset + 0x61260) |
2953 | #define BLC_HIST_CTL (dev_priv->info.display_mmio_offset + 0x61260) |
2488 | 2954 | ||
2489 | /* New registers for PCH-split platforms. Safe where new bits show up, the |
2955 | /* New registers for PCH-split platforms. Safe where new bits show up, the |
2490 | * register layout machtes with gen4 BLC_PWM_CTL[12]. */ |
2956 | * register layout machtes with gen4 BLC_PWM_CTL[12]. */ |
Line 2507... | Line 2973... | ||
2507 | #define PCH_GTC_CTL 0xe7000 |
2973 | #define PCH_GTC_CTL 0xe7000 |
2508 | #define PCH_GTC_ENABLE (1 << 31) |
2974 | #define PCH_GTC_ENABLE (1 << 31) |
Line 2509... | Line 2975... | ||
2509 | 2975 | ||
2510 | /* TV port control */ |
2976 | /* TV port control */ |
2511 | #define TV_CTL 0x68000 |
2977 | #define TV_CTL 0x68000 |
2512 | /** Enables the TV encoder */ |
2978 | /* Enables the TV encoder */ |
2513 | # define TV_ENC_ENABLE (1 << 31) |
2979 | # define TV_ENC_ENABLE (1 << 31) |
2514 | /** Sources the TV encoder input from pipe B instead of A. */ |
2980 | /* Sources the TV encoder input from pipe B instead of A. */ |
2515 | # define TV_ENC_PIPEB_SELECT (1 << 30) |
2981 | # define TV_ENC_PIPEB_SELECT (1 << 30) |
2516 | /** Outputs composite video (DAC A only) */ |
2982 | /* Outputs composite video (DAC A only) */ |
2517 | # define TV_ENC_OUTPUT_COMPOSITE (0 << 28) |
2983 | # define TV_ENC_OUTPUT_COMPOSITE (0 << 28) |
2518 | /** Outputs SVideo video (DAC B/C) */ |
2984 | /* Outputs SVideo video (DAC B/C) */ |
2519 | # define TV_ENC_OUTPUT_SVIDEO (1 << 28) |
2985 | # define TV_ENC_OUTPUT_SVIDEO (1 << 28) |
2520 | /** Outputs Component video (DAC A/B/C) */ |
2986 | /* Outputs Component video (DAC A/B/C) */ |
2521 | # define TV_ENC_OUTPUT_COMPONENT (2 << 28) |
2987 | # define TV_ENC_OUTPUT_COMPONENT (2 << 28) |
2522 | /** Outputs Composite and SVideo (DAC A/B/C) */ |
2988 | /* Outputs Composite and SVideo (DAC A/B/C) */ |
2523 | # define TV_ENC_OUTPUT_SVIDEO_COMPOSITE (3 << 28) |
2989 | # define TV_ENC_OUTPUT_SVIDEO_COMPOSITE (3 << 28) |
2524 | # define TV_TRILEVEL_SYNC (1 << 21) |
2990 | # define TV_TRILEVEL_SYNC (1 << 21) |
2525 | /** Enables slow sync generation (945GM only) */ |
2991 | /* Enables slow sync generation (945GM only) */ |
2526 | # define TV_SLOW_SYNC (1 << 20) |
2992 | # define TV_SLOW_SYNC (1 << 20) |
2527 | /** Selects 4x oversampling for 480i and 576p */ |
2993 | /* Selects 4x oversampling for 480i and 576p */ |
2528 | # define TV_OVERSAMPLE_4X (0 << 18) |
2994 | # define TV_OVERSAMPLE_4X (0 << 18) |
2529 | /** Selects 2x oversampling for 720p and 1080i */ |
2995 | /* Selects 2x oversampling for 720p and 1080i */ |
2530 | # define TV_OVERSAMPLE_2X (1 << 18) |
2996 | # define TV_OVERSAMPLE_2X (1 << 18) |
2531 | /** Selects no oversampling for 1080p */ |
2997 | /* Selects no oversampling for 1080p */ |
2532 | # define TV_OVERSAMPLE_NONE (2 << 18) |
2998 | # define TV_OVERSAMPLE_NONE (2 << 18) |
2533 | /** Selects 8x oversampling */ |
2999 | /* Selects 8x oversampling */ |
2534 | # define TV_OVERSAMPLE_8X (3 << 18) |
3000 | # define TV_OVERSAMPLE_8X (3 << 18) |
2535 | /** Selects progressive mode rather than interlaced */ |
3001 | /* Selects progressive mode rather than interlaced */ |
2536 | # define TV_PROGRESSIVE (1 << 17) |
3002 | # define TV_PROGRESSIVE (1 << 17) |
2537 | /** Sets the colorburst to PAL mode. Required for non-M PAL modes. */ |
3003 | /* Sets the colorburst to PAL mode. Required for non-M PAL modes. */ |
2538 | # define TV_PAL_BURST (1 << 16) |
3004 | # define TV_PAL_BURST (1 << 16) |
2539 | /** Field for setting delay of Y compared to C */ |
3005 | /* Field for setting delay of Y compared to C */ |
2540 | # define TV_YC_SKEW_MASK (7 << 12) |
3006 | # define TV_YC_SKEW_MASK (7 << 12) |
2541 | /** Enables a fix for 480p/576p standard definition modes on the 915GM only */ |
3007 | /* Enables a fix for 480p/576p standard definition modes on the 915GM only */ |
2542 | # define TV_ENC_SDP_FIX (1 << 11) |
3008 | # define TV_ENC_SDP_FIX (1 << 11) |
2543 | /** |
3009 | /* |
2544 | * Enables a fix for the 915GM only. |
3010 | * Enables a fix for the 915GM only. |
2545 | * |
3011 | * |
2546 | * Not sure what it does. |
3012 | * Not sure what it does. |
2547 | */ |
3013 | */ |
2548 | # define TV_ENC_C0_FIX (1 << 10) |
3014 | # define TV_ENC_C0_FIX (1 << 10) |
2549 | /** Bits that must be preserved by software */ |
3015 | /* Bits that must be preserved by software */ |
2550 | # define TV_CTL_SAVE ((1 << 11) | (3 << 9) | (7 << 6) | 0xf) |
3016 | # define TV_CTL_SAVE ((1 << 11) | (3 << 9) | (7 << 6) | 0xf) |
2551 | # define TV_FUSE_STATE_MASK (3 << 4) |
3017 | # define TV_FUSE_STATE_MASK (3 << 4) |
2552 | /** Read-only state that reports all features enabled */ |
3018 | /* Read-only state that reports all features enabled */ |
2553 | # define TV_FUSE_STATE_ENABLED (0 << 4) |
3019 | # define TV_FUSE_STATE_ENABLED (0 << 4) |
2554 | /** Read-only state that reports that Macrovision is disabled in hardware*/ |
3020 | /* Read-only state that reports that Macrovision is disabled in hardware*/ |
2555 | # define TV_FUSE_STATE_NO_MACROVISION (1 << 4) |
3021 | # define TV_FUSE_STATE_NO_MACROVISION (1 << 4) |
2556 | /** Read-only state that reports that TV-out is disabled in hardware. */ |
3022 | /* Read-only state that reports that TV-out is disabled in hardware. */ |
2557 | # define TV_FUSE_STATE_DISABLED (2 << 4) |
3023 | # define TV_FUSE_STATE_DISABLED (2 << 4) |
2558 | /** Normal operation */ |
3024 | /* Normal operation */ |
2559 | # define TV_TEST_MODE_NORMAL (0 << 0) |
3025 | # define TV_TEST_MODE_NORMAL (0 << 0) |
2560 | /** Encoder test pattern 1 - combo pattern */ |
3026 | /* Encoder test pattern 1 - combo pattern */ |
2561 | # define TV_TEST_MODE_PATTERN_1 (1 << 0) |
3027 | # define TV_TEST_MODE_PATTERN_1 (1 << 0) |
2562 | /** Encoder test pattern 2 - full screen vertical 75% color bars */ |
3028 | /* Encoder test pattern 2 - full screen vertical 75% color bars */ |
2563 | # define TV_TEST_MODE_PATTERN_2 (2 << 0) |
3029 | # define TV_TEST_MODE_PATTERN_2 (2 << 0) |
2564 | /** Encoder test pattern 3 - full screen horizontal 75% color bars */ |
3030 | /* Encoder test pattern 3 - full screen horizontal 75% color bars */ |
2565 | # define TV_TEST_MODE_PATTERN_3 (3 << 0) |
3031 | # define TV_TEST_MODE_PATTERN_3 (3 << 0) |
2566 | /** Encoder test pattern 4 - random noise */ |
3032 | /* Encoder test pattern 4 - random noise */ |
2567 | # define TV_TEST_MODE_PATTERN_4 (4 << 0) |
3033 | # define TV_TEST_MODE_PATTERN_4 (4 << 0) |
2568 | /** Encoder test pattern 5 - linear color ramps */ |
3034 | /* Encoder test pattern 5 - linear color ramps */ |
2569 | # define TV_TEST_MODE_PATTERN_5 (5 << 0) |
3035 | # define TV_TEST_MODE_PATTERN_5 (5 << 0) |
2570 | /** |
3036 | /* |
2571 | * This test mode forces the DACs to 50% of full output. |
3037 | * This test mode forces the DACs to 50% of full output. |
2572 | * |
3038 | * |
2573 | * This is used for load detection in combination with TVDAC_SENSE_MASK |
3039 | * This is used for load detection in combination with TVDAC_SENSE_MASK |
2574 | */ |
3040 | */ |
2575 | # define TV_TEST_MODE_MONITOR_DETECT (7 << 0) |
3041 | # define TV_TEST_MODE_MONITOR_DETECT (7 << 0) |
Line 2576... | Line 3042... | ||
2576 | # define TV_TEST_MODE_MASK (7 << 0) |
3042 | # define TV_TEST_MODE_MASK (7 << 0) |
2577 | 3043 | ||
2578 | #define TV_DAC 0x68004 |
3044 | #define TV_DAC 0x68004 |
2579 | # define TV_DAC_SAVE 0x00ffff00 |
3045 | # define TV_DAC_SAVE 0x00ffff00 |
2580 | /** |
3046 | /* |
2581 | * Reports that DAC state change logic has reported change (RO). |
3047 | * Reports that DAC state change logic has reported change (RO). |
2582 | * |
3048 | * |
2583 | * This gets cleared when TV_DAC_STATE_EN is cleared |
3049 | * This gets cleared when TV_DAC_STATE_EN is cleared |
2584 | */ |
3050 | */ |
2585 | # define TVDAC_STATE_CHG (1 << 31) |
3051 | # define TVDAC_STATE_CHG (1 << 31) |
2586 | # define TVDAC_SENSE_MASK (7 << 28) |
3052 | # define TVDAC_SENSE_MASK (7 << 28) |
2587 | /** Reports that DAC A voltage is above the detect threshold */ |
3053 | /* Reports that DAC A voltage is above the detect threshold */ |
2588 | # define TVDAC_A_SENSE (1 << 30) |
3054 | # define TVDAC_A_SENSE (1 << 30) |
2589 | /** Reports that DAC B voltage is above the detect threshold */ |
3055 | /* Reports that DAC B voltage is above the detect threshold */ |
2590 | # define TVDAC_B_SENSE (1 << 29) |
3056 | # define TVDAC_B_SENSE (1 << 29) |
2591 | /** Reports that DAC C voltage is above the detect threshold */ |
3057 | /* Reports that DAC C voltage is above the detect threshold */ |
2592 | # define TVDAC_C_SENSE (1 << 28) |
3058 | # define TVDAC_C_SENSE (1 << 28) |
2593 | /** |
3059 | /* |
2594 | * Enables DAC state detection logic, for load-based TV detection. |
3060 | * Enables DAC state detection logic, for load-based TV detection. |
2595 | * |
3061 | * |
2596 | * The PLL of the chosen pipe (in TV_CTL) must be running, and the encoder set |
3062 | * The PLL of the chosen pipe (in TV_CTL) must be running, and the encoder set |
2597 | * to off, for load detection to work. |
3063 | * to off, for load detection to work. |
2598 | */ |
3064 | */ |
2599 | # define TVDAC_STATE_CHG_EN (1 << 27) |
3065 | # define TVDAC_STATE_CHG_EN (1 << 27) |
2600 | /** Sets the DAC A sense value to high */ |
3066 | /* Sets the DAC A sense value to high */ |
2601 | # define TVDAC_A_SENSE_CTL (1 << 26) |
3067 | # define TVDAC_A_SENSE_CTL (1 << 26) |
2602 | /** Sets the DAC B sense value to high */ |
3068 | /* Sets the DAC B sense value to high */ |
2603 | # define TVDAC_B_SENSE_CTL (1 << 25) |
3069 | # define TVDAC_B_SENSE_CTL (1 << 25) |
2604 | /** Sets the DAC C sense value to high */ |
3070 | /* Sets the DAC C sense value to high */ |
2605 | # define TVDAC_C_SENSE_CTL (1 << 24) |
3071 | # define TVDAC_C_SENSE_CTL (1 << 24) |
2606 | /** Overrides the ENC_ENABLE and DAC voltage levels */ |
3072 | /* Overrides the ENC_ENABLE and DAC voltage levels */ |
2607 | # define DAC_CTL_OVERRIDE (1 << 7) |
3073 | # define DAC_CTL_OVERRIDE (1 << 7) |
2608 | /** Sets the slew rate. Must be preserved in software */ |
3074 | /* Sets the slew rate. Must be preserved in software */ |
2609 | # define ENC_TVDAC_SLEW_FAST (1 << 6) |
3075 | # define ENC_TVDAC_SLEW_FAST (1 << 6) |
2610 | # define DAC_A_1_3_V (0 << 4) |
3076 | # define DAC_A_1_3_V (0 << 4) |
2611 | # define DAC_A_1_1_V (1 << 4) |
3077 | # define DAC_A_1_1_V (1 << 4) |
Line 2618... | Line 3084... | ||
2618 | # define DAC_C_1_3_V (0 << 0) |
3084 | # define DAC_C_1_3_V (0 << 0) |
2619 | # define DAC_C_1_1_V (1 << 0) |
3085 | # define DAC_C_1_1_V (1 << 0) |
2620 | # define DAC_C_0_7_V (2 << 0) |
3086 | # define DAC_C_0_7_V (2 << 0) |
2621 | # define DAC_C_MASK (3 << 0) |
3087 | # define DAC_C_MASK (3 << 0) |
Line 2622... | Line 3088... | ||
2622 | 3088 | ||
2623 | /** |
3089 | /* |
2624 | * CSC coefficients are stored in a floating point format with 9 bits of |
3090 | * CSC coefficients are stored in a floating point format with 9 bits of |
2625 | * mantissa and 2 or 3 bits of exponent. The exponent is represented as 2**-n, |
3091 | * mantissa and 2 or 3 bits of exponent. The exponent is represented as 2**-n, |
2626 | * where 2-bit exponents are unsigned n, and 3-bit exponents are signed n with |
3092 | * where 2-bit exponents are unsigned n, and 3-bit exponents are signed n with |
2627 | * -1 (0x3) being the only legal negative value. |
3093 | * -1 (0x3) being the only legal negative value. |
Line 2633... | Line 3099... | ||
2633 | # define TV_GY_SHIFT 0 |
3099 | # define TV_GY_SHIFT 0 |
Line 2634... | Line 3100... | ||
2634 | 3100 | ||
2635 | #define TV_CSC_Y2 0x68014 |
3101 | #define TV_CSC_Y2 0x68014 |
2636 | # define TV_BY_MASK 0x07ff0000 |
3102 | # define TV_BY_MASK 0x07ff0000 |
2637 | # define TV_BY_SHIFT 16 |
3103 | # define TV_BY_SHIFT 16 |
2638 | /** |
3104 | /* |
2639 | * Y attenuation for component video. |
3105 | * Y attenuation for component video. |
2640 | * |
3106 | * |
2641 | * Stored in 1.9 fixed point. |
3107 | * Stored in 1.9 fixed point. |
2642 | */ |
3108 | */ |
Line 2650... | Line 3116... | ||
2650 | # define TV_GU_SHIFT 0 |
3116 | # define TV_GU_SHIFT 0 |
Line 2651... | Line 3117... | ||
2651 | 3117 | ||
2652 | #define TV_CSC_U2 0x6801c |
3118 | #define TV_CSC_U2 0x6801c |
2653 | # define TV_BU_MASK 0x07ff0000 |
3119 | # define TV_BU_MASK 0x07ff0000 |
2654 | # define TV_BU_SHIFT 16 |
3120 | # define TV_BU_SHIFT 16 |
2655 | /** |
3121 | /* |
2656 | * U attenuation for component video. |
3122 | * U attenuation for component video. |
2657 | * |
3123 | * |
2658 | * Stored in 1.9 fixed point. |
3124 | * Stored in 1.9 fixed point. |
2659 | */ |
3125 | */ |
Line 2667... | Line 3133... | ||
2667 | # define TV_GV_SHIFT 0 |
3133 | # define TV_GV_SHIFT 0 |
Line 2668... | Line 3134... | ||
2668 | 3134 | ||
2669 | #define TV_CSC_V2 0x68024 |
3135 | #define TV_CSC_V2 0x68024 |
2670 | # define TV_BV_MASK 0x07ff0000 |
3136 | # define TV_BV_MASK 0x07ff0000 |
2671 | # define TV_BV_SHIFT 16 |
3137 | # define TV_BV_SHIFT 16 |
2672 | /** |
3138 | /* |
2673 | * V attenuation for component video. |
3139 | * V attenuation for component video. |
2674 | * |
3140 | * |
2675 | * Stored in 1.9 fixed point. |
3141 | * Stored in 1.9 fixed point. |
2676 | */ |
3142 | */ |
2677 | # define TV_AV_MASK 0x000007ff |
3143 | # define TV_AV_MASK 0x000007ff |
Line 2678... | Line 3144... | ||
2678 | # define TV_AV_SHIFT 0 |
3144 | # define TV_AV_SHIFT 0 |
2679 | 3145 | ||
2680 | #define TV_CLR_KNOBS 0x68028 |
3146 | #define TV_CLR_KNOBS 0x68028 |
2681 | /** 2s-complement brightness adjustment */ |
3147 | /* 2s-complement brightness adjustment */ |
2682 | # define TV_BRIGHTNESS_MASK 0xff000000 |
3148 | # define TV_BRIGHTNESS_MASK 0xff000000 |
2683 | # define TV_BRIGHTNESS_SHIFT 24 |
3149 | # define TV_BRIGHTNESS_SHIFT 24 |
2684 | /** Contrast adjustment, as a 2.6 unsigned floating point number */ |
3150 | /* Contrast adjustment, as a 2.6 unsigned floating point number */ |
2685 | # define TV_CONTRAST_MASK 0x00ff0000 |
3151 | # define TV_CONTRAST_MASK 0x00ff0000 |
2686 | # define TV_CONTRAST_SHIFT 16 |
3152 | # define TV_CONTRAST_SHIFT 16 |
2687 | /** Saturation adjustment, as a 2.6 unsigned floating point number */ |
3153 | /* Saturation adjustment, as a 2.6 unsigned floating point number */ |
2688 | # define TV_SATURATION_MASK 0x0000ff00 |
3154 | # define TV_SATURATION_MASK 0x0000ff00 |
2689 | # define TV_SATURATION_SHIFT 8 |
3155 | # define TV_SATURATION_SHIFT 8 |
2690 | /** Hue adjustment, as an integer phase angle in degrees */ |
3156 | /* Hue adjustment, as an integer phase angle in degrees */ |
Line 2691... | Line 3157... | ||
2691 | # define TV_HUE_MASK 0x000000ff |
3157 | # define TV_HUE_MASK 0x000000ff |
2692 | # define TV_HUE_SHIFT 0 |
3158 | # define TV_HUE_SHIFT 0 |
2693 | 3159 | ||
2694 | #define TV_CLR_LEVEL 0x6802c |
3160 | #define TV_CLR_LEVEL 0x6802c |
2695 | /** Controls the DAC level for black */ |
3161 | /* Controls the DAC level for black */ |
2696 | # define TV_BLACK_LEVEL_MASK 0x01ff0000 |
3162 | # define TV_BLACK_LEVEL_MASK 0x01ff0000 |
2697 | # define TV_BLACK_LEVEL_SHIFT 16 |
3163 | # define TV_BLACK_LEVEL_SHIFT 16 |
Line 2698... | Line 3164... | ||
2698 | /** Controls the DAC level for blanking */ |
3164 | /* Controls the DAC level for blanking */ |
2699 | # define TV_BLANK_LEVEL_MASK 0x000001ff |
3165 | # define TV_BLANK_LEVEL_MASK 0x000001ff |
2700 | # define TV_BLANK_LEVEL_SHIFT 0 |
3166 | # define TV_BLANK_LEVEL_SHIFT 0 |
2701 | 3167 | ||
2702 | #define TV_H_CTL_1 0x68030 |
3168 | #define TV_H_CTL_1 0x68030 |
2703 | /** Number of pixels in the hsync. */ |
3169 | /* Number of pixels in the hsync. */ |
2704 | # define TV_HSYNC_END_MASK 0x1fff0000 |
3170 | # define TV_HSYNC_END_MASK 0x1fff0000 |
Line 2705... | Line 3171... | ||
2705 | # define TV_HSYNC_END_SHIFT 16 |
3171 | # define TV_HSYNC_END_SHIFT 16 |
2706 | /** Total number of pixels minus one in the line (display and blanking). */ |
3172 | /* Total number of pixels minus one in the line (display and blanking). */ |
2707 | # define TV_HTOTAL_MASK 0x00001fff |
3173 | # define TV_HTOTAL_MASK 0x00001fff |
2708 | # define TV_HTOTAL_SHIFT 0 |
3174 | # define TV_HTOTAL_SHIFT 0 |
2709 | 3175 | ||
2710 | #define TV_H_CTL_2 0x68034 |
3176 | #define TV_H_CTL_2 0x68034 |
2711 | /** Enables the colorburst (needed for non-component color) */ |
3177 | /* Enables the colorburst (needed for non-component color) */ |
2712 | # define TV_BURST_ENA (1 << 31) |
3178 | # define TV_BURST_ENA (1 << 31) |
2713 | /** Offset of the colorburst from the start of hsync, in pixels minus one. */ |
3179 | /* Offset of the colorburst from the start of hsync, in pixels minus one. */ |
Line 2714... | Line 3180... | ||
2714 | # define TV_HBURST_START_SHIFT 16 |
3180 | # define TV_HBURST_START_SHIFT 16 |
2715 | # define TV_HBURST_START_MASK 0x1fff0000 |
3181 | # define TV_HBURST_START_MASK 0x1fff0000 |
2716 | /** Length of the colorburst */ |
3182 | /* Length of the colorburst */ |
2717 | # define TV_HBURST_LEN_SHIFT 0 |
3183 | # define TV_HBURST_LEN_SHIFT 0 |
2718 | # define TV_HBURST_LEN_MASK 0x0001fff |
3184 | # define TV_HBURST_LEN_MASK 0x0001fff |
2719 | 3185 | ||
2720 | #define TV_H_CTL_3 0x68038 |
3186 | #define TV_H_CTL_3 0x68038 |
Line 2721... | Line 3187... | ||
2721 | /** End of hblank, measured in pixels minus one from start of hsync */ |
3187 | /* End of hblank, measured in pixels minus one from start of hsync */ |
2722 | # define TV_HBLANK_END_SHIFT 16 |
3188 | # define TV_HBLANK_END_SHIFT 16 |
2723 | # define TV_HBLANK_END_MASK 0x1fff0000 |
3189 | # define TV_HBLANK_END_MASK 0x1fff0000 |
2724 | /** Start of hblank, measured in pixels minus one from start of hsync */ |
3190 | /* Start of hblank, measured in pixels minus one from start of hsync */ |
2725 | # define TV_HBLANK_START_SHIFT 0 |
3191 | # define TV_HBLANK_START_SHIFT 0 |
2726 | # define TV_HBLANK_START_MASK 0x0001fff |
3192 | # define TV_HBLANK_START_MASK 0x0001fff |
2727 | 3193 | ||
2728 | #define TV_V_CTL_1 0x6803c |
3194 | #define TV_V_CTL_1 0x6803c |
2729 | /** XXX */ |
3195 | /* XXX */ |
2730 | # define TV_NBR_END_SHIFT 16 |
3196 | # define TV_NBR_END_SHIFT 16 |
Line 2731... | Line 3197... | ||
2731 | # define TV_NBR_END_MASK 0x07ff0000 |
3197 | # define TV_NBR_END_MASK 0x07ff0000 |
2732 | /** XXX */ |
3198 | /* XXX */ |
2733 | # define TV_VI_END_F1_SHIFT 8 |
3199 | # define TV_VI_END_F1_SHIFT 8 |
2734 | # define TV_VI_END_F1_MASK 0x00003f00 |
3200 | # define TV_VI_END_F1_MASK 0x00003f00 |
2735 | /** XXX */ |
3201 | /* XXX */ |
2736 | # define TV_VI_END_F2_SHIFT 0 |
3202 | # define TV_VI_END_F2_SHIFT 0 |
2737 | # define TV_VI_END_F2_MASK 0x0000003f |
3203 | # define TV_VI_END_F2_MASK 0x0000003f |
2738 | 3204 | ||
2739 | #define TV_V_CTL_2 0x68040 |
3205 | #define TV_V_CTL_2 0x68040 |
2740 | /** Length of vsync, in half lines */ |
3206 | /* Length of vsync, in half lines */ |
2741 | # define TV_VSYNC_LEN_MASK 0x07ff0000 |
3207 | # define TV_VSYNC_LEN_MASK 0x07ff0000 |
2742 | # define TV_VSYNC_LEN_SHIFT 16 |
3208 | # define TV_VSYNC_LEN_SHIFT 16 |
2743 | /** Offset of the start of vsync in field 1, measured in one less than the |
3209 | /* Offset of the start of vsync in field 1, measured in one less than the |
2744 | * number of half lines. |
3210 | * number of half lines. |
2745 | */ |
3211 | */ |
Line 2746... | Line 3212... | ||
2746 | # define TV_VSYNC_START_F1_MASK 0x00007f00 |
3212 | # define TV_VSYNC_START_F1_MASK 0x00007f00 |
2747 | # define TV_VSYNC_START_F1_SHIFT 8 |
3213 | # define TV_VSYNC_START_F1_SHIFT 8 |
2748 | /** |
3214 | /* |
2749 | * Offset of the start of vsync in field 2, measured in one less than the |
3215 | * Offset of the start of vsync in field 2, measured in one less than the |
2750 | * number of half lines. |
3216 | * number of half lines. |
2751 | */ |
3217 | */ |
2752 | # define TV_VSYNC_START_F2_MASK 0x0000007f |
3218 | # define TV_VSYNC_START_F2_MASK 0x0000007f |
2753 | # define TV_VSYNC_START_F2_SHIFT 0 |
3219 | # define TV_VSYNC_START_F2_SHIFT 0 |
2754 | 3220 | ||
2755 | #define TV_V_CTL_3 0x68044 |
3221 | #define TV_V_CTL_3 0x68044 |
2756 | /** Enables generation of the equalization signal */ |
3222 | /* Enables generation of the equalization signal */ |
2757 | # define TV_EQUAL_ENA (1 << 31) |
3223 | # define TV_EQUAL_ENA (1 << 31) |
2758 | /** Length of vsync, in half lines */ |
3224 | /* Length of vsync, in half lines */ |
2759 | # define TV_VEQ_LEN_MASK 0x007f0000 |
3225 | # define TV_VEQ_LEN_MASK 0x007f0000 |
2760 | # define TV_VEQ_LEN_SHIFT 16 |
3226 | # define TV_VEQ_LEN_SHIFT 16 |
2761 | /** Offset of the start of equalization in field 1, measured in one less than |
3227 | /* Offset of the start of equalization in field 1, measured in one less than |
2762 | * the number of half lines. |
3228 | * the number of half lines. |
Line 2763... | Line 3229... | ||
2763 | */ |
3229 | */ |
2764 | # define TV_VEQ_START_F1_MASK 0x0007f00 |
3230 | # define TV_VEQ_START_F1_MASK 0x0007f00 |
2765 | # define TV_VEQ_START_F1_SHIFT 8 |
3231 | # define TV_VEQ_START_F1_SHIFT 8 |
2766 | /** |
3232 | /* |
2767 | * Offset of the start of equalization in field 2, measured in one less than |
3233 | * Offset of the start of equalization in field 2, measured in one less than |
2768 | * the number of half lines. |
3234 | * the number of half lines. |
2769 | */ |
3235 | */ |
2770 | # define TV_VEQ_START_F2_MASK 0x000007f |
3236 | # define TV_VEQ_START_F2_MASK 0x000007f |
2771 | # define TV_VEQ_START_F2_SHIFT 0 |
3237 | # define TV_VEQ_START_F2_SHIFT 0 |
2772 | 3238 | ||
2773 | #define TV_V_CTL_4 0x68048 |
3239 | #define TV_V_CTL_4 0x68048 |
2774 | /** |
3240 | /* |
2775 | * Offset to start of vertical colorburst, measured in one less than the |
3241 | * Offset to start of vertical colorburst, measured in one less than the |
Line 2776... | Line 3242... | ||
2776 | * number of lines from vertical start. |
3242 | * number of lines from vertical start. |
2777 | */ |
3243 | */ |
2778 | # define TV_VBURST_START_F1_MASK 0x003f0000 |
3244 | # define TV_VBURST_START_F1_MASK 0x003f0000 |
2779 | # define TV_VBURST_START_F1_SHIFT 16 |
3245 | # define TV_VBURST_START_F1_SHIFT 16 |
2780 | /** |
3246 | /* |
2781 | * Offset to the end of vertical colorburst, measured in one less than the |
3247 | * Offset to the end of vertical colorburst, measured in one less than the |
2782 | * number of lines from the start of NBR. |
3248 | * number of lines from the start of NBR. |
2783 | */ |
3249 | */ |
2784 | # define TV_VBURST_END_F1_MASK 0x000000ff |
3250 | # define TV_VBURST_END_F1_MASK 0x000000ff |
2785 | # define TV_VBURST_END_F1_SHIFT 0 |
3251 | # define TV_VBURST_END_F1_SHIFT 0 |
2786 | 3252 | ||
2787 | #define TV_V_CTL_5 0x6804c |
3253 | #define TV_V_CTL_5 0x6804c |
2788 | /** |
3254 | /* |
Line 2789... | Line 3255... | ||
2789 | * Offset to start of vertical colorburst, measured in one less than the |
3255 | * Offset to start of vertical colorburst, measured in one less than the |
2790 | * number of lines from vertical start. |
3256 | * number of lines from vertical start. |
2791 | */ |
3257 | */ |
2792 | # define TV_VBURST_START_F2_MASK 0x003f0000 |
3258 | # define TV_VBURST_START_F2_MASK 0x003f0000 |
2793 | # define TV_VBURST_START_F2_SHIFT 16 |
3259 | # define TV_VBURST_START_F2_SHIFT 16 |
2794 | /** |
3260 | /* |
2795 | * Offset to the end of vertical colorburst, measured in one less than the |
3261 | * Offset to the end of vertical colorburst, measured in one less than the |
2796 | * number of lines from the start of NBR. |
3262 | * number of lines from the start of NBR. |
2797 | */ |
3263 | */ |
2798 | # define TV_VBURST_END_F2_MASK 0x000000ff |
3264 | # define TV_VBURST_END_F2_MASK 0x000000ff |
2799 | # define TV_VBURST_END_F2_SHIFT 0 |
3265 | # define TV_VBURST_END_F2_SHIFT 0 |
2800 | 3266 | ||
2801 | #define TV_V_CTL_6 0x68050 |
3267 | #define TV_V_CTL_6 0x68050 |
Line 2802... | Line 3268... | ||
2802 | /** |
3268 | /* |
2803 | * Offset to start of vertical colorburst, measured in one less than the |
3269 | * Offset to start of vertical colorburst, measured in one less than the |
2804 | * number of lines from vertical start. |
3270 | * number of lines from vertical start. |
2805 | */ |
3271 | */ |
2806 | # define TV_VBURST_START_F3_MASK 0x003f0000 |
3272 | # define TV_VBURST_START_F3_MASK 0x003f0000 |
2807 | # define TV_VBURST_START_F3_SHIFT 16 |
3273 | # define TV_VBURST_START_F3_SHIFT 16 |
2808 | /** |
3274 | /* |
2809 | * Offset to the end of vertical colorburst, measured in one less than the |
3275 | * Offset to the end of vertical colorburst, measured in one less than the |
2810 | * number of lines from the start of NBR. |
3276 | * number of lines from the start of NBR. |
2811 | */ |
3277 | */ |
2812 | # define TV_VBURST_END_F3_MASK 0x000000ff |
3278 | # define TV_VBURST_END_F3_MASK 0x000000ff |
2813 | # define TV_VBURST_END_F3_SHIFT 0 |
3279 | # define TV_VBURST_END_F3_SHIFT 0 |
2814 | 3280 | ||
Line 2815... | Line 3281... | ||
2815 | #define TV_V_CTL_7 0x68054 |
3281 | #define TV_V_CTL_7 0x68054 |
2816 | /** |
3282 | /* |
2817 | * Offset to start of vertical colorburst, measured in one less than the |
3283 | * Offset to start of vertical colorburst, measured in one less than the |
2818 | * number of lines from vertical start. |
3284 | * number of lines from vertical start. |
2819 | */ |
3285 | */ |
2820 | # define TV_VBURST_START_F4_MASK 0x003f0000 |
3286 | # define TV_VBURST_START_F4_MASK 0x003f0000 |
2821 | # define TV_VBURST_START_F4_SHIFT 16 |
3287 | # define TV_VBURST_START_F4_SHIFT 16 |
2822 | /** |
3288 | /* |
2823 | * Offset to the end of vertical colorburst, measured in one less than the |
3289 | * Offset to the end of vertical colorburst, measured in one less than the |
2824 | * number of lines from the start of NBR. |
3290 | * number of lines from the start of NBR. |
2825 | */ |
3291 | */ |
2826 | # define TV_VBURST_END_F4_MASK 0x000000ff |
3292 | # define TV_VBURST_END_F4_MASK 0x000000ff |
2827 | # define TV_VBURST_END_F4_SHIFT 0 |
3293 | # define TV_VBURST_END_F4_SHIFT 0 |
2828 | 3294 | ||
2829 | #define TV_SC_CTL_1 0x68060 |
3295 | #define TV_SC_CTL_1 0x68060 |
2830 | /** Turns on the first subcarrier phase generation DDA */ |
3296 | /* Turns on the first subcarrier phase generation DDA */ |
2831 | # define TV_SC_DDA1_EN (1 << 31) |
3297 | # define TV_SC_DDA1_EN (1 << 31) |
2832 | /** Turns on the first subcarrier phase generation DDA */ |
3298 | /* Turns on the first subcarrier phase generation DDA */ |
2833 | # define TV_SC_DDA2_EN (1 << 30) |
3299 | # define TV_SC_DDA2_EN (1 << 30) |
2834 | /** Turns on the first subcarrier phase generation DDA */ |
3300 | /* Turns on the first subcarrier phase generation DDA */ |
2835 | # define TV_SC_DDA3_EN (1 << 29) |
3301 | # define TV_SC_DDA3_EN (1 << 29) |
Line 2836... | Line 3302... | ||
2836 | /** Sets the subcarrier DDA to reset frequency every other field */ |
3302 | /* Sets the subcarrier DDA to reset frequency every other field */ |
2837 | # define TV_SC_RESET_EVERY_2 (0 << 24) |
3303 | # define TV_SC_RESET_EVERY_2 (0 << 24) |
2838 | /** Sets the subcarrier DDA to reset frequency every fourth field */ |
3304 | /* Sets the subcarrier DDA to reset frequency every fourth field */ |
2839 | # define TV_SC_RESET_EVERY_4 (1 << 24) |
3305 | # define TV_SC_RESET_EVERY_4 (1 << 24) |
2840 | /** Sets the subcarrier DDA to reset frequency every eighth field */ |
3306 | /* Sets the subcarrier DDA to reset frequency every eighth field */ |
2841 | # define TV_SC_RESET_EVERY_8 (2 << 24) |
3307 | # define TV_SC_RESET_EVERY_8 (2 << 24) |
2842 | /** Sets the subcarrier DDA to never reset the frequency */ |
3308 | /* Sets the subcarrier DDA to never reset the frequency */ |
Line 2843... | Line 3309... | ||
2843 | # define TV_SC_RESET_NEVER (3 << 24) |
3309 | # define TV_SC_RESET_NEVER (3 << 24) |
2844 | /** Sets the peak amplitude of the colorburst.*/ |
3310 | /* Sets the peak amplitude of the colorburst.*/ |
2845 | # define TV_BURST_LEVEL_MASK 0x00ff0000 |
3311 | # define TV_BURST_LEVEL_MASK 0x00ff0000 |
2846 | # define TV_BURST_LEVEL_SHIFT 16 |
3312 | # define TV_BURST_LEVEL_SHIFT 16 |
2847 | /** Sets the increment of the first subcarrier phase generation DDA */ |
3313 | /* Sets the increment of the first subcarrier phase generation DDA */ |
2848 | # define TV_SCDDA1_INC_MASK 0x00000fff |
3314 | # define TV_SCDDA1_INC_MASK 0x00000fff |
2849 | # define TV_SCDDA1_INC_SHIFT 0 |
3315 | # define TV_SCDDA1_INC_SHIFT 0 |
Line 2850... | Line 3316... | ||
2850 | 3316 | ||
2851 | #define TV_SC_CTL_2 0x68064 |
3317 | #define TV_SC_CTL_2 0x68064 |
2852 | /** Sets the rollover for the second subcarrier phase generation DDA */ |
3318 | /* Sets the rollover for the second subcarrier phase generation DDA */ |
2853 | # define TV_SCDDA2_SIZE_MASK 0x7fff0000 |
3319 | # define TV_SCDDA2_SIZE_MASK 0x7fff0000 |
2854 | # define TV_SCDDA2_SIZE_SHIFT 16 |
3320 | # define TV_SCDDA2_SIZE_SHIFT 16 |
2855 | /** Sets the increent of the second subcarrier phase generation DDA */ |
3321 | /* Sets the increent of the second subcarrier phase generation DDA */ |
2856 | # define TV_SCDDA2_INC_MASK 0x00007fff |
3322 | # define TV_SCDDA2_INC_MASK 0x00007fff |
Line 2857... | Line 3323... | ||
2857 | # define TV_SCDDA2_INC_SHIFT 0 |
3323 | # define TV_SCDDA2_INC_SHIFT 0 |
2858 | 3324 | ||
2859 | #define TV_SC_CTL_3 0x68068 |
3325 | #define TV_SC_CTL_3 0x68068 |
2860 | /** Sets the rollover for the third subcarrier phase generation DDA */ |
3326 | /* Sets the rollover for the third subcarrier phase generation DDA */ |
2861 | # define TV_SCDDA3_SIZE_MASK 0x7fff0000 |
3327 | # define TV_SCDDA3_SIZE_MASK 0x7fff0000 |
2862 | # define TV_SCDDA3_SIZE_SHIFT 16 |
3328 | # define TV_SCDDA3_SIZE_SHIFT 16 |
2863 | /** Sets the increent of the third subcarrier phase generation DDA */ |
3329 | /* Sets the increent of the third subcarrier phase generation DDA */ |
2864 | # define TV_SCDDA3_INC_MASK 0x00007fff |
3330 | # define TV_SCDDA3_INC_MASK 0x00007fff |
2865 | # define TV_SCDDA3_INC_SHIFT 0 |
3331 | # define TV_SCDDA3_INC_SHIFT 0 |
2866 | 3332 | ||
2867 | #define TV_WIN_POS 0x68070 |
3333 | #define TV_WIN_POS 0x68070 |
Line 2868... | Line 3334... | ||
2868 | /** X coordinate of the display from the start of horizontal active */ |
3334 | /* X coordinate of the display from the start of horizontal active */ |
2869 | # define TV_XPOS_MASK 0x1fff0000 |
3335 | # define TV_XPOS_MASK 0x1fff0000 |
2870 | # define TV_XPOS_SHIFT 16 |
3336 | # define TV_XPOS_SHIFT 16 |
2871 | /** Y coordinate of the display from the start of vertical active (NBR) */ |
3337 | /* Y coordinate of the display from the start of vertical active (NBR) */ |
2872 | # define TV_YPOS_MASK 0x00000fff |
3338 | # define TV_YPOS_MASK 0x00000fff |
2873 | # define TV_YPOS_SHIFT 0 |
3339 | # define TV_YPOS_SHIFT 0 |
2874 | 3340 | ||
2875 | #define TV_WIN_SIZE 0x68074 |
3341 | #define TV_WIN_SIZE 0x68074 |
2876 | /** Horizontal size of the display window, measured in pixels*/ |
3342 | /* Horizontal size of the display window, measured in pixels*/ |
2877 | # define TV_XSIZE_MASK 0x1fff0000 |
3343 | # define TV_XSIZE_MASK 0x1fff0000 |
2878 | # define TV_XSIZE_SHIFT 16 |
3344 | # define TV_XSIZE_SHIFT 16 |
2879 | /** |
3345 | /* |
2880 | * Vertical size of the display window, measured in pixels. |
3346 | * Vertical size of the display window, measured in pixels. |
2881 | * |
3347 | * |
2882 | * Must be even for interlaced modes. |
3348 | * Must be even for interlaced modes. |
2883 | */ |
3349 | */ |
2884 | # define TV_YSIZE_MASK 0x00000fff |
3350 | # define TV_YSIZE_MASK 0x00000fff |
2885 | # define TV_YSIZE_SHIFT 0 |
3351 | # define TV_YSIZE_SHIFT 0 |
2886 | 3352 | ||
2887 | #define TV_FILTER_CTL_1 0x68080 |
3353 | #define TV_FILTER_CTL_1 0x68080 |
2888 | /** |
3354 | /* |
2889 | * Enables automatic scaling calculation. |
3355 | * Enables automatic scaling calculation. |
2890 | * |
3356 | * |
2891 | * If set, the rest of the registers are ignored, and the calculated values can |
3357 | * If set, the rest of the registers are ignored, and the calculated values can |
2892 | * be read back from the register. |
3358 | * be read back from the register. |
2893 | */ |
3359 | */ |
2894 | # define TV_AUTO_SCALE (1 << 31) |
3360 | # define TV_AUTO_SCALE (1 << 31) |
2895 | /** |
3361 | /* |
Line 2916... | Line 3382... | ||
2916 | */ |
3382 | */ |
2917 | # define TV_HSCALE_FRAC_MASK 0x00003fff |
3383 | # define TV_HSCALE_FRAC_MASK 0x00003fff |
2918 | # define TV_HSCALE_FRAC_SHIFT 0 |
3384 | # define TV_HSCALE_FRAC_SHIFT 0 |
Line 2919... | Line 3385... | ||
2919 | 3385 | ||
2920 | #define TV_FILTER_CTL_2 0x68084 |
3386 | #define TV_FILTER_CTL_2 0x68084 |
2921 | /** |
3387 | /* |
2922 | * Sets the integer part of the 3.15 fixed-point vertical scaling factor. |
3388 | * Sets the integer part of the 3.15 fixed-point vertical scaling factor. |
2923 | * |
3389 | * |
2924 | * TV_VSCALE should be (src height - 1) / ((interlace * dest height) - 1) |
3390 | * TV_VSCALE should be (src height - 1) / ((interlace * dest height) - 1) |
2925 | */ |
3391 | */ |
2926 | # define TV_VSCALE_INT_MASK 0x00038000 |
3392 | # define TV_VSCALE_INT_MASK 0x00038000 |
2927 | # define TV_VSCALE_INT_SHIFT 15 |
3393 | # define TV_VSCALE_INT_SHIFT 15 |
2928 | /** |
3394 | /* |
2929 | * Sets the fractional part of the 3.15 fixed-point vertical scaling factor. |
3395 | * Sets the fractional part of the 3.15 fixed-point vertical scaling factor. |
2930 | * |
3396 | * |
2931 | * \sa TV_VSCALE_INT_MASK |
3397 | * \sa TV_VSCALE_INT_MASK |
2932 | */ |
3398 | */ |
2933 | # define TV_VSCALE_FRAC_MASK 0x00007fff |
3399 | # define TV_VSCALE_FRAC_MASK 0x00007fff |
Line 2934... | Line 3400... | ||
2934 | # define TV_VSCALE_FRAC_SHIFT 0 |
3400 | # define TV_VSCALE_FRAC_SHIFT 0 |
2935 | 3401 | ||
2936 | #define TV_FILTER_CTL_3 0x68088 |
3402 | #define TV_FILTER_CTL_3 0x68088 |
2937 | /** |
3403 | /* |
2938 | * Sets the integer part of the 3.15 fixed-point vertical scaling factor. |
3404 | * Sets the integer part of the 3.15 fixed-point vertical scaling factor. |
2939 | * |
3405 | * |
2940 | * TV_VSCALE should be (src height - 1) / (1/4 * (dest height - 1)) |
3406 | * TV_VSCALE should be (src height - 1) / (1/4 * (dest height - 1)) |
2941 | * |
3407 | * |
2942 | * For progressive modes, TV_VSCALE_IP_INT should be set to zeroes. |
3408 | * For progressive modes, TV_VSCALE_IP_INT should be set to zeroes. |
2943 | */ |
3409 | */ |
2944 | # define TV_VSCALE_IP_INT_MASK 0x00038000 |
3410 | # define TV_VSCALE_IP_INT_MASK 0x00038000 |
2945 | # define TV_VSCALE_IP_INT_SHIFT 15 |
3411 | # define TV_VSCALE_IP_INT_SHIFT 15 |
2946 | /** |
3412 | /* |
2947 | * Sets the fractional part of the 3.15 fixed-point vertical scaling factor. |
3413 | * Sets the fractional part of the 3.15 fixed-point vertical scaling factor. |
2948 | * |
3414 | * |
2949 | * For progressive modes, TV_VSCALE_IP_INT should be set to zeroes. |
3415 | * For progressive modes, TV_VSCALE_IP_INT should be set to zeroes. |
Line 2953... | Line 3419... | ||
2953 | # define TV_VSCALE_IP_FRAC_MASK 0x00007fff |
3419 | # define TV_VSCALE_IP_FRAC_MASK 0x00007fff |
2954 | # define TV_VSCALE_IP_FRAC_SHIFT 0 |
3420 | # define TV_VSCALE_IP_FRAC_SHIFT 0 |
Line 2955... | Line 3421... | ||
2955 | 3421 | ||
2956 | #define TV_CC_CONTROL 0x68090 |
3422 | #define TV_CC_CONTROL 0x68090 |
2957 | # define TV_CC_ENABLE (1 << 31) |
3423 | # define TV_CC_ENABLE (1 << 31) |
2958 | /** |
3424 | /* |
2959 | * Specifies which field to send the CC data in. |
3425 | * Specifies which field to send the CC data in. |
2960 | * |
3426 | * |
2961 | * CC data is usually sent in field 0. |
3427 | * CC data is usually sent in field 0. |
2962 | */ |
3428 | */ |
2963 | # define TV_CC_FID_MASK (1 << 27) |
3429 | # define TV_CC_FID_MASK (1 << 27) |
2964 | # define TV_CC_FID_SHIFT 27 |
3430 | # define TV_CC_FID_SHIFT 27 |
2965 | /** Sets the horizontal position of the CC data. Usually 135. */ |
3431 | /* Sets the horizontal position of the CC data. Usually 135. */ |
2966 | # define TV_CC_HOFF_MASK 0x03ff0000 |
3432 | # define TV_CC_HOFF_MASK 0x03ff0000 |
2967 | # define TV_CC_HOFF_SHIFT 16 |
3433 | # define TV_CC_HOFF_SHIFT 16 |
2968 | /** Sets the vertical position of the CC data. Usually 21 */ |
3434 | /* Sets the vertical position of the CC data. Usually 21 */ |
2969 | # define TV_CC_LINE_MASK 0x0000003f |
3435 | # define TV_CC_LINE_MASK 0x0000003f |
Line 2970... | Line 3436... | ||
2970 | # define TV_CC_LINE_SHIFT 0 |
3436 | # define TV_CC_LINE_SHIFT 0 |
2971 | 3437 | ||
2972 | #define TV_CC_DATA 0x68094 |
3438 | #define TV_CC_DATA 0x68094 |
2973 | # define TV_CC_RDY (1 << 31) |
3439 | # define TV_CC_RDY (1 << 31) |
2974 | /** Second word of CC data to be transmitted. */ |
3440 | /* Second word of CC data to be transmitted. */ |
2975 | # define TV_CC_DATA_2_MASK 0x007f0000 |
3441 | # define TV_CC_DATA_2_MASK 0x007f0000 |
2976 | # define TV_CC_DATA_2_SHIFT 16 |
3442 | # define TV_CC_DATA_2_SHIFT 16 |
2977 | /** First word of CC data to be transmitted. */ |
3443 | /* First word of CC data to be transmitted. */ |
Line 2978... | Line 3444... | ||
2978 | # define TV_CC_DATA_1_MASK 0x0000007f |
3444 | # define TV_CC_DATA_1_MASK 0x0000007f |
2979 | # define TV_CC_DATA_1_SHIFT 0 |
3445 | # define TV_CC_DATA_1_SHIFT 0 |
Line 2994... | Line 3460... | ||
2994 | #define DP_D 0x64300 |
3460 | #define DP_D 0x64300 |
Line 2995... | Line 3461... | ||
2995 | 3461 | ||
2996 | #define DP_PORT_EN (1 << 31) |
3462 | #define DP_PORT_EN (1 << 31) |
2997 | #define DP_PIPEB_SELECT (1 << 30) |
3463 | #define DP_PIPEB_SELECT (1 << 30) |
- | 3464 | #define DP_PIPE_MASK (1 << 30) |
|
- | 3465 | #define DP_PIPE_SELECT_CHV(pipe) ((pipe) << 16) |
|
Line 2998... | Line 3466... | ||
2998 | #define DP_PIPE_MASK (1 << 30) |
3466 | #define DP_PIPE_MASK_CHV (3 << 16) |
2999 | 3467 | ||
3000 | /* Link training mode - select a suitable mode for each stage */ |
3468 | /* Link training mode - select a suitable mode for each stage */ |
3001 | #define DP_LINK_TRAIN_PAT_1 (0 << 28) |
3469 | #define DP_LINK_TRAIN_PAT_1 (0 << 28) |
Line 3041... | Line 3509... | ||
3041 | /* eDP */ |
3509 | /* eDP */ |
3042 | #define DP_PLL_FREQ_270MHZ (0 << 16) |
3510 | #define DP_PLL_FREQ_270MHZ (0 << 16) |
3043 | #define DP_PLL_FREQ_160MHZ (1 << 16) |
3511 | #define DP_PLL_FREQ_160MHZ (1 << 16) |
3044 | #define DP_PLL_FREQ_MASK (3 << 16) |
3512 | #define DP_PLL_FREQ_MASK (3 << 16) |
Line 3045... | Line 3513... | ||
3045 | 3513 | ||
3046 | /** locked once port is enabled */ |
3514 | /* locked once port is enabled */ |
Line 3047... | Line 3515... | ||
3047 | #define DP_PORT_REVERSAL (1 << 15) |
3515 | #define DP_PORT_REVERSAL (1 << 15) |
3048 | 3516 | ||
Line 3049... | Line 3517... | ||
3049 | /* eDP */ |
3517 | /* eDP */ |
3050 | #define DP_PLL_ENABLE (1 << 14) |
3518 | #define DP_PLL_ENABLE (1 << 14) |
Line 3051... | Line 3519... | ||
3051 | 3519 | ||
3052 | /** sends the clock on lane 15 of the PEG for debug */ |
3520 | /* sends the clock on lane 15 of the PEG for debug */ |
Line 3053... | Line 3521... | ||
3053 | #define DP_CLOCK_OUTPUT_ENABLE (1 << 13) |
3521 | #define DP_CLOCK_OUTPUT_ENABLE (1 << 13) |
3054 | 3522 | ||
Line 3055... | Line 3523... | ||
3055 | #define DP_SCRAMBLING_DISABLE (1 << 12) |
3523 | #define DP_SCRAMBLING_DISABLE (1 << 12) |
3056 | #define DP_SCRAMBLING_DISABLE_IRONLAKE (1 << 7) |
3524 | #define DP_SCRAMBLING_DISABLE_IRONLAKE (1 << 7) |
Line 3057... | Line 3525... | ||
3057 | 3525 | ||
3058 | /** limit RGB values to avoid confusing TVs */ |
3526 | /* limit RGB values to avoid confusing TVs */ |
3059 | #define DP_COLOR_RANGE_16_235 (1 << 8) |
3527 | #define DP_COLOR_RANGE_16_235 (1 << 8) |
Line 3060... | Line 3528... | ||
3060 | 3528 | ||
3061 | /** Turn on the audio link */ |
3529 | /* Turn on the audio link */ |
Line 3062... | Line 3530... | ||
3062 | #define DP_AUDIO_OUTPUT_ENABLE (1 << 6) |
3530 | #define DP_AUDIO_OUTPUT_ENABLE (1 << 6) |
3063 | 3531 | ||
3064 | /** vs and hs sync polarity */ |
3532 | /* vs and hs sync polarity */ |
3065 | #define DP_SYNC_VS_HIGH (1 << 4) |
3533 | #define DP_SYNC_VS_HIGH (1 << 4) |
3066 | #define DP_SYNC_HS_HIGH (1 << 3) |
3534 | #define DP_SYNC_HS_HIGH (1 << 3) |
3067 | 3535 | ||
Line 3176... | Line 3644... | ||
3176 | #define PIPE_LINK_N_G4X(pipe) _PIPE(pipe, _PIPEA_LINK_N_G4X, _PIPEB_LINK_N_G4X) |
3644 | #define PIPE_LINK_N_G4X(pipe) _PIPE(pipe, _PIPEA_LINK_N_G4X, _PIPEB_LINK_N_G4X) |
Line 3177... | Line 3645... | ||
3177 | 3645 | ||
Line 3178... | Line 3646... | ||
3178 | /* Display & cursor control */ |
3646 | /* Display & cursor control */ |
3179 | 3647 | ||
3180 | /* Pipe A */ |
3648 | /* Pipe A */ |
3181 | #define _PIPEADSL (dev_priv->info->display_mmio_offset + 0x70000) |
3649 | #define _PIPEADSL 0x70000 |
3182 | #define DSL_LINEMASK_GEN2 0x00000fff |
3650 | #define DSL_LINEMASK_GEN2 0x00000fff |
3183 | #define DSL_LINEMASK_GEN3 0x00001fff |
3651 | #define DSL_LINEMASK_GEN3 0x00001fff |
3184 | #define _PIPEACONF (dev_priv->info->display_mmio_offset + 0x70008) |
3652 | #define _PIPEACONF 0x70008 |
3185 | #define PIPECONF_ENABLE (1<<31) |
3653 | #define PIPECONF_ENABLE (1<<31) |
3186 | #define PIPECONF_DISABLE 0 |
3654 | #define PIPECONF_DISABLE 0 |
3187 | #define PIPECONF_DOUBLE_WIDE (1<<30) |
3655 | #define PIPECONF_DOUBLE_WIDE (1<<30) |
Line 3209... | Line 3677... | ||
3209 | #define PIPECONF_PFIT_PF_INTERLACED_ILK (1 << 21) |
3677 | #define PIPECONF_PFIT_PF_INTERLACED_ILK (1 << 21) |
3210 | #define PIPECONF_INTERLACED_ILK (3 << 21) |
3678 | #define PIPECONF_INTERLACED_ILK (3 << 21) |
3211 | #define PIPECONF_INTERLACED_DBL_ILK (4 << 21) /* ilk/snb only */ |
3679 | #define PIPECONF_INTERLACED_DBL_ILK (4 << 21) /* ilk/snb only */ |
3212 | #define PIPECONF_PFIT_PF_INTERLACED_DBL_ILK (5 << 21) /* ilk/snb only */ |
3680 | #define PIPECONF_PFIT_PF_INTERLACED_DBL_ILK (5 << 21) /* ilk/snb only */ |
3213 | #define PIPECONF_INTERLACE_MODE_MASK (7 << 21) |
3681 | #define PIPECONF_INTERLACE_MODE_MASK (7 << 21) |
- | 3682 | #define PIPECONF_EDP_RR_MODE_SWITCH (1 << 20) |
|
3214 | #define PIPECONF_CXSR_DOWNCLOCK (1<<16) |
3683 | #define PIPECONF_CXSR_DOWNCLOCK (1<<16) |
3215 | #define PIPECONF_COLOR_RANGE_SELECT (1 << 13) |
3684 | #define PIPECONF_COLOR_RANGE_SELECT (1 << 13) |
3216 | #define PIPECONF_BPC_MASK (0x7 << 5) |
3685 | #define PIPECONF_BPC_MASK (0x7 << 5) |
3217 | #define PIPECONF_8BPC (0<<5) |
3686 | #define PIPECONF_8BPC (0<<5) |
3218 | #define PIPECONF_10BPC (1<<5) |
3687 | #define PIPECONF_10BPC (1<<5) |
Line 3222... | Line 3691... | ||
3222 | #define PIPECONF_DITHER_TYPE_MASK (0x0000000c) |
3691 | #define PIPECONF_DITHER_TYPE_MASK (0x0000000c) |
3223 | #define PIPECONF_DITHER_TYPE_SP (0<<2) |
3692 | #define PIPECONF_DITHER_TYPE_SP (0<<2) |
3224 | #define PIPECONF_DITHER_TYPE_ST1 (1<<2) |
3693 | #define PIPECONF_DITHER_TYPE_ST1 (1<<2) |
3225 | #define PIPECONF_DITHER_TYPE_ST2 (2<<2) |
3694 | #define PIPECONF_DITHER_TYPE_ST2 (2<<2) |
3226 | #define PIPECONF_DITHER_TYPE_TEMP (3<<2) |
3695 | #define PIPECONF_DITHER_TYPE_TEMP (3<<2) |
3227 | #define _PIPEASTAT (dev_priv->info->display_mmio_offset + 0x70024) |
3696 | #define _PIPEASTAT 0x70024 |
3228 | #define PIPE_FIFO_UNDERRUN_STATUS (1UL<<31) |
3697 | #define PIPE_FIFO_UNDERRUN_STATUS (1UL<<31) |
3229 | #define SPRITE1_FLIPDONE_INT_EN_VLV (1UL<<30) |
3698 | #define SPRITE1_FLIP_DONE_INT_EN_VLV (1UL<<30) |
3230 | #define PIPE_CRC_ERROR_ENABLE (1UL<<29) |
3699 | #define PIPE_CRC_ERROR_ENABLE (1UL<<29) |
3231 | #define PIPE_CRC_DONE_ENABLE (1UL<<28) |
3700 | #define PIPE_CRC_DONE_ENABLE (1UL<<28) |
- | 3701 | #define PERF_COUNTER2_INTERRUPT_EN (1UL<<27) |
|
3232 | #define PIPE_GMBUS_EVENT_ENABLE (1UL<<27) |
3702 | #define PIPE_GMBUS_EVENT_ENABLE (1UL<<27) |
3233 | #define PLANE_FLIP_DONE_INT_EN_VLV (1UL<<26) |
3703 | #define PLANE_FLIP_DONE_INT_EN_VLV (1UL<<26) |
3234 | #define PIPE_HOTPLUG_INTERRUPT_ENABLE (1UL<<26) |
3704 | #define PIPE_HOTPLUG_INTERRUPT_ENABLE (1UL<<26) |
3235 | #define PIPE_VSYNC_INTERRUPT_ENABLE (1UL<<25) |
3705 | #define PIPE_VSYNC_INTERRUPT_ENABLE (1UL<<25) |
3236 | #define PIPE_DISPLAY_LINE_COMPARE_ENABLE (1UL<<24) |
3706 | #define PIPE_DISPLAY_LINE_COMPARE_ENABLE (1UL<<24) |
3237 | #define PIPE_DPST_EVENT_ENABLE (1UL<<23) |
3707 | #define PIPE_DPST_EVENT_ENABLE (1UL<<23) |
3238 | #define SPRITE0_FLIP_DONE_INT_EN_VLV (1UL<<22) |
3708 | #define SPRITE0_FLIP_DONE_INT_EN_VLV (1UL<<22) |
3239 | #define PIPE_LEGACY_BLC_EVENT_ENABLE (1UL<<22) |
3709 | #define PIPE_LEGACY_BLC_EVENT_ENABLE (1UL<<22) |
3240 | #define PIPE_ODD_FIELD_INTERRUPT_ENABLE (1UL<<21) |
3710 | #define PIPE_ODD_FIELD_INTERRUPT_ENABLE (1UL<<21) |
3241 | #define PIPE_EVEN_FIELD_INTERRUPT_ENABLE (1UL<<20) |
3711 | #define PIPE_EVEN_FIELD_INTERRUPT_ENABLE (1UL<<20) |
- | 3712 | #define PIPE_B_PSR_INTERRUPT_ENABLE_VLV (1UL<<19) |
|
- | 3713 | #define PERF_COUNTER_INTERRUPT_EN (1UL<<19) |
|
3242 | #define PIPE_HOTPLUG_TV_INTERRUPT_ENABLE (1UL<<18) /* pre-965 */ |
3714 | #define PIPE_HOTPLUG_TV_INTERRUPT_ENABLE (1UL<<18) /* pre-965 */ |
3243 | #define PIPE_START_VBLANK_INTERRUPT_ENABLE (1UL<<18) /* 965 or later */ |
3715 | #define PIPE_START_VBLANK_INTERRUPT_ENABLE (1UL<<18) /* 965 or later */ |
- | 3716 | #define PIPE_FRAMESTART_INTERRUPT_ENABLE (1UL<<17) |
|
3244 | #define PIPE_VBLANK_INTERRUPT_ENABLE (1UL<<17) |
3717 | #define PIPE_VBLANK_INTERRUPT_ENABLE (1UL<<17) |
3245 | #define PIPEA_HBLANK_INT_EN_VLV (1UL<<16) |
3718 | #define PIPEA_HBLANK_INT_EN_VLV (1UL<<16) |
3246 | #define PIPE_OVERLAY_UPDATED_ENABLE (1UL<<16) |
3719 | #define PIPE_OVERLAY_UPDATED_ENABLE (1UL<<16) |
3247 | #define SPRITE1_FLIPDONE_INT_STATUS_VLV (1UL<<15) |
3720 | #define SPRITE1_FLIP_DONE_INT_STATUS_VLV (1UL<<15) |
3248 | #define SPRITE0_FLIPDONE_INT_STATUS_VLV (1UL<<14) |
3721 | #define SPRITE0_FLIP_DONE_INT_STATUS_VLV (1UL<<14) |
3249 | #define PIPE_CRC_ERROR_INTERRUPT_STATUS (1UL<<13) |
3722 | #define PIPE_CRC_ERROR_INTERRUPT_STATUS (1UL<<13) |
3250 | #define PIPE_CRC_DONE_INTERRUPT_STATUS (1UL<<12) |
3723 | #define PIPE_CRC_DONE_INTERRUPT_STATUS (1UL<<12) |
- | 3724 | #define PERF_COUNTER2_INTERRUPT_STATUS (1UL<<11) |
|
3251 | #define PIPE_GMBUS_INTERRUPT_STATUS (1UL<<11) |
3725 | #define PIPE_GMBUS_INTERRUPT_STATUS (1UL<<11) |
3252 | #define PLANE_FLIPDONE_INT_STATUS_VLV (1UL<<10) |
3726 | #define PLANE_FLIP_DONE_INT_STATUS_VLV (1UL<<10) |
3253 | #define PIPE_HOTPLUG_INTERRUPT_STATUS (1UL<<10) |
3727 | #define PIPE_HOTPLUG_INTERRUPT_STATUS (1UL<<10) |
3254 | #define PIPE_VSYNC_INTERRUPT_STATUS (1UL<<9) |
3728 | #define PIPE_VSYNC_INTERRUPT_STATUS (1UL<<9) |
3255 | #define PIPE_DISPLAY_LINE_COMPARE_STATUS (1UL<<8) |
3729 | #define PIPE_DISPLAY_LINE_COMPARE_STATUS (1UL<<8) |
3256 | #define PIPE_DPST_EVENT_STATUS (1UL<<7) |
3730 | #define PIPE_DPST_EVENT_STATUS (1UL<<7) |
3257 | #define PIPE_LEGACY_BLC_EVENT_STATUS (1UL<<6) |
3731 | #define PIPE_LEGACY_BLC_EVENT_STATUS (1UL<<6) |
- | 3732 | #define PIPE_A_PSR_STATUS_VLV (1UL<<6) |
|
- | 3733 | #define PIPE_LEGACY_BLC_EVENT_STATUS (1UL<<6) |
|
3258 | #define PIPE_ODD_FIELD_INTERRUPT_STATUS (1UL<<5) |
3734 | #define PIPE_ODD_FIELD_INTERRUPT_STATUS (1UL<<5) |
3259 | #define PIPE_EVEN_FIELD_INTERRUPT_STATUS (1UL<<4) |
3735 | #define PIPE_EVEN_FIELD_INTERRUPT_STATUS (1UL<<4) |
- | 3736 | #define PIPE_B_PSR_STATUS_VLV (1UL<<3) |
|
- | 3737 | #define PERF_COUNTER_INTERRUPT_STATUS (1UL<<3) |
|
3260 | #define PIPE_HOTPLUG_TV_INTERRUPT_STATUS (1UL<<2) /* pre-965 */ |
3738 | #define PIPE_HOTPLUG_TV_INTERRUPT_STATUS (1UL<<2) /* pre-965 */ |
3261 | #define PIPE_START_VBLANK_INTERRUPT_STATUS (1UL<<2) /* 965 or later */ |
3739 | #define PIPE_START_VBLANK_INTERRUPT_STATUS (1UL<<2) /* 965 or later */ |
- | 3740 | #define PIPE_FRAMESTART_INTERRUPT_STATUS (1UL<<1) |
|
3262 | #define PIPE_VBLANK_INTERRUPT_STATUS (1UL<<1) |
3741 | #define PIPE_VBLANK_INTERRUPT_STATUS (1UL<<1) |
- | 3742 | #define PIPE_HBLANK_INT_STATUS (1UL<<0) |
|
3263 | #define PIPE_OVERLAY_UPDATED_STATUS (1UL<<0) |
3743 | #define PIPE_OVERLAY_UPDATED_STATUS (1UL<<0) |
Line -... | Line 3744... | ||
- | 3744 | ||
3264 | 3745 | #define PIPESTAT_INT_ENABLE_MASK 0x7fff0000 |
|
- | 3746 | #define PIPESTAT_INT_STATUS_MASK 0x0000ffff |
|
- | 3747 | ||
- | 3748 | #define PIPE_A_OFFSET 0x70000 |
|
- | 3749 | #define PIPE_B_OFFSET 0x71000 |
|
- | 3750 | #define PIPE_C_OFFSET 0x72000 |
|
- | 3751 | #define CHV_PIPE_C_OFFSET 0x74000 |
|
- | 3752 | /* |
|
- | 3753 | * There's actually no pipe EDP. Some pipe registers have |
|
- | 3754 | * simply shifted from the pipe to the transcoder, while |
|
- | 3755 | * keeping their original offset. Thus we need PIPE_EDP_OFFSET |
|
- | 3756 | * to access such registers in transcoder EDP. |
|
- | 3757 | */ |
|
- | 3758 | #define PIPE_EDP_OFFSET 0x7f000 |
|
- | 3759 | ||
- | 3760 | #define _PIPE2(pipe, reg) (dev_priv->info.pipe_offsets[pipe] - \ |
|
- | 3761 | dev_priv->info.pipe_offsets[PIPE_A] + (reg) + \ |
|
- | 3762 | dev_priv->info.display_mmio_offset) |
|
3265 | #define PIPESRC(pipe) _PIPE(pipe, _PIPEASRC, _PIPEBSRC) |
3763 | |
3266 | #define PIPECONF(tran) _TRANSCODER(tran, _PIPEACONF, _PIPEBCONF) |
3764 | #define PIPECONF(pipe) _PIPE2(pipe, _PIPEACONF) |
3267 | #define PIPEDSL(pipe) _PIPE(pipe, _PIPEADSL, _PIPEBDSL) |
3765 | #define PIPEDSL(pipe) _PIPE2(pipe, _PIPEADSL) |
3268 | #define PIPEFRAME(pipe) _PIPE(pipe, _PIPEAFRAMEHIGH, _PIPEBFRAMEHIGH) |
3766 | #define PIPEFRAME(pipe) _PIPE2(pipe, _PIPEAFRAMEHIGH) |
3269 | #define PIPEFRAMEPIXEL(pipe) _PIPE(pipe, _PIPEAFRAMEPIXEL, _PIPEBFRAMEPIXEL) |
3767 | #define PIPEFRAMEPIXEL(pipe) _PIPE2(pipe, _PIPEAFRAMEPIXEL) |
Line 3270... | Line 3768... | ||
3270 | #define PIPESTAT(pipe) _PIPE(pipe, _PIPEASTAT, _PIPEBSTAT) |
3768 | #define PIPESTAT(pipe) _PIPE2(pipe, _PIPEASTAT) |
3271 | 3769 | ||
3272 | #define _PIPE_MISC_A 0x70030 |
3770 | #define _PIPE_MISC_A 0x70030 |
3273 | #define _PIPE_MISC_B 0x71030 |
3771 | #define _PIPE_MISC_B 0x71030 |
Line 3277... | Line 3775... | ||
3277 | #define PIPEMISC_DITHER_6_BPC (2<<5) |
3775 | #define PIPEMISC_DITHER_6_BPC (2<<5) |
3278 | #define PIPEMISC_DITHER_12_BPC (3<<5) |
3776 | #define PIPEMISC_DITHER_12_BPC (3<<5) |
3279 | #define PIPEMISC_DITHER_ENABLE (1<<4) |
3777 | #define PIPEMISC_DITHER_ENABLE (1<<4) |
3280 | #define PIPEMISC_DITHER_TYPE_MASK (3<<2) |
3778 | #define PIPEMISC_DITHER_TYPE_MASK (3<<2) |
3281 | #define PIPEMISC_DITHER_TYPE_SP (0<<2) |
3779 | #define PIPEMISC_DITHER_TYPE_SP (0<<2) |
3282 | #define PIPEMISC(pipe) _PIPE(pipe, _PIPE_MISC_A, _PIPE_MISC_B) |
3780 | #define PIPEMISC(pipe) _PIPE2(pipe, _PIPE_MISC_A) |
Line 3283... | Line 3781... | ||
3283 | 3781 | ||
3284 | #define VLV_DPFLIPSTAT (VLV_DISPLAY_BASE + 0x70028) |
3782 | #define VLV_DPFLIPSTAT (VLV_DISPLAY_BASE + 0x70028) |
3285 | #define PIPEB_LINE_COMPARE_INT_EN (1<<29) |
3783 | #define PIPEB_LINE_COMPARE_INT_EN (1<<29) |
3286 | #define PIPEB_HLINE_INT_EN (1<<28) |
3784 | #define PIPEB_HLINE_INT_EN (1<<28) |
3287 | #define PIPEB_VBLANK_INT_EN (1<<27) |
3785 | #define PIPEB_VBLANK_INT_EN (1<<27) |
3288 | #define SPRITED_FLIPDONE_INT_EN (1<<26) |
3786 | #define SPRITED_FLIP_DONE_INT_EN (1<<26) |
3289 | #define SPRITEC_FLIPDONE_INT_EN (1<<25) |
3787 | #define SPRITEC_FLIP_DONE_INT_EN (1<<25) |
- | 3788 | #define PLANEB_FLIP_DONE_INT_EN (1<<24) |
|
3290 | #define PLANEB_FLIPDONE_INT_EN (1<<24) |
3789 | #define PIPE_PSR_INT_EN (1<<22) |
3291 | #define PIPEA_LINE_COMPARE_INT_EN (1<<21) |
3790 | #define PIPEA_LINE_COMPARE_INT_EN (1<<21) |
3292 | #define PIPEA_HLINE_INT_EN (1<<20) |
3791 | #define PIPEA_HLINE_INT_EN (1<<20) |
3293 | #define PIPEA_VBLANK_INT_EN (1<<19) |
3792 | #define PIPEA_VBLANK_INT_EN (1<<19) |
3294 | #define SPRITEB_FLIPDONE_INT_EN (1<<18) |
3793 | #define SPRITEB_FLIP_DONE_INT_EN (1<<18) |
3295 | #define SPRITEA_FLIPDONE_INT_EN (1<<17) |
3794 | #define SPRITEA_FLIP_DONE_INT_EN (1<<17) |
- | 3795 | #define PLANEA_FLIPDONE_INT_EN (1<<16) |
|
- | 3796 | #define PIPEC_LINE_COMPARE_INT_EN (1<<13) |
|
- | 3797 | #define PIPEC_HLINE_INT_EN (1<<12) |
|
- | 3798 | #define PIPEC_VBLANK_INT_EN (1<<11) |
|
- | 3799 | #define SPRITEF_FLIPDONE_INT_EN (1<<10) |
|
- | 3800 | #define SPRITEE_FLIPDONE_INT_EN (1<<9) |
|
3296 | #define PLANEA_FLIPDONE_INT_EN (1<<16) |
3801 | #define PLANEC_FLIPDONE_INT_EN (1<<8) |
3297 | 3802 | ||
- | 3803 | #define DPINVGTT (VLV_DISPLAY_BASE + 0x7002c) /* VLV/CHV only */ |
|
- | 3804 | #define SPRITEF_INVALID_GTT_INT_EN (1<<27) |
|
- | 3805 | #define SPRITEE_INVALID_GTT_INT_EN (1<<26) |
|
- | 3806 | #define PLANEC_INVALID_GTT_INT_EN (1<<25) |
|
3298 | #define DPINVGTT (VLV_DISPLAY_BASE + 0x7002c) /* VLV only */ |
3807 | #define CURSORC_INVALID_GTT_INT_EN (1<<24) |
3299 | #define CURSORB_INVALID_GTT_INT_EN (1<<23) |
3808 | #define CURSORB_INVALID_GTT_INT_EN (1<<23) |
3300 | #define CURSORA_INVALID_GTT_INT_EN (1<<22) |
3809 | #define CURSORA_INVALID_GTT_INT_EN (1<<22) |
3301 | #define SPRITED_INVALID_GTT_INT_EN (1<<21) |
3810 | #define SPRITED_INVALID_GTT_INT_EN (1<<21) |
3302 | #define SPRITEC_INVALID_GTT_INT_EN (1<<20) |
3811 | #define SPRITEC_INVALID_GTT_INT_EN (1<<20) |
3303 | #define PLANEB_INVALID_GTT_INT_EN (1<<19) |
3812 | #define PLANEB_INVALID_GTT_INT_EN (1<<19) |
3304 | #define SPRITEB_INVALID_GTT_INT_EN (1<<18) |
3813 | #define SPRITEB_INVALID_GTT_INT_EN (1<<18) |
3305 | #define SPRITEA_INVALID_GTT_INT_EN (1<<17) |
3814 | #define SPRITEA_INVALID_GTT_INT_EN (1<<17) |
3306 | #define PLANEA_INVALID_GTT_INT_EN (1<<16) |
3815 | #define PLANEA_INVALID_GTT_INT_EN (1<<16) |
- | 3816 | #define DPINVGTT_EN_MASK 0xff0000 |
|
- | 3817 | #define DPINVGTT_EN_MASK_CHV 0xfff0000 |
|
- | 3818 | #define SPRITEF_INVALID_GTT_STATUS (1<<11) |
|
- | 3819 | #define SPRITEE_INVALID_GTT_STATUS (1<<10) |
|
- | 3820 | #define PLANEC_INVALID_GTT_STATUS (1<<9) |
|
3307 | #define DPINVGTT_EN_MASK 0xff0000 |
3821 | #define CURSORC_INVALID_GTT_STATUS (1<<8) |
3308 | #define CURSORB_INVALID_GTT_STATUS (1<<7) |
3822 | #define CURSORB_INVALID_GTT_STATUS (1<<7) |
3309 | #define CURSORA_INVALID_GTT_STATUS (1<<6) |
3823 | #define CURSORA_INVALID_GTT_STATUS (1<<6) |
3310 | #define SPRITED_INVALID_GTT_STATUS (1<<5) |
3824 | #define SPRITED_INVALID_GTT_STATUS (1<<5) |
3311 | #define SPRITEC_INVALID_GTT_STATUS (1<<4) |
3825 | #define SPRITEC_INVALID_GTT_STATUS (1<<4) |
3312 | #define PLANEB_INVALID_GTT_STATUS (1<<3) |
3826 | #define PLANEB_INVALID_GTT_STATUS (1<<3) |
3313 | #define SPRITEB_INVALID_GTT_STATUS (1<<2) |
3827 | #define SPRITEB_INVALID_GTT_STATUS (1<<2) |
3314 | #define SPRITEA_INVALID_GTT_STATUS (1<<1) |
3828 | #define SPRITEA_INVALID_GTT_STATUS (1<<1) |
3315 | #define PLANEA_INVALID_GTT_STATUS (1<<0) |
3829 | #define PLANEA_INVALID_GTT_STATUS (1<<0) |
- | 3830 | #define DPINVGTT_STATUS_MASK 0xff |
|
Line 3316... | Line 3831... | ||
3316 | #define DPINVGTT_STATUS_MASK 0xff |
3831 | #define DPINVGTT_STATUS_MASK_CHV 0xfff |
3317 | 3832 | ||
3318 | #define DSPARB 0x70030 |
3833 | #define DSPARB 0x70030 |
3319 | #define DSPARB_CSTART_MASK (0x7f << 7) |
3834 | #define DSPARB_CSTART_MASK (0x7f << 7) |
3320 | #define DSPARB_CSTART_SHIFT 7 |
3835 | #define DSPARB_CSTART_SHIFT 7 |
3321 | #define DSPARB_BSTART_MASK (0x7f) |
3836 | #define DSPARB_BSTART_MASK (0x7f) |
3322 | #define DSPARB_BSTART_SHIFT 0 |
3837 | #define DSPARB_BSTART_SHIFT 0 |
Line 3323... | Line 3838... | ||
3323 | #define DSPARB_BEND_SHIFT 9 /* on 855 */ |
3838 | #define DSPARB_BEND_SHIFT 9 /* on 855 */ |
3324 | #define DSPARB_AEND_SHIFT 0 |
3839 | #define DSPARB_AEND_SHIFT 0 |
3325 | 3840 | ||
3326 | #define DSPFW1 (dev_priv->info->display_mmio_offset + 0x70034) |
3841 | #define DSPFW1 (dev_priv->info.display_mmio_offset + 0x70034) |
3327 | #define DSPFW_SR_SHIFT 23 |
3842 | #define DSPFW_SR_SHIFT 23 |
3328 | #define DSPFW_SR_MASK (0x1ff<<23) |
3843 | #define DSPFW_SR_MASK (0x1ff<<23) |
3329 | #define DSPFW_CURSORB_SHIFT 16 |
3844 | #define DSPFW_CURSORB_SHIFT 16 |
3330 | #define DSPFW_CURSORB_MASK (0x3f<<16) |
3845 | #define DSPFW_CURSORB_MASK (0x3f<<16) |
3331 | #define DSPFW_PLANEB_SHIFT 8 |
3846 | #define DSPFW_PLANEB_SHIFT 8 |
3332 | #define DSPFW_PLANEB_MASK (0x7f<<8) |
3847 | #define DSPFW_PLANEB_MASK (0x7f<<8) |
3333 | #define DSPFW_PLANEA_MASK (0x7f) |
3848 | #define DSPFW_PLANEA_MASK (0x7f) |
3334 | #define DSPFW2 (dev_priv->info->display_mmio_offset + 0x70038) |
3849 | #define DSPFW2 (dev_priv->info.display_mmio_offset + 0x70038) |
3335 | #define DSPFW_CURSORA_MASK 0x00003f00 |
3850 | #define DSPFW_CURSORA_MASK 0x00003f00 |
3336 | #define DSPFW_CURSORA_SHIFT 8 |
3851 | #define DSPFW_CURSORA_SHIFT 8 |
3337 | #define DSPFW_PLANEC_MASK (0x7f) |
3852 | #define DSPFW_PLANEC_MASK (0x7f) |
3338 | #define DSPFW3 (dev_priv->info->display_mmio_offset + 0x7003c) |
3853 | #define DSPFW3 (dev_priv->info.display_mmio_offset + 0x7003c) |
3339 | #define DSPFW_HPLL_SR_EN (1<<31) |
3854 | #define DSPFW_HPLL_SR_EN (1<<31) |
3340 | #define DSPFW_CURSOR_SR_SHIFT 24 |
3855 | #define DSPFW_CURSOR_SR_SHIFT 24 |
3341 | #define PINEVIEW_SELF_REFRESH_EN (1<<30) |
3856 | #define PINEVIEW_SELF_REFRESH_EN (1<<30) |
3342 | #define DSPFW_CURSOR_SR_MASK (0x3f<<24) |
3857 | #define DSPFW_CURSOR_SR_MASK (0x3f<<24) |
3343 | #define DSPFW_HPLL_CURSOR_SHIFT 16 |
3858 | #define DSPFW_HPLL_CURSOR_SHIFT 16 |
3344 | #define DSPFW_HPLL_CURSOR_MASK (0x3f<<16) |
3859 | #define DSPFW_HPLL_CURSOR_MASK (0x3f<<16) |
Line 3345... | Line 3860... | ||
3345 | #define DSPFW_HPLL_SR_MASK (0x1ff) |
3860 | #define DSPFW_HPLL_SR_MASK (0x1ff) |
3346 | #define DSPFW4 (dev_priv->info->display_mmio_offset + 0x70070) |
3861 | #define DSPFW4 (dev_priv->info.display_mmio_offset + 0x70070) |
3347 | #define DSPFW7 (dev_priv->info->display_mmio_offset + 0x7007c) |
3862 | #define DSPFW7 (dev_priv->info.display_mmio_offset + 0x7007c) |
3348 | 3863 | ||
3349 | /* drain latency register values*/ |
3864 | /* drain latency register values*/ |
3350 | #define DRAIN_LATENCY_PRECISION_32 32 |
3865 | #define DRAIN_LATENCY_PRECISION_32 32 |
3351 | #define DRAIN_LATENCY_PRECISION_16 16 |
3866 | #define DRAIN_LATENCY_PRECISION_64 64 |
- | 3867 | #define VLV_DDL1 (VLV_DISPLAY_BASE + 0x70050) |
|
- | 3868 | #define DDL_CURSORA_PRECISION_64 (1<<31) |
|
- | 3869 | #define DDL_CURSORA_PRECISION_32 (0<<31) |
|
- | 3870 | #define DDL_CURSORA_SHIFT 24 |
|
- | 3871 | #define DDL_SPRITEB_PRECISION_64 (1<<23) |
|
- | 3872 | #define DDL_SPRITEB_PRECISION_32 (0<<23) |
|
3352 | #define VLV_DDL1 (VLV_DISPLAY_BASE + 0x70050) |
3873 | #define DDL_SPRITEB_SHIFT 16 |
3353 | #define DDL_CURSORA_PRECISION_32 (1<<31) |
3874 | #define DDL_SPRITEA_PRECISION_64 (1<<15) |
- | 3875 | #define DDL_SPRITEA_PRECISION_32 (0<<15) |
|
- | 3876 | #define DDL_SPRITEA_SHIFT 8 |
|
3354 | #define DDL_CURSORA_PRECISION_16 (0<<31) |
3877 | #define DDL_PLANEA_PRECISION_64 (1<<7) |
3355 | #define DDL_CURSORA_SHIFT 24 |
3878 | #define DDL_PLANEA_PRECISION_32 (0<<7) |
3356 | #define DDL_PLANEA_PRECISION_32 (1<<7) |
3879 | #define DDL_PLANEA_SHIFT 0 |
3357 | #define DDL_PLANEA_PRECISION_16 (0<<7) |
3880 | |
- | 3881 | #define VLV_DDL2 (VLV_DISPLAY_BASE + 0x70054) |
|
- | 3882 | #define DDL_CURSORB_PRECISION_64 (1<<31) |
|
- | 3883 | #define DDL_CURSORB_PRECISION_32 (0<<31) |
|
- | 3884 | #define DDL_CURSORB_SHIFT 24 |
|
- | 3885 | #define DDL_SPRITED_PRECISION_64 (1<<23) |
|
- | 3886 | #define DDL_SPRITED_PRECISION_32 (0<<23) |
|
- | 3887 | #define DDL_SPRITED_SHIFT 16 |
|
3358 | #define VLV_DDL2 (VLV_DISPLAY_BASE + 0x70054) |
3888 | #define DDL_SPRITEC_PRECISION_64 (1<<15) |
- | 3889 | #define DDL_SPRITEC_PRECISION_32 (0<<15) |
|
- | 3890 | #define DDL_SPRITEC_SHIFT 8 |
|
- | 3891 | #define DDL_PLANEB_PRECISION_64 (1<<7) |
|
- | 3892 | #define DDL_PLANEB_PRECISION_32 (0<<7) |
|
- | 3893 | #define DDL_PLANEB_SHIFT 0 |
|
- | 3894 | ||
- | 3895 | #define VLV_DDL3 (VLV_DISPLAY_BASE + 0x70058) |
|
- | 3896 | #define DDL_CURSORC_PRECISION_64 (1<<31) |
|
- | 3897 | #define DDL_CURSORC_PRECISION_32 (0<<31) |
|
- | 3898 | #define DDL_CURSORC_SHIFT 24 |
|
- | 3899 | #define DDL_SPRITEF_PRECISION_64 (1<<23) |
|
- | 3900 | #define DDL_SPRITEF_PRECISION_32 (0<<23) |
|
- | 3901 | #define DDL_SPRITEF_SHIFT 16 |
|
3359 | #define DDL_CURSORB_PRECISION_32 (1<<31) |
3902 | #define DDL_SPRITEE_PRECISION_64 (1<<15) |
- | 3903 | #define DDL_SPRITEE_PRECISION_32 (0<<15) |
|
Line 3360... | Line 3904... | ||
3360 | #define DDL_CURSORB_PRECISION_16 (0<<31) |
3904 | #define DDL_SPRITEE_SHIFT 8 |
3361 | #define DDL_CURSORB_SHIFT 24 |
3905 | #define DDL_PLANEC_PRECISION_64 (1<<7) |
3362 | #define DDL_PLANEB_PRECISION_32 (1<<7) |
3906 | #define DDL_PLANEC_PRECISION_32 (0<<7) |
3363 | #define DDL_PLANEB_PRECISION_16 (0<<7) |
3907 | #define DDL_PLANEC_SHIFT 0 |
Line 3466... | Line 4010... | ||
3466 | #define PIPE_FRAME_LOW_MASK 0xff000000 |
4010 | #define PIPE_FRAME_LOW_MASK 0xff000000 |
3467 | #define PIPE_FRAME_LOW_SHIFT 24 |
4011 | #define PIPE_FRAME_LOW_SHIFT 24 |
3468 | #define PIPE_PIXEL_MASK 0x00ffffff |
4012 | #define PIPE_PIXEL_MASK 0x00ffffff |
3469 | #define PIPE_PIXEL_SHIFT 0 |
4013 | #define PIPE_PIXEL_SHIFT 0 |
3470 | /* GM45+ just has to be different */ |
4014 | /* GM45+ just has to be different */ |
3471 | #define _PIPEA_FRMCOUNT_GM45 (dev_priv->info->display_mmio_offset + 0x70040) |
4015 | #define _PIPEA_FRMCOUNT_GM45 0x70040 |
- | 4016 | #define _PIPEA_FLIPCOUNT_GM45 0x70044 |
|
3472 | #define _PIPEA_FLIPCOUNT_GM45 (dev_priv->info->display_mmio_offset + 0x70044) |
4017 | #define PIPE_FRMCOUNT_GM45(pipe) _PIPE2(pipe, _PIPEA_FRMCOUNT_GM45) |
3473 | #define PIPE_FRMCOUNT_GM45(pipe) _PIPE(pipe, _PIPEA_FRMCOUNT_GM45, _PIPEB_FRMCOUNT_GM45) |
4018 | #define PIPE_FLIPCOUNT_GM45(pipe) _PIPE2(pipe, _PIPEA_FLIPCOUNT_GM45) |
Line 3474... | Line 4019... | ||
3474 | 4019 | ||
3475 | /* Cursor A & B regs */ |
4020 | /* Cursor A & B regs */ |
3476 | #define _CURACNTR (dev_priv->info->display_mmio_offset + 0x70080) |
4021 | #define _CURACNTR 0x70080 |
3477 | /* Old style CUR*CNTR flags (desktop 8xx) */ |
4022 | /* Old style CUR*CNTR flags (desktop 8xx) */ |
3478 | #define CURSOR_ENABLE 0x80000000 |
4023 | #define CURSOR_ENABLE 0x80000000 |
3479 | #define CURSOR_GAMMA_ENABLE 0x40000000 |
4024 | #define CURSOR_GAMMA_ENABLE 0x40000000 |
3480 | #define CURSOR_STRIDE_MASK 0x30000000 |
4025 | #define CURSOR_STRIDE_MASK 0x30000000 |
Line 3487... | Line 4032... | ||
3487 | #define CURSOR_FORMAT_ARGB (0x04 << CURSOR_FORMAT_SHIFT) |
4032 | #define CURSOR_FORMAT_ARGB (0x04 << CURSOR_FORMAT_SHIFT) |
3488 | #define CURSOR_FORMAT_XRGB (0x05 << CURSOR_FORMAT_SHIFT) |
4033 | #define CURSOR_FORMAT_XRGB (0x05 << CURSOR_FORMAT_SHIFT) |
3489 | /* New style CUR*CNTR flags */ |
4034 | /* New style CUR*CNTR flags */ |
3490 | #define CURSOR_MODE 0x27 |
4035 | #define CURSOR_MODE 0x27 |
3491 | #define CURSOR_MODE_DISABLE 0x00 |
4036 | #define CURSOR_MODE_DISABLE 0x00 |
- | 4037 | #define CURSOR_MODE_128_32B_AX 0x02 |
|
- | 4038 | #define CURSOR_MODE_256_32B_AX 0x03 |
|
3492 | #define CURSOR_MODE_64_32B_AX 0x07 |
4039 | #define CURSOR_MODE_64_32B_AX 0x07 |
- | 4040 | #define CURSOR_MODE_128_ARGB_AX ((1 << 5) | CURSOR_MODE_128_32B_AX) |
|
- | 4041 | #define CURSOR_MODE_256_ARGB_AX ((1 << 5) | CURSOR_MODE_256_32B_AX) |
|
3493 | #define CURSOR_MODE_64_ARGB_AX ((1 << 5) | CURSOR_MODE_64_32B_AX) |
4042 | #define CURSOR_MODE_64_ARGB_AX ((1 << 5) | CURSOR_MODE_64_32B_AX) |
3494 | #define MCURSOR_PIPE_SELECT (1 << 28) |
4043 | #define MCURSOR_PIPE_SELECT (1 << 28) |
3495 | #define MCURSOR_PIPE_A 0x00 |
4044 | #define MCURSOR_PIPE_A 0x00 |
3496 | #define MCURSOR_PIPE_B (1 << 28) |
4045 | #define MCURSOR_PIPE_B (1 << 28) |
3497 | #define MCURSOR_GAMMA_ENABLE (1 << 26) |
4046 | #define MCURSOR_GAMMA_ENABLE (1 << 26) |
3498 | #define CURSOR_TRICKLE_FEED_DISABLE (1 << 14) |
4047 | #define CURSOR_TRICKLE_FEED_DISABLE (1 << 14) |
3499 | #define _CURABASE (dev_priv->info->display_mmio_offset + 0x70084) |
4048 | #define _CURABASE 0x70084 |
3500 | #define _CURAPOS (dev_priv->info->display_mmio_offset + 0x70088) |
4049 | #define _CURAPOS 0x70088 |
3501 | #define CURSOR_POS_MASK 0x007FF |
4050 | #define CURSOR_POS_MASK 0x007FF |
3502 | #define CURSOR_POS_SIGN 0x8000 |
4051 | #define CURSOR_POS_SIGN 0x8000 |
3503 | #define CURSOR_X_SHIFT 0 |
4052 | #define CURSOR_X_SHIFT 0 |
3504 | #define CURSOR_Y_SHIFT 16 |
4053 | #define CURSOR_Y_SHIFT 16 |
3505 | #define CURSIZE 0x700a0 |
4054 | #define CURSIZE 0x700a0 |
3506 | #define _CURBCNTR (dev_priv->info->display_mmio_offset + 0x700c0) |
4055 | #define _CURBCNTR 0x700c0 |
3507 | #define _CURBBASE (dev_priv->info->display_mmio_offset + 0x700c4) |
4056 | #define _CURBBASE 0x700c4 |
3508 | #define _CURBPOS (dev_priv->info->display_mmio_offset + 0x700c8) |
4057 | #define _CURBPOS 0x700c8 |
Line 3509... | Line 4058... | ||
3509 | 4058 | ||
3510 | #define _CURBCNTR_IVB 0x71080 |
4059 | #define _CURBCNTR_IVB 0x71080 |
3511 | #define _CURBBASE_IVB 0x71084 |
4060 | #define _CURBBASE_IVB 0x71084 |
Line -... | Line 4061... | ||
- | 4061 | #define _CURBPOS_IVB 0x71088 |
|
- | 4062 | ||
- | 4063 | #define _CURSOR2(pipe, reg) (dev_priv->info.cursor_offsets[(pipe)] - \ |
|
- | 4064 | dev_priv->info.cursor_offsets[PIPE_A] + (reg) + \ |
|
3512 | #define _CURBPOS_IVB 0x71088 |
4065 | dev_priv->info.display_mmio_offset) |
3513 | 4066 | ||
3514 | #define CURCNTR(pipe) _PIPE(pipe, _CURACNTR, _CURBCNTR) |
4067 | #define CURCNTR(pipe) _CURSOR2(pipe, _CURACNTR) |
3515 | #define CURBASE(pipe) _PIPE(pipe, _CURABASE, _CURBBASE) |
4068 | #define CURBASE(pipe) _CURSOR2(pipe, _CURABASE) |
- | 4069 | #define CURPOS(pipe) _CURSOR2(pipe, _CURAPOS) |
|
3516 | #define CURPOS(pipe) _PIPE(pipe, _CURAPOS, _CURBPOS) |
4070 | |
- | 4071 | #define CURSOR_A_OFFSET 0x70080 |
|
3517 | 4072 | #define CURSOR_B_OFFSET 0x700c0 |
|
3518 | #define CURCNTR_IVB(pipe) _PIPE(pipe, _CURACNTR, _CURBCNTR_IVB) |
4073 | #define CHV_CURSOR_C_OFFSET 0x700e0 |
Line 3519... | Line 4074... | ||
3519 | #define CURBASE_IVB(pipe) _PIPE(pipe, _CURABASE, _CURBBASE_IVB) |
4074 | #define IVB_CURSOR_B_OFFSET 0x71080 |
3520 | #define CURPOS_IVB(pipe) _PIPE(pipe, _CURAPOS, _CURBPOS_IVB) |
4075 | #define IVB_CURSOR_C_OFFSET 0x72080 |
3521 | 4076 | ||
3522 | /* Display A control */ |
4077 | /* Display A control */ |
3523 | #define _DSPACNTR (dev_priv->info->display_mmio_offset + 0x70180) |
4078 | #define _DSPACNTR 0x70180 |
3524 | #define DISPLAY_PLANE_ENABLE (1<<31) |
4079 | #define DISPLAY_PLANE_ENABLE (1<<31) |
3525 | #define DISPLAY_PLANE_DISABLE 0 |
4080 | #define DISPLAY_PLANE_DISABLE 0 |
Line 3552... | Line 4107... | ||
3552 | #define DISPPLANE_NO_LINE_DOUBLE 0 |
4107 | #define DISPPLANE_NO_LINE_DOUBLE 0 |
3553 | #define DISPPLANE_STEREO_POLARITY_FIRST 0 |
4108 | #define DISPPLANE_STEREO_POLARITY_FIRST 0 |
3554 | #define DISPPLANE_STEREO_POLARITY_SECOND (1<<18) |
4109 | #define DISPPLANE_STEREO_POLARITY_SECOND (1<<18) |
3555 | #define DISPPLANE_TRICKLE_FEED_DISABLE (1<<14) /* Ironlake */ |
4110 | #define DISPPLANE_TRICKLE_FEED_DISABLE (1<<14) /* Ironlake */ |
3556 | #define DISPPLANE_TILED (1<<10) |
4111 | #define DISPPLANE_TILED (1<<10) |
3557 | #define _DSPAADDR (dev_priv->info->display_mmio_offset + 0x70184) |
4112 | #define _DSPAADDR 0x70184 |
3558 | #define _DSPASTRIDE (dev_priv->info->display_mmio_offset + 0x70188) |
4113 | #define _DSPASTRIDE 0x70188 |
3559 | #define _DSPAPOS (dev_priv->info->display_mmio_offset + 0x7018C) /* reserved */ |
4114 | #define _DSPAPOS 0x7018C /* reserved */ |
3560 | #define _DSPASIZE (dev_priv->info->display_mmio_offset + 0x70190) |
4115 | #define _DSPASIZE 0x70190 |
3561 | #define _DSPASURF (dev_priv->info->display_mmio_offset + 0x7019C) /* 965+ only */ |
4116 | #define _DSPASURF 0x7019C /* 965+ only */ |
3562 | #define _DSPATILEOFF (dev_priv->info->display_mmio_offset + 0x701A4) /* 965+ only */ |
4117 | #define _DSPATILEOFF 0x701A4 /* 965+ only */ |
3563 | #define _DSPAOFFSET (dev_priv->info->display_mmio_offset + 0x701A4) /* HSW */ |
4118 | #define _DSPAOFFSET 0x701A4 /* HSW */ |
3564 | #define _DSPASURFLIVE (dev_priv->info->display_mmio_offset + 0x701AC) |
4119 | #define _DSPASURFLIVE 0x701AC |
3565 | 4120 | ||
3566 | #define DSPCNTR(plane) _PIPE(plane, _DSPACNTR, _DSPBCNTR) |
4121 | #define DSPCNTR(plane) _PIPE2(plane, _DSPACNTR) |
3567 | #define DSPADDR(plane) _PIPE(plane, _DSPAADDR, _DSPBADDR) |
4122 | #define DSPADDR(plane) _PIPE2(plane, _DSPAADDR) |
3568 | #define DSPSTRIDE(plane) _PIPE(plane, _DSPASTRIDE, _DSPBSTRIDE) |
4123 | #define DSPSTRIDE(plane) _PIPE2(plane, _DSPASTRIDE) |
3569 | #define DSPPOS(plane) _PIPE(plane, _DSPAPOS, _DSPBPOS) |
4124 | #define DSPPOS(plane) _PIPE2(plane, _DSPAPOS) |
3570 | #define DSPSIZE(plane) _PIPE(plane, _DSPASIZE, _DSPBSIZE) |
4125 | #define DSPSIZE(plane) _PIPE2(plane, _DSPASIZE) |
3571 | #define DSPSURF(plane) _PIPE(plane, _DSPASURF, _DSPBSURF) |
4126 | #define DSPSURF(plane) _PIPE2(plane, _DSPASURF) |
3572 | #define DSPTILEOFF(plane) _PIPE(plane, _DSPATILEOFF, _DSPBTILEOFF) |
4127 | #define DSPTILEOFF(plane) _PIPE2(plane, _DSPATILEOFF) |
3573 | #define DSPLINOFF(plane) DSPADDR(plane) |
4128 | #define DSPLINOFF(plane) DSPADDR(plane) |
3574 | #define DSPOFFSET(plane) _PIPE(plane, _DSPAOFFSET, _DSPBOFFSET) |
4129 | #define DSPOFFSET(plane) _PIPE2(plane, _DSPAOFFSET) |
3575 | #define DSPSURFLIVE(plane) _PIPE(plane, _DSPASURFLIVE, _DSPBSURFLIVE) |
4130 | #define DSPSURFLIVE(plane) _PIPE2(plane, _DSPASURFLIVE) |
Line 3576... | Line 4131... | ||
3576 | 4131 | ||
3577 | /* Display/Sprite base address macros */ |
4132 | /* Display/Sprite base address macros */ |
3578 | #define DISP_BASEADDR_MASK (0xfffff000) |
4133 | #define DISP_BASEADDR_MASK (0xfffff000) |
3579 | #define I915_LO_DISPBASE(val) (val & ~DISP_BASEADDR_MASK) |
4134 | #define I915_LO_DISPBASE(val) (val & ~DISP_BASEADDR_MASK) |
Line 3580... | Line 4135... | ||
3580 | #define I915_HI_DISPBASE(val) (val & DISP_BASEADDR_MASK) |
4135 | #define I915_HI_DISPBASE(val) (val & DISP_BASEADDR_MASK) |
3581 | 4136 | ||
3582 | /* VBIOS flags */ |
4137 | /* VBIOS flags */ |
3583 | #define SWF00 (dev_priv->info->display_mmio_offset + 0x71410) |
4138 | #define SWF00 (dev_priv->info.display_mmio_offset + 0x71410) |
3584 | #define SWF01 (dev_priv->info->display_mmio_offset + 0x71414) |
4139 | #define SWF01 (dev_priv->info.display_mmio_offset + 0x71414) |
3585 | #define SWF02 (dev_priv->info->display_mmio_offset + 0x71418) |
4140 | #define SWF02 (dev_priv->info.display_mmio_offset + 0x71418) |
3586 | #define SWF03 (dev_priv->info->display_mmio_offset + 0x7141c) |
4141 | #define SWF03 (dev_priv->info.display_mmio_offset + 0x7141c) |
3587 | #define SWF04 (dev_priv->info->display_mmio_offset + 0x71420) |
4142 | #define SWF04 (dev_priv->info.display_mmio_offset + 0x71420) |
3588 | #define SWF05 (dev_priv->info->display_mmio_offset + 0x71424) |
4143 | #define SWF05 (dev_priv->info.display_mmio_offset + 0x71424) |
3589 | #define SWF06 (dev_priv->info->display_mmio_offset + 0x71428) |
4144 | #define SWF06 (dev_priv->info.display_mmio_offset + 0x71428) |
3590 | #define SWF10 (dev_priv->info->display_mmio_offset + 0x70410) |
4145 | #define SWF10 (dev_priv->info.display_mmio_offset + 0x70410) |
3591 | #define SWF11 (dev_priv->info->display_mmio_offset + 0x70414) |
4146 | #define SWF11 (dev_priv->info.display_mmio_offset + 0x70414) |
3592 | #define SWF14 (dev_priv->info->display_mmio_offset + 0x71420) |
4147 | #define SWF14 (dev_priv->info.display_mmio_offset + 0x71420) |
3593 | #define SWF30 (dev_priv->info->display_mmio_offset + 0x72414) |
4148 | #define SWF30 (dev_priv->info.display_mmio_offset + 0x72414) |
Line 3594... | Line 4149... | ||
3594 | #define SWF31 (dev_priv->info->display_mmio_offset + 0x72418) |
4149 | #define SWF31 (dev_priv->info.display_mmio_offset + 0x72418) |
3595 | #define SWF32 (dev_priv->info->display_mmio_offset + 0x7241c) |
4150 | #define SWF32 (dev_priv->info.display_mmio_offset + 0x7241c) |
3596 | 4151 | ||
3597 | /* Pipe B */ |
4152 | /* Pipe B */ |
3598 | #define _PIPEBDSL (dev_priv->info->display_mmio_offset + 0x71000) |
4153 | #define _PIPEBDSL (dev_priv->info.display_mmio_offset + 0x71000) |
3599 | #define _PIPEBCONF (dev_priv->info->display_mmio_offset + 0x71008) |
4154 | #define _PIPEBCONF (dev_priv->info.display_mmio_offset + 0x71008) |
3600 | #define _PIPEBSTAT (dev_priv->info->display_mmio_offset + 0x71024) |
4155 | #define _PIPEBSTAT (dev_priv->info.display_mmio_offset + 0x71024) |
3601 | #define _PIPEBFRAMEHIGH 0x71040 |
4156 | #define _PIPEBFRAMEHIGH 0x71040 |
Line 3602... | Line 4157... | ||
3602 | #define _PIPEBFRAMEPIXEL 0x71044 |
4157 | #define _PIPEBFRAMEPIXEL 0x71044 |
3603 | #define _PIPEB_FRMCOUNT_GM45 (dev_priv->info->display_mmio_offset + 0x71040) |
4158 | #define _PIPEB_FRMCOUNT_GM45 (dev_priv->info.display_mmio_offset + 0x71040) |
3604 | #define _PIPEB_FLIPCOUNT_GM45 (dev_priv->info->display_mmio_offset + 0x71044) |
4159 | #define _PIPEB_FLIPCOUNT_GM45 (dev_priv->info.display_mmio_offset + 0x71044) |
3605 | 4160 | ||
3606 | 4161 | ||
3607 | /* Display B control */ |
4162 | /* Display B control */ |
3608 | #define _DSPBCNTR (dev_priv->info->display_mmio_offset + 0x71180) |
4163 | #define _DSPBCNTR (dev_priv->info.display_mmio_offset + 0x71180) |
3609 | #define DISPPLANE_ALPHA_TRANS_ENABLE (1<<15) |
4164 | #define DISPPLANE_ALPHA_TRANS_ENABLE (1<<15) |
3610 | #define DISPPLANE_ALPHA_TRANS_DISABLE 0 |
4165 | #define DISPPLANE_ALPHA_TRANS_DISABLE 0 |
3611 | #define DISPPLANE_SPRITE_ABOVE_DISPLAY 0 |
4166 | #define DISPPLANE_SPRITE_ABOVE_DISPLAY 0 |
3612 | #define DISPPLANE_SPRITE_ABOVE_OVERLAY (1) |
4167 | #define DISPPLANE_SPRITE_ABOVE_OVERLAY (1) |
3613 | #define _DSPBADDR (dev_priv->info->display_mmio_offset + 0x71184) |
4168 | #define _DSPBADDR (dev_priv->info.display_mmio_offset + 0x71184) |
3614 | #define _DSPBSTRIDE (dev_priv->info->display_mmio_offset + 0x71188) |
4169 | #define _DSPBSTRIDE (dev_priv->info.display_mmio_offset + 0x71188) |
3615 | #define _DSPBPOS (dev_priv->info->display_mmio_offset + 0x7118C) |
4170 | #define _DSPBPOS (dev_priv->info.display_mmio_offset + 0x7118C) |
Line 3616... | Line 4171... | ||
3616 | #define _DSPBSIZE (dev_priv->info->display_mmio_offset + 0x71190) |
4171 | #define _DSPBSIZE (dev_priv->info.display_mmio_offset + 0x71190) |
3617 | #define _DSPBSURF (dev_priv->info->display_mmio_offset + 0x7119C) |
4172 | #define _DSPBSURF (dev_priv->info.display_mmio_offset + 0x7119C) |
3618 | #define _DSPBTILEOFF (dev_priv->info->display_mmio_offset + 0x711A4) |
4173 | #define _DSPBTILEOFF (dev_priv->info.display_mmio_offset + 0x711A4) |
3619 | #define _DSPBOFFSET (dev_priv->info->display_mmio_offset + 0x711A4) |
4174 | #define _DSPBOFFSET (dev_priv->info.display_mmio_offset + 0x711A4) |
Line 3864... | Line 4419... | ||
3864 | #define FDI_PLL_FREQ_CHANGE_REQUEST (1<<24) |
4419 | #define FDI_PLL_FREQ_CHANGE_REQUEST (1<<24) |
3865 | #define FDI_PLL_FREQ_LOCK_LIMIT_MASK 0xfff00 |
4420 | #define FDI_PLL_FREQ_LOCK_LIMIT_MASK 0xfff00 |
3866 | #define FDI_PLL_FREQ_DISABLE_COUNT_LIMIT_MASK 0xff |
4421 | #define FDI_PLL_FREQ_DISABLE_COUNT_LIMIT_MASK 0xff |
Line 3867... | Line 4422... | ||
3867 | 4422 | ||
3868 | 4423 | ||
3869 | #define _PIPEA_DATA_M1 (dev_priv->info->display_mmio_offset + 0x60030) |
4424 | #define _PIPEA_DATA_M1 0x60030 |
3870 | #define PIPE_DATA_M1_OFFSET 0 |
4425 | #define PIPE_DATA_M1_OFFSET 0 |
Line 3871... | Line 4426... | ||
3871 | #define _PIPEA_DATA_N1 (dev_priv->info->display_mmio_offset + 0x60034) |
4426 | #define _PIPEA_DATA_N1 0x60034 |
3872 | #define PIPE_DATA_N1_OFFSET 0 |
4427 | #define PIPE_DATA_N1_OFFSET 0 |
3873 | 4428 | ||
3874 | #define _PIPEA_DATA_M2 (dev_priv->info->display_mmio_offset + 0x60038) |
4429 | #define _PIPEA_DATA_M2 0x60038 |
Line 3875... | Line 4430... | ||
3875 | #define PIPE_DATA_M2_OFFSET 0 |
4430 | #define PIPE_DATA_M2_OFFSET 0 |
3876 | #define _PIPEA_DATA_N2 (dev_priv->info->display_mmio_offset + 0x6003c) |
4431 | #define _PIPEA_DATA_N2 0x6003c |
3877 | #define PIPE_DATA_N2_OFFSET 0 |
4432 | #define PIPE_DATA_N2_OFFSET 0 |
3878 | 4433 | ||
Line 3879... | Line 4434... | ||
3879 | #define _PIPEA_LINK_M1 (dev_priv->info->display_mmio_offset + 0x60040) |
4434 | #define _PIPEA_LINK_M1 0x60040 |
3880 | #define PIPE_LINK_M1_OFFSET 0 |
4435 | #define PIPE_LINK_M1_OFFSET 0 |
3881 | #define _PIPEA_LINK_N1 (dev_priv->info->display_mmio_offset + 0x60044) |
4436 | #define _PIPEA_LINK_N1 0x60044 |
3882 | #define PIPE_LINK_N1_OFFSET 0 |
4437 | #define PIPE_LINK_N1_OFFSET 0 |
Line 3883... | Line 4438... | ||
3883 | 4438 | ||
Line 3884... | Line 4439... | ||
3884 | #define _PIPEA_LINK_M2 (dev_priv->info->display_mmio_offset + 0x60048) |
4439 | #define _PIPEA_LINK_M2 0x60048 |
3885 | #define PIPE_LINK_M2_OFFSET 0 |
4440 | #define PIPE_LINK_M2_OFFSET 0 |
3886 | #define _PIPEA_LINK_N2 (dev_priv->info->display_mmio_offset + 0x6004c) |
- | |
3887 | #define PIPE_LINK_N2_OFFSET 0 |
4441 | #define _PIPEA_LINK_N2 0x6004c |
3888 | 4442 | #define PIPE_LINK_N2_OFFSET 0 |
|
3889 | /* PIPEB timing regs are same start from 0x61000 */ |
- | |
3890 | 4443 | ||
3891 | #define _PIPEB_DATA_M1 (dev_priv->info->display_mmio_offset + 0x61030) |
4444 | /* PIPEB timing regs are same start from 0x61000 */ |
3892 | #define _PIPEB_DATA_N1 (dev_priv->info->display_mmio_offset + 0x61034) |
- | |
3893 | 4445 | ||
3894 | #define _PIPEB_DATA_M2 (dev_priv->info->display_mmio_offset + 0x61038) |
4446 | #define _PIPEB_DATA_M1 0x61030 |
3895 | #define _PIPEB_DATA_N2 (dev_priv->info->display_mmio_offset + 0x6103c) |
4447 | #define _PIPEB_DATA_N1 0x61034 |
3896 | 4448 | #define _PIPEB_DATA_M2 0x61038 |
|
3897 | #define _PIPEB_LINK_M1 (dev_priv->info->display_mmio_offset + 0x61040) |
4449 | #define _PIPEB_DATA_N2 0x6103c |
3898 | #define _PIPEB_LINK_N1 (dev_priv->info->display_mmio_offset + 0x61044) |
4450 | #define _PIPEB_LINK_M1 0x61040 |
3899 | 4451 | #define _PIPEB_LINK_N1 0x61044 |
|
3900 | #define _PIPEB_LINK_M2 (dev_priv->info->display_mmio_offset + 0x61048) |
4452 | #define _PIPEB_LINK_M2 0x61048 |
3901 | #define _PIPEB_LINK_N2 (dev_priv->info->display_mmio_offset + 0x6104c) |
4453 | #define _PIPEB_LINK_N2 0x6104c |
3902 | 4454 | ||
3903 | #define PIPE_DATA_M1(tran) _TRANSCODER(tran, _PIPEA_DATA_M1, _PIPEB_DATA_M1) |
4455 | #define PIPE_DATA_M1(tran) _TRANSCODER2(tran, _PIPEA_DATA_M1) |
Line 3904... | Line 4456... | ||
3904 | #define PIPE_DATA_N1(tran) _TRANSCODER(tran, _PIPEA_DATA_N1, _PIPEB_DATA_N1) |
4456 | #define PIPE_DATA_N1(tran) _TRANSCODER2(tran, _PIPEA_DATA_N1) |
3905 | #define PIPE_DATA_M2(tran) _TRANSCODER(tran, _PIPEA_DATA_M2, _PIPEB_DATA_M2) |
4457 | #define PIPE_DATA_M2(tran) _TRANSCODER2(tran, _PIPEA_DATA_M2) |
3906 | #define PIPE_DATA_N2(tran) _TRANSCODER(tran, _PIPEA_DATA_N2, _PIPEB_DATA_N2) |
4458 | #define PIPE_DATA_N2(tran) _TRANSCODER2(tran, _PIPEA_DATA_N2) |
3907 | #define PIPE_LINK_M1(tran) _TRANSCODER(tran, _PIPEA_LINK_M1, _PIPEB_LINK_M1) |
4459 | #define PIPE_LINK_M1(tran) _TRANSCODER2(tran, _PIPEA_LINK_M1) |
Line 4023... | Line 4575... | ||
4023 | #define GEN8_DE_PIPE_C_IRQ (1<<18) |
4575 | #define GEN8_DE_PIPE_C_IRQ (1<<18) |
4024 | #define GEN8_DE_PIPE_B_IRQ (1<<17) |
4576 | #define GEN8_DE_PIPE_B_IRQ (1<<17) |
4025 | #define GEN8_DE_PIPE_A_IRQ (1<<16) |
4577 | #define GEN8_DE_PIPE_A_IRQ (1<<16) |
4026 | #define GEN8_DE_PIPE_IRQ(pipe) (1<<(16+pipe)) |
4578 | #define GEN8_DE_PIPE_IRQ(pipe) (1<<(16+pipe)) |
4027 | #define GEN8_GT_VECS_IRQ (1<<6) |
4579 | #define GEN8_GT_VECS_IRQ (1<<6) |
- | 4580 | #define GEN8_GT_PM_IRQ (1<<4) |
|
4028 | #define GEN8_GT_VCS2_IRQ (1<<3) |
4581 | #define GEN8_GT_VCS2_IRQ (1<<3) |
4029 | #define GEN8_GT_VCS1_IRQ (1<<2) |
4582 | #define GEN8_GT_VCS1_IRQ (1<<2) |
4030 | #define GEN8_GT_BCS_IRQ (1<<1) |
4583 | #define GEN8_GT_BCS_IRQ (1<<1) |
4031 | #define GEN8_GT_RCS_IRQ (1<<0) |
4584 | #define GEN8_GT_RCS_IRQ (1<<0) |
Line 4050... | Line 4603... | ||
4050 | #define GEN8_PIPE_CDCLK_CRC_DONE (1 << 28) |
4603 | #define GEN8_PIPE_CDCLK_CRC_DONE (1 << 28) |
4051 | #define GEN8_PIPE_CURSOR_FAULT (1 << 10) |
4604 | #define GEN8_PIPE_CURSOR_FAULT (1 << 10) |
4052 | #define GEN8_PIPE_SPRITE_FAULT (1 << 9) |
4605 | #define GEN8_PIPE_SPRITE_FAULT (1 << 9) |
4053 | #define GEN8_PIPE_PRIMARY_FAULT (1 << 8) |
4606 | #define GEN8_PIPE_PRIMARY_FAULT (1 << 8) |
4054 | #define GEN8_PIPE_SPRITE_FLIP_DONE (1 << 5) |
4607 | #define GEN8_PIPE_SPRITE_FLIP_DONE (1 << 5) |
4055 | #define GEN8_PIPE_FLIP_DONE (1 << 4) |
4608 | #define GEN8_PIPE_PRIMARY_FLIP_DONE (1 << 4) |
4056 | #define GEN8_PIPE_SCAN_LINE_EVENT (1 << 2) |
4609 | #define GEN8_PIPE_SCAN_LINE_EVENT (1 << 2) |
4057 | #define GEN8_PIPE_VSYNC (1 << 1) |
4610 | #define GEN8_PIPE_VSYNC (1 << 1) |
4058 | #define GEN8_PIPE_VBLANK (1 << 0) |
4611 | #define GEN8_PIPE_VBLANK (1 << 0) |
4059 | #define GEN8_DE_PIPE_IRQ_FAULT_ERRORS \ |
4612 | #define GEN8_DE_PIPE_IRQ_FAULT_ERRORS \ |
4060 | (GEN8_PIPE_CURSOR_FAULT | \ |
4613 | (GEN8_PIPE_CURSOR_FAULT | \ |
Line 4082... | Line 4635... | ||
4082 | #define ILK_DISPLAY_CHICKEN2 0x42004 |
4635 | #define ILK_DISPLAY_CHICKEN2 0x42004 |
4083 | /* Required on all Ironlake and Sandybridge according to the B-Spec. */ |
4636 | /* Required on all Ironlake and Sandybridge according to the B-Spec. */ |
4084 | #define ILK_ELPIN_409_SELECT (1 << 25) |
4637 | #define ILK_ELPIN_409_SELECT (1 << 25) |
4085 | #define ILK_DPARB_GATE (1<<22) |
4638 | #define ILK_DPARB_GATE (1<<22) |
4086 | #define ILK_VSDPFD_FULL (1<<21) |
4639 | #define ILK_VSDPFD_FULL (1<<21) |
4087 | #define ILK_DISPLAY_CHICKEN_FUSES 0x42014 |
4640 | #define FUSE_STRAP 0x42014 |
4088 | #define ILK_INTERNAL_GRAPHICS_DISABLE (1<<31) |
4641 | #define ILK_INTERNAL_GRAPHICS_DISABLE (1 << 31) |
4089 | #define ILK_INTERNAL_DISPLAY_DISABLE (1<<30) |
4642 | #define ILK_INTERNAL_DISPLAY_DISABLE (1 << 30) |
4090 | #define ILK_DISPLAY_DEBUG_DISABLE (1<<29) |
4643 | #define ILK_DISPLAY_DEBUG_DISABLE (1 << 29) |
4091 | #define ILK_HDCP_DISABLE (1<<25) |
4644 | #define ILK_HDCP_DISABLE (1 << 25) |
4092 | #define ILK_eDP_A_DISABLE (1<<24) |
4645 | #define ILK_eDP_A_DISABLE (1 << 24) |
- | 4646 | #define HSW_CDCLK_LIMIT (1 << 24) |
|
4093 | #define ILK_DESKTOP (1<<23) |
4647 | #define ILK_DESKTOP (1 << 23) |
Line 4094... | Line 4648... | ||
4094 | 4648 | ||
4095 | #define ILK_DSPCLK_GATE_D 0x42020 |
4649 | #define ILK_DSPCLK_GATE_D 0x42020 |
4096 | #define ILK_VRHUNIT_CLOCK_GATE_DISABLE (1 << 28) |
4650 | #define ILK_VRHUNIT_CLOCK_GATE_DISABLE (1 << 28) |
Line 4107... | Line 4661... | ||
4107 | #define DPA_MASK_VBLANK_SRD (1 << 15) |
4661 | #define DPA_MASK_VBLANK_SRD (1 << 15) |
4108 | #define FORCE_ARB_IDLE_PLANES (1 << 14) |
4662 | #define FORCE_ARB_IDLE_PLANES (1 << 14) |
Line 4109... | Line 4663... | ||
4109 | 4663 | ||
4110 | #define _CHICKEN_PIPESL_1_A 0x420b0 |
4664 | #define _CHICKEN_PIPESL_1_A 0x420b0 |
- | 4665 | #define _CHICKEN_PIPESL_1_B 0x420b4 |
|
4111 | #define _CHICKEN_PIPESL_1_B 0x420b4 |
4666 | #define HSW_FBCQ_DIS (1 << 22) |
4112 | #define DPRS_MASK_VBLANK_SRD (1 << 0) |
4667 | #define BDW_DPRS_MASK_VBLANK_SRD (1 << 0) |
Line 4113... | Line 4668... | ||
4113 | #define CHICKEN_PIPESL_1(pipe) _PIPE(pipe, _CHICKEN_PIPESL_1_A, _CHICKEN_PIPESL_1_B) |
4668 | #define CHICKEN_PIPESL_1(pipe) _PIPE(pipe, _CHICKEN_PIPESL_1_A, _CHICKEN_PIPESL_1_B) |
4114 | 4669 | ||
4115 | #define DISP_ARB_CTL 0x45000 |
4670 | #define DISP_ARB_CTL 0x45000 |
4116 | #define DISP_TILE_SURFACE_SWIZZLING (1<<13) |
4671 | #define DISP_TILE_SURFACE_SWIZZLING (1<<13) |
4117 | #define DISP_FBC_WM_DIS (1<<15) |
4672 | #define DISP_FBC_WM_DIS (1<<15) |
4118 | #define DISP_ARB_CTL2 0x45004 |
4673 | #define DISP_ARB_CTL2 0x45004 |
4119 | #define DISP_DATA_PARTITION_5_6 (1<<6) |
4674 | #define DISP_DATA_PARTITION_5_6 (1<<6) |
4120 | #define GEN7_MSG_CTL 0x45010 |
4675 | #define GEN7_MSG_CTL 0x45010 |
- | 4676 | #define WAIT_FOR_PCH_RESET_ACK (1<<1) |
|
- | 4677 | #define WAIT_FOR_PCH_FLR_ACK (1<<0) |
|
Line 4121... | Line 4678... | ||
4121 | #define WAIT_FOR_PCH_RESET_ACK (1<<1) |
4678 | #define HSW_NDE_RSTWRN_OPT 0x46408 |
4122 | #define WAIT_FOR_PCH_FLR_ACK (1<<0) |
4679 | #define RESET_PCH_HANDSHAKE_ENABLE (1<<4) |
4123 | 4680 | ||
4124 | /* GEN7 chicken */ |
4681 | /* GEN7 chicken */ |
4125 | #define GEN7_COMMON_SLICE_CHICKEN1 0x7010 |
4682 | #define GEN7_COMMON_SLICE_CHICKEN1 0x7010 |
Line -... | Line 4683... | ||
- | 4683 | # define GEN7_CSC1_RHWO_OPT_DISABLE_IN_RCC ((1<<10) | (1<<26)) |
|
- | 4684 | #define COMMON_SLICE_CHICKEN2 0x7014 |
|
- | 4685 | # define GEN8_CSC2_SBE_VUE_CACHE_CONSERVATIVE (1<<0) |
|
4126 | # define GEN7_CSC1_RHWO_OPT_DISABLE_IN_RCC ((1<<10) | (1<<26)) |
4686 | |
4127 | #define COMMON_SLICE_CHICKEN2 0x7014 |
4687 | #define GEN7_L3SQCREG1 0xB010 |
4128 | # define GEN8_CSC2_SBE_VUE_CACHE_CONSERVATIVE (1<<0) |
4688 | #define VLV_B0_WA_L3SQCREG1_VALUE 0x00D30000 |
- | 4689 | ||
- | 4690 | #define GEN7_L3CNTLREG1 0xB01C |
|
Line 4129... | Line 4691... | ||
4129 | 4691 | #define GEN7_WA_FOR_GEN7_L3_CONTROL 0x3C47FF8C |
|
4130 | #define GEN7_L3CNTLREG1 0xB01C |
4692 | #define GEN7_L3AGDIS (1<<19) |
Line 4131... | Line 4693... | ||
4131 | #define GEN7_WA_FOR_GEN7_L3_CONTROL 0x3C4FFF8C |
4693 | #define GEN7_L3CNTLREG2 0xB020 |
Line 4146... | Line 4708... | ||
4146 | #define GEN7_SQ_CHICKEN_MBCUNIT_SQINTMOB (1<<11) |
4708 | #define GEN7_SQ_CHICKEN_MBCUNIT_SQINTMOB (1<<11) |
Line 4147... | Line 4709... | ||
4147 | 4709 | ||
4148 | #define HSW_SCRATCH1 0xb038 |
4710 | #define HSW_SCRATCH1 0xb038 |
Line 4149... | Line -... | ||
4149 | #define HSW_SCRATCH1_L3_DATA_ATOMICS_DISABLE (1<<27) |
- | |
4150 | - | ||
4151 | #define HSW_FUSE_STRAP 0x42014 |
- | |
4152 | #define HSW_CDCLK_LIMIT (1 << 24) |
4711 | #define HSW_SCRATCH1_L3_DATA_ATOMICS_DISABLE (1<<27) |
Line 4153... | Line 4712... | ||
4153 | 4712 | ||
4154 | /* PCH */ |
4713 | /* PCH */ |
4155 | 4714 | ||
Line 4377... | Line 4936... | ||
4377 | #define _PCH_TRANSA_LINK_M1 0xe0040 |
4936 | #define _PCH_TRANSA_LINK_M1 0xe0040 |
4378 | #define _PCH_TRANSA_LINK_N1 0xe0044 |
4937 | #define _PCH_TRANSA_LINK_N1 0xe0044 |
4379 | #define _PCH_TRANSA_LINK_M2 0xe0048 |
4938 | #define _PCH_TRANSA_LINK_M2 0xe0048 |
4380 | #define _PCH_TRANSA_LINK_N2 0xe004c |
4939 | #define _PCH_TRANSA_LINK_N2 0xe004c |
Line 4381... | Line 4940... | ||
4381 | 4940 | ||
4382 | /* Per-transcoder DIP controls */ |
- | |
4383 | 4941 | /* Per-transcoder DIP controls (PCH) */ |
|
4384 | #define _VIDEO_DIP_CTL_A 0xe0200 |
4942 | #define _VIDEO_DIP_CTL_A 0xe0200 |
4385 | #define _VIDEO_DIP_DATA_A 0xe0208 |
4943 | #define _VIDEO_DIP_DATA_A 0xe0208 |
Line 4386... | Line 4944... | ||
4386 | #define _VIDEO_DIP_GCP_A 0xe0210 |
4944 | #define _VIDEO_DIP_GCP_A 0xe0210 |
Line 4391... | Line 4949... | ||
4391 | 4949 | ||
4392 | #define TVIDEO_DIP_CTL(pipe) _PIPE(pipe, _VIDEO_DIP_CTL_A, _VIDEO_DIP_CTL_B) |
4950 | #define TVIDEO_DIP_CTL(pipe) _PIPE(pipe, _VIDEO_DIP_CTL_A, _VIDEO_DIP_CTL_B) |
4393 | #define TVIDEO_DIP_DATA(pipe) _PIPE(pipe, _VIDEO_DIP_DATA_A, _VIDEO_DIP_DATA_B) |
4951 | #define TVIDEO_DIP_DATA(pipe) _PIPE(pipe, _VIDEO_DIP_DATA_A, _VIDEO_DIP_DATA_B) |
Line -... | Line 4952... | ||
- | 4952 | #define TVIDEO_DIP_GCP(pipe) _PIPE(pipe, _VIDEO_DIP_GCP_A, _VIDEO_DIP_GCP_B) |
|
4394 | #define TVIDEO_DIP_GCP(pipe) _PIPE(pipe, _VIDEO_DIP_GCP_A, _VIDEO_DIP_GCP_B) |
4953 | |
4395 | 4954 | /* Per-transcoder DIP controls (VLV) */ |
|
4396 | #define VLV_VIDEO_DIP_CTL_A (VLV_DISPLAY_BASE + 0x60200) |
4955 | #define VLV_VIDEO_DIP_CTL_A (VLV_DISPLAY_BASE + 0x60200) |
Line 4397... | Line 4956... | ||
4397 | #define VLV_VIDEO_DIP_DATA_A (VLV_DISPLAY_BASE + 0x60208) |
4956 | #define VLV_VIDEO_DIP_DATA_A (VLV_DISPLAY_BASE + 0x60208) |
4398 | #define VLV_VIDEO_DIP_GDCP_PAYLOAD_A (VLV_DISPLAY_BASE + 0x60210) |
4957 | #define VLV_VIDEO_DIP_GDCP_PAYLOAD_A (VLV_DISPLAY_BASE + 0x60210) |
4399 | 4958 | ||
Line -... | Line 4959... | ||
- | 4959 | #define VLV_VIDEO_DIP_CTL_B (VLV_DISPLAY_BASE + 0x61170) |
|
- | 4960 | #define VLV_VIDEO_DIP_DATA_B (VLV_DISPLAY_BASE + 0x61174) |
|
- | 4961 | #define VLV_VIDEO_DIP_GDCP_PAYLOAD_B (VLV_DISPLAY_BASE + 0x61178) |
|
- | 4962 | ||
4400 | #define VLV_VIDEO_DIP_CTL_B (VLV_DISPLAY_BASE + 0x61170) |
4963 | #define CHV_VIDEO_DIP_CTL_C (VLV_DISPLAY_BASE + 0x611f0) |
- | 4964 | #define CHV_VIDEO_DIP_DATA_C (VLV_DISPLAY_BASE + 0x611f4) |
|
4401 | #define VLV_VIDEO_DIP_DATA_B (VLV_DISPLAY_BASE + 0x61174) |
4965 | #define CHV_VIDEO_DIP_GDCP_PAYLOAD_C (VLV_DISPLAY_BASE + 0x611f8) |
4402 | #define VLV_VIDEO_DIP_GDCP_PAYLOAD_B (VLV_DISPLAY_BASE + 0x61178) |
4966 | |
- | 4967 | #define VLV_TVIDEO_DIP_CTL(pipe) \ |
|
4403 | 4968 | _PIPE3((pipe), VLV_VIDEO_DIP_CTL_A, \ |
|
4404 | #define VLV_TVIDEO_DIP_CTL(pipe) \ |
4969 | VLV_VIDEO_DIP_CTL_B, CHV_VIDEO_DIP_CTL_C) |
- | 4970 | #define VLV_TVIDEO_DIP_DATA(pipe) \ |
|
4405 | _PIPE(pipe, VLV_VIDEO_DIP_CTL_A, VLV_VIDEO_DIP_CTL_B) |
4971 | _PIPE3((pipe), VLV_VIDEO_DIP_DATA_A, \ |
Line 4406... | Line 4972... | ||
4406 | #define VLV_TVIDEO_DIP_DATA(pipe) \ |
4972 | VLV_VIDEO_DIP_DATA_B, CHV_VIDEO_DIP_DATA_C) |
4407 | _PIPE(pipe, VLV_VIDEO_DIP_DATA_A, VLV_VIDEO_DIP_DATA_B) |
4973 | #define VLV_TVIDEO_DIP_GCP(pipe) \ |
4408 | #define VLV_TVIDEO_DIP_GCP(pipe) \ |
4974 | _PIPE3((pipe), VLV_VIDEO_DIP_GDCP_PAYLOAD_A, \ |
4409 | _PIPE(pipe, VLV_VIDEO_DIP_GDCP_PAYLOAD_A, VLV_VIDEO_DIP_GDCP_PAYLOAD_B) |
4975 | VLV_VIDEO_DIP_GDCP_PAYLOAD_B, CHV_VIDEO_DIP_GDCP_PAYLOAD_C) |
Line 4434... | Line 5000... | ||
4434 | #define HSW_VIDEO_DIP_GMP_ECC_B 0x61300 |
5000 | #define HSW_VIDEO_DIP_GMP_ECC_B 0x61300 |
4435 | #define HSW_VIDEO_DIP_VSC_ECC_B 0x61344 |
5001 | #define HSW_VIDEO_DIP_VSC_ECC_B 0x61344 |
4436 | #define HSW_VIDEO_DIP_GCP_B 0x61210 |
5002 | #define HSW_VIDEO_DIP_GCP_B 0x61210 |
Line 4437... | Line 5003... | ||
4437 | 5003 | ||
4438 | #define HSW_TVIDEO_DIP_CTL(trans) \ |
5004 | #define HSW_TVIDEO_DIP_CTL(trans) \ |
4439 | _TRANSCODER(trans, HSW_VIDEO_DIP_CTL_A, HSW_VIDEO_DIP_CTL_B) |
5005 | _TRANSCODER2(trans, HSW_VIDEO_DIP_CTL_A) |
4440 | #define HSW_TVIDEO_DIP_AVI_DATA(trans) \ |
5006 | #define HSW_TVIDEO_DIP_AVI_DATA(trans) \ |
4441 | _TRANSCODER(trans, HSW_VIDEO_DIP_AVI_DATA_A, HSW_VIDEO_DIP_AVI_DATA_B) |
5007 | _TRANSCODER2(trans, HSW_VIDEO_DIP_AVI_DATA_A) |
4442 | #define HSW_TVIDEO_DIP_VS_DATA(trans) \ |
5008 | #define HSW_TVIDEO_DIP_VS_DATA(trans) \ |
4443 | _TRANSCODER(trans, HSW_VIDEO_DIP_VS_DATA_A, HSW_VIDEO_DIP_VS_DATA_B) |
5009 | _TRANSCODER2(trans, HSW_VIDEO_DIP_VS_DATA_A) |
4444 | #define HSW_TVIDEO_DIP_SPD_DATA(trans) \ |
5010 | #define HSW_TVIDEO_DIP_SPD_DATA(trans) \ |
4445 | _TRANSCODER(trans, HSW_VIDEO_DIP_SPD_DATA_A, HSW_VIDEO_DIP_SPD_DATA_B) |
5011 | _TRANSCODER2(trans, HSW_VIDEO_DIP_SPD_DATA_A) |
4446 | #define HSW_TVIDEO_DIP_GCP(trans) \ |
5012 | #define HSW_TVIDEO_DIP_GCP(trans) \ |
4447 | _TRANSCODER(trans, HSW_VIDEO_DIP_GCP_A, HSW_VIDEO_DIP_GCP_B) |
5013 | _TRANSCODER2(trans, HSW_VIDEO_DIP_GCP_A) |
4448 | #define HSW_TVIDEO_DIP_VSC_DATA(trans) \ |
5014 | #define HSW_TVIDEO_DIP_VSC_DATA(trans) \ |
Line 4449... | Line 5015... | ||
4449 | _TRANSCODER(trans, HSW_VIDEO_DIP_VSC_DATA_A, HSW_VIDEO_DIP_VSC_DATA_B) |
5015 | _TRANSCODER2(trans, HSW_VIDEO_DIP_VSC_DATA_A) |
4450 | 5016 | ||
4451 | #define HSW_STEREO_3D_CTL_A 0x70020 |
5017 | #define HSW_STEREO_3D_CTL_A 0x70020 |
Line 4452... | Line 5018... | ||
4452 | #define S3D_ENABLE (1<<31) |
5018 | #define S3D_ENABLE (1<<31) |
4453 | #define HSW_STEREO_3D_CTL_B 0x71020 |
5019 | #define HSW_STEREO_3D_CTL_B 0x71020 |
Line 4454... | Line 5020... | ||
4454 | 5020 | ||
4455 | #define HSW_STEREO_3D_CTL(trans) \ |
5021 | #define HSW_STEREO_3D_CTL(trans) \ |
4456 | _TRANSCODER(trans, HSW_STEREO_3D_CTL_A, HSW_STEREO_3D_CTL_A) |
5022 | _PIPE2(trans, HSW_STEREO_3D_CTL_A) |
4457 | 5023 | ||
Line 4758... | Line 5324... | ||
4758 | #define PORT_TRANS_C_SEL_CPT (2<<29) |
5324 | #define PORT_TRANS_C_SEL_CPT (2<<29) |
4759 | #define PORT_TRANS_SEL_MASK (3<<29) |
5325 | #define PORT_TRANS_SEL_MASK (3<<29) |
4760 | #define PORT_TRANS_SEL_CPT(pipe) ((pipe) << 29) |
5326 | #define PORT_TRANS_SEL_CPT(pipe) ((pipe) << 29) |
4761 | #define PORT_TO_PIPE(val) (((val) & (1<<30)) >> 30) |
5327 | #define PORT_TO_PIPE(val) (((val) & (1<<30)) >> 30) |
4762 | #define PORT_TO_PIPE_CPT(val) (((val) & PORT_TRANS_SEL_MASK) >> 29) |
5328 | #define PORT_TO_PIPE_CPT(val) (((val) & PORT_TRANS_SEL_MASK) >> 29) |
- | 5329 | #define SDVO_PORT_TO_PIPE_CHV(val) (((val) & (3<<24)) >> 24) |
|
- | 5330 | #define DP_PORT_TO_PIPE_CHV(val) (((val) & (3<<16)) >> 16) |
|
Line 4763... | Line 5331... | ||
4763 | 5331 | ||
4764 | #define TRANS_DP_CTL_A 0xe0300 |
5332 | #define TRANS_DP_CTL_A 0xe0300 |
4765 | #define TRANS_DP_CTL_B 0xe1300 |
5333 | #define TRANS_DP_CTL_B 0xe1300 |
4766 | #define TRANS_DP_CTL_C 0xe2300 |
5334 | #define TRANS_DP_CTL_C 0xe2300 |
Line 4814... | Line 5382... | ||
4814 | #define EDP_LINK_TRAIN_1000MV_3_5DB_IVB (0x22 <<22) |
5382 | #define EDP_LINK_TRAIN_1000MV_3_5DB_IVB (0x22 <<22) |
4815 | #define EDP_LINK_TRAIN_1000MV_6DB_IVB (0x23 <<22) |
5383 | #define EDP_LINK_TRAIN_1000MV_6DB_IVB (0x23 <<22) |
Line 4816... | Line 5384... | ||
4816 | 5384 | ||
Line -... | Line 5385... | ||
- | 5385 | #define EDP_LINK_TRAIN_VOL_EMP_MASK_IVB (0x3f<<22) |
|
- | 5386 | ||
4817 | #define EDP_LINK_TRAIN_VOL_EMP_MASK_IVB (0x3f<<22) |
5387 | #define VLV_PMWGICZ 0x1300a4 |
4818 | 5388 | ||
4819 | #define FORCEWAKE 0xA18C |
5389 | #define FORCEWAKE 0xA18C |
4820 | #define FORCEWAKE_VLV 0x1300b0 |
5390 | #define FORCEWAKE_VLV 0x1300b0 |
4821 | #define FORCEWAKE_ACK_VLV 0x1300b4 |
5391 | #define FORCEWAKE_ACK_VLV 0x1300b4 |
4822 | #define FORCEWAKE_MEDIA_VLV 0x1300b8 |
5392 | #define FORCEWAKE_MEDIA_VLV 0x1300b8 |
4823 | #define FORCEWAKE_ACK_MEDIA_VLV 0x1300bc |
5393 | #define FORCEWAKE_ACK_MEDIA_VLV 0x1300bc |
4824 | #define FORCEWAKE_ACK_HSW 0x130044 |
5394 | #define FORCEWAKE_ACK_HSW 0x130044 |
- | 5395 | #define FORCEWAKE_ACK 0x130090 |
|
- | 5396 | #define VLV_GTLC_WAKE_CTRL 0x130090 |
|
- | 5397 | #define VLV_GTLC_RENDER_CTX_EXISTS (1 << 25) |
|
- | 5398 | #define VLV_GTLC_MEDIA_CTX_EXISTS (1 << 24) |
|
4825 | #define FORCEWAKE_ACK 0x130090 |
5399 | #define VLV_GTLC_ALLOWWAKEREQ (1 << 0) |
- | 5400 | ||
- | 5401 | #define VLV_GTLC_PW_STATUS 0x130094 |
|
4826 | #define VLV_GTLC_WAKE_CTRL 0x130090 |
5402 | #define VLV_GTLC_ALLOWWAKEACK (1 << 0) |
4827 | #define VLV_GTLC_PW_STATUS 0x130094 |
5403 | #define VLV_GTLC_ALLOWWAKEERR (1 << 1) |
- | 5404 | #define VLV_GTLC_PW_MEDIA_STATUS_MASK (1 << 5) |
|
4828 | #define VLV_GTLC_PW_RENDER_STATUS_MASK 0x80 |
5405 | #define VLV_GTLC_PW_RENDER_STATUS_MASK (1 << 7) |
4829 | #define VLV_GTLC_PW_MEDIA_STATUS_MASK 0x20 |
5406 | #define VLV_GTLC_SURVIVABILITY_REG 0x130098 |
4830 | #define FORCEWAKE_MT 0xa188 /* multi-threaded */ |
5407 | #define FORCEWAKE_MT 0xa188 /* multi-threaded */ |
4831 | #define FORCEWAKE_KERNEL 0x1 |
5408 | #define FORCEWAKE_KERNEL 0x1 |
4832 | #define FORCEWAKE_USER 0x2 |
5409 | #define FORCEWAKE_USER 0x2 |
4833 | #define FORCEWAKE_MT_ACK 0x130040 |
5410 | #define FORCEWAKE_MT_ACK 0x130040 |
- | 5411 | #define ECOBUS 0xa180 |
|
Line 4834... | Line 5412... | ||
4834 | #define ECOBUS 0xa180 |
5412 | #define FORCEWAKE_MT_ENABLE (1<<5) |
4835 | #define FORCEWAKE_MT_ENABLE (1<<5) |
5413 | #define VLV_SPAREG2H 0xA194 |
4836 | 5414 | ||
4837 | #define GTFIFODBG 0x120000 |
5415 | #define GTFIFODBG 0x120000 |
Line 4850... | Line 5428... | ||
4850 | #define HSW_IDICR 0x9008 |
5428 | #define HSW_IDICR 0x9008 |
4851 | #define IDIHASHMSK(x) (((x) & 0x3f) << 16) |
5429 | #define IDIHASHMSK(x) (((x) & 0x3f) << 16) |
4852 | #define HSW_EDRAM_PRESENT 0x120010 |
5430 | #define HSW_EDRAM_PRESENT 0x120010 |
Line 4853... | Line 5431... | ||
4853 | 5431 | ||
- | 5432 | #define GEN6_UCGCTL1 0x9400 |
|
4854 | #define GEN6_UCGCTL1 0x9400 |
5433 | # define GEN6_EU_TCUNIT_CLOCK_GATE_DISABLE (1 << 16) |
4855 | # define GEN6_BLBUNIT_CLOCK_GATE_DISABLE (1 << 5) |
5434 | # define GEN6_BLBUNIT_CLOCK_GATE_DISABLE (1 << 5) |
Line 4856... | Line 5435... | ||
4856 | # define GEN6_CSUNIT_CLOCK_GATE_DISABLE (1 << 7) |
5435 | # define GEN6_CSUNIT_CLOCK_GATE_DISABLE (1 << 7) |
4857 | 5436 | ||
4858 | #define GEN6_UCGCTL2 0x9404 |
5437 | #define GEN6_UCGCTL2 0x9404 |
4859 | # define GEN7_VDSUNIT_CLOCK_GATE_DISABLE (1 << 30) |
5438 | # define GEN7_VDSUNIT_CLOCK_GATE_DISABLE (1 << 30) |
4860 | # define GEN7_TDLUNIT_CLOCK_GATE_DISABLE (1 << 22) |
5439 | # define GEN7_TDLUNIT_CLOCK_GATE_DISABLE (1 << 22) |
4861 | # define GEN6_RCZUNIT_CLOCK_GATE_DISABLE (1 << 13) |
5440 | # define GEN6_RCZUNIT_CLOCK_GATE_DISABLE (1 << 13) |
Line -... | Line 5441... | ||
- | 5441 | # define GEN6_RCPBUNIT_CLOCK_GATE_DISABLE (1 << 12) |
|
- | 5442 | # define GEN6_RCCUNIT_CLOCK_GATE_DISABLE (1 << 11) |
|
4862 | # define GEN6_RCPBUNIT_CLOCK_GATE_DISABLE (1 << 12) |
5443 | |
4863 | # define GEN6_RCCUNIT_CLOCK_GATE_DISABLE (1 << 11) |
5444 | #define GEN6_UCGCTL3 0x9408 |
Line -... | Line 5445... | ||
- | 5445 | ||
- | 5446 | #define GEN7_UCGCTL4 0x940c |
|
- | 5447 | #define GEN7_L3BANK2X_CLOCK_GATE_DISABLE (1<<25) |
|
- | 5448 | ||
- | 5449 | #define GEN6_RCGCTL1 0x9410 |
|
- | 5450 | #define GEN6_RCGCTL2 0x9414 |
|
- | 5451 | #define GEN6_RSTCTL 0x9420 |
|
- | 5452 | ||
4864 | 5453 | #define GEN8_UCGCTL6 0x9430 |
|
4865 | #define GEN7_UCGCTL4 0x940c |
5454 | #define GEN8_SDEUNIT_CLOCK_GATE_DISABLE (1<<14) |
4866 | #define GEN7_L3BANK2X_CLOCK_GATE_DISABLE (1<<25) |
5455 | |
4867 | 5456 | #define GEN6_GFXPAUSE 0xA000 |
|
4868 | #define GEN6_RPNSWREQ 0xA008 |
5457 | #define GEN6_RPNSWREQ 0xA008 |
Line 4915... | Line 5504... | ||
4915 | #define GEN6_RP_CUR_DOWN 0xA060 |
5504 | #define GEN6_RP_CUR_DOWN 0xA060 |
4916 | #define GEN6_RP_PREV_DOWN 0xA064 |
5505 | #define GEN6_RP_PREV_DOWN 0xA064 |
4917 | #define GEN6_RP_UP_EI 0xA068 |
5506 | #define GEN6_RP_UP_EI 0xA068 |
4918 | #define GEN6_RP_DOWN_EI 0xA06C |
5507 | #define GEN6_RP_DOWN_EI 0xA06C |
4919 | #define GEN6_RP_IDLE_HYSTERSIS 0xA070 |
5508 | #define GEN6_RP_IDLE_HYSTERSIS 0xA070 |
- | 5509 | #define GEN6_RPDEUHWTC 0xA080 |
|
- | 5510 | #define GEN6_RPDEUC 0xA084 |
|
- | 5511 | #define GEN6_RPDEUCSW 0xA088 |
|
4920 | #define GEN6_RC_STATE 0xA094 |
5512 | #define GEN6_RC_STATE 0xA094 |
4921 | #define GEN6_RC1_WAKE_RATE_LIMIT 0xA098 |
5513 | #define GEN6_RC1_WAKE_RATE_LIMIT 0xA098 |
4922 | #define GEN6_RC6_WAKE_RATE_LIMIT 0xA09C |
5514 | #define GEN6_RC6_WAKE_RATE_LIMIT 0xA09C |
4923 | #define GEN6_RC6pp_WAKE_RATE_LIMIT 0xA0A0 |
5515 | #define GEN6_RC6pp_WAKE_RATE_LIMIT 0xA0A0 |
4924 | #define GEN6_RC_EVALUATION_INTERVAL 0xA0A8 |
5516 | #define GEN6_RC_EVALUATION_INTERVAL 0xA0A8 |
4925 | #define GEN6_RC_IDLE_HYSTERSIS 0xA0AC |
5517 | #define GEN6_RC_IDLE_HYSTERSIS 0xA0AC |
4926 | #define GEN6_RC_SLEEP 0xA0B0 |
5518 | #define GEN6_RC_SLEEP 0xA0B0 |
- | 5519 | #define GEN6_RCUBMABDTMR 0xA0B0 |
|
4927 | #define GEN6_RC1e_THRESHOLD 0xA0B4 |
5520 | #define GEN6_RC1e_THRESHOLD 0xA0B4 |
4928 | #define GEN6_RC6_THRESHOLD 0xA0B8 |
5521 | #define GEN6_RC6_THRESHOLD 0xA0B8 |
4929 | #define GEN6_RC6p_THRESHOLD 0xA0BC |
5522 | #define GEN6_RC6p_THRESHOLD 0xA0BC |
- | 5523 | #define VLV_RCEDATA 0xA0BC |
|
4930 | #define GEN6_RC6pp_THRESHOLD 0xA0C0 |
5524 | #define GEN6_RC6pp_THRESHOLD 0xA0C0 |
4931 | #define GEN6_PMINTRMSK 0xA168 |
5525 | #define GEN6_PMINTRMSK 0xA168 |
- | 5526 | #define GEN8_PMINTR_REDIRECT_TO_NON_DISP (1<<31) |
|
- | 5527 | #define VLV_PWRDWNUPCTL 0xA294 |
|
Line 4932... | Line 5528... | ||
4932 | 5528 | ||
4933 | #define GEN6_PMISR 0x44020 |
5529 | #define GEN6_PMISR 0x44020 |
4934 | #define GEN6_PMIMR 0x44024 /* rps_lock */ |
5530 | #define GEN6_PMIMR 0x44024 /* rps_lock */ |
4935 | #define GEN6_PMIIR 0x44028 |
5531 | #define GEN6_PMIIR 0x44028 |
Line 4943... | Line 5539... | ||
4943 | #define GEN6_PM_RP_DOWN_EI_EXPIRED (1<<1) |
5539 | #define GEN6_PM_RP_DOWN_EI_EXPIRED (1<<1) |
4944 | #define GEN6_PM_RPS_EVENTS (GEN6_PM_RP_UP_THRESHOLD | \ |
5540 | #define GEN6_PM_RPS_EVENTS (GEN6_PM_RP_UP_THRESHOLD | \ |
4945 | GEN6_PM_RP_DOWN_THRESHOLD | \ |
5541 | GEN6_PM_RP_DOWN_THRESHOLD | \ |
4946 | GEN6_PM_RP_DOWN_TIMEOUT) |
5542 | GEN6_PM_RP_DOWN_TIMEOUT) |
Line -... | Line 5543... | ||
- | 5543 | ||
- | 5544 | #define CHV_CZ_CLOCK_FREQ_MODE_200 200 |
|
- | 5545 | #define CHV_CZ_CLOCK_FREQ_MODE_267 267 |
|
- | 5546 | #define CHV_CZ_CLOCK_FREQ_MODE_320 320 |
|
- | 5547 | #define CHV_CZ_CLOCK_FREQ_MODE_333 333 |
|
- | 5548 | #define CHV_CZ_CLOCK_FREQ_MODE_400 400 |
|
- | 5549 | ||
- | 5550 | #define GEN7_GT_SCRATCH_BASE 0x4F100 |
|
- | 5551 | #define GEN7_GT_SCRATCH_REG_NUM 8 |
|
- | 5552 | ||
- | 5553 | #define VLV_GTLC_SURVIVABILITY_REG 0x130098 |
|
- | 5554 | #define VLV_GFX_CLK_STATUS_BIT (1<<3) |
|
- | 5555 | #define VLV_GFX_CLK_FORCE_ON_BIT (1<<2) |
|
4947 | 5556 | ||
4948 | #define GEN6_GT_GFX_RC6_LOCKED 0x138104 |
5557 | #define GEN6_GT_GFX_RC6_LOCKED 0x138104 |
4949 | #define VLV_COUNTER_CONTROL 0x138104 |
5558 | #define VLV_COUNTER_CONTROL 0x138104 |
- | 5559 | #define VLV_COUNT_RANGE_HIGH (1<<15) |
|
- | 5560 | #define VLV_MEDIA_RC0_COUNT_EN (1<<5) |
|
4950 | #define VLV_COUNT_RANGE_HIGH (1<<15) |
5561 | #define VLV_RENDER_RC0_COUNT_EN (1<<4) |
4951 | #define VLV_MEDIA_RC6_COUNT_EN (1<<1) |
5562 | #define VLV_MEDIA_RC6_COUNT_EN (1<<1) |
4952 | #define VLV_RENDER_RC6_COUNT_EN (1<<0) |
5563 | #define VLV_RENDER_RC6_COUNT_EN (1<<0) |
- | 5564 | #define GEN6_GT_GFX_RC6 0x138108 |
|
- | 5565 | #define VLV_GT_RENDER_RC6 0x138108 |
|
- | 5566 | #define VLV_GT_MEDIA_RC6 0x13810C |
|
4953 | #define GEN6_GT_GFX_RC6 0x138108 |
5567 | |
4954 | #define GEN6_GT_GFX_RC6p 0x13810C |
5568 | #define GEN6_GT_GFX_RC6p 0x13810C |
- | 5569 | #define GEN6_GT_GFX_RC6pp 0x138110 |
|
- | 5570 | #define VLV_RENDER_C0_COUNT_REG 0x138118 |
|
Line 4955... | Line 5571... | ||
4955 | #define GEN6_GT_GFX_RC6pp 0x138110 |
5571 | #define VLV_MEDIA_C0_COUNT_REG 0x13811C |
4956 | 5572 | ||
4957 | #define GEN6_PCODE_MAILBOX 0x138124 |
5573 | #define GEN6_PCODE_MAILBOX 0x138124 |
4958 | #define GEN6_PCODE_READY (1<<31) |
5574 | #define GEN6_PCODE_READY (1<<31) |
Line 5004... | Line 5620... | ||
5004 | #define GEN7_HALF_SLICE_CHICKEN1_GT2 0xf100 |
5620 | #define GEN7_HALF_SLICE_CHICKEN1_GT2 0xf100 |
5005 | #define GEN7_MAX_PS_THREAD_DEP (8<<12) |
5621 | #define GEN7_MAX_PS_THREAD_DEP (8<<12) |
5006 | #define GEN7_SINGLE_SUBSCAN_DISPATCH_ENABLE (1<<10) |
5622 | #define GEN7_SINGLE_SUBSCAN_DISPATCH_ENABLE (1<<10) |
5007 | #define GEN7_PSD_SINGLE_PORT_DISPATCH_ENABLE (1<<3) |
5623 | #define GEN7_PSD_SINGLE_PORT_DISPATCH_ENABLE (1<<3) |
Line -... | Line 5624... | ||
- | 5624 | ||
- | 5625 | #define GEN8_ROW_CHICKEN 0xe4f0 |
|
- | 5626 | #define PARTIAL_INSTRUCTION_SHOOTDOWN_DISABLE (1<<8) |
|
- | 5627 | #define STALL_DOP_GATING_DISABLE (1<<5) |
|
5008 | 5628 | ||
5009 | #define GEN7_ROW_CHICKEN2 0xe4f4 |
5629 | #define GEN7_ROW_CHICKEN2 0xe4f4 |
5010 | #define GEN7_ROW_CHICKEN2_GT2 0xf4f4 |
5630 | #define GEN7_ROW_CHICKEN2_GT2 0xf4f4 |
Line 5011... | Line 5631... | ||
5011 | #define DOP_CLOCK_GATING_DISABLE (1<<0) |
5631 | #define DOP_CLOCK_GATING_DISABLE (1<<0) |
Line 5015... | Line 5635... | ||
5015 | 5635 | ||
5016 | #define HALF_SLICE_CHICKEN3 0xe184 |
5636 | #define HALF_SLICE_CHICKEN3 0xe184 |
5017 | #define GEN8_CENTROID_PIXEL_OPT_DIS (1<<8) |
5637 | #define GEN8_CENTROID_PIXEL_OPT_DIS (1<<8) |
Line 5018... | Line 5638... | ||
5018 | #define GEN8_SAMPLER_POWER_BYPASS_DIS (1<<1) |
5638 | #define GEN8_SAMPLER_POWER_BYPASS_DIS (1<<1) |
5019 | 5639 | ||
5020 | #define G4X_AUD_VID_DID (dev_priv->info->display_mmio_offset + 0x62020) |
5640 | #define G4X_AUD_VID_DID (dev_priv->info.display_mmio_offset + 0x62020) |
5021 | #define INTEL_AUDIO_DEVCL 0x808629FB |
5641 | #define INTEL_AUDIO_DEVCL 0x808629FB |
Line 5022... | Line 5642... | ||
5022 | #define INTEL_AUDIO_DEVBLC 0x80862801 |
5642 | #define INTEL_AUDIO_DEVBLC 0x80862801 |
Line 5176... | Line 5796... | ||
5176 | /* Per-pipe DDI Function Control */ |
5796 | /* Per-pipe DDI Function Control */ |
5177 | #define TRANS_DDI_FUNC_CTL_A 0x60400 |
5797 | #define TRANS_DDI_FUNC_CTL_A 0x60400 |
5178 | #define TRANS_DDI_FUNC_CTL_B 0x61400 |
5798 | #define TRANS_DDI_FUNC_CTL_B 0x61400 |
5179 | #define TRANS_DDI_FUNC_CTL_C 0x62400 |
5799 | #define TRANS_DDI_FUNC_CTL_C 0x62400 |
5180 | #define TRANS_DDI_FUNC_CTL_EDP 0x6F400 |
5800 | #define TRANS_DDI_FUNC_CTL_EDP 0x6F400 |
5181 | #define TRANS_DDI_FUNC_CTL(tran) _TRANSCODER(tran, TRANS_DDI_FUNC_CTL_A, \ |
5801 | #define TRANS_DDI_FUNC_CTL(tran) _TRANSCODER2(tran, TRANS_DDI_FUNC_CTL_A) |
5182 | TRANS_DDI_FUNC_CTL_B) |
- | |
- | 5802 | ||
5183 | #define TRANS_DDI_FUNC_ENABLE (1<<31) |
5803 | #define TRANS_DDI_FUNC_ENABLE (1<<31) |
5184 | /* Those bits are ignored by pipe EDP since it can only connect to DDI A */ |
5804 | /* Those bits are ignored by pipe EDP since it can only connect to DDI A */ |
5185 | #define TRANS_DDI_PORT_MASK (7<<28) |
5805 | #define TRANS_DDI_PORT_MASK (7<<28) |
- | 5806 | #define TRANS_DDI_PORT_SHIFT 28 |
|
5186 | #define TRANS_DDI_SELECT_PORT(x) ((x)<<28) |
5807 | #define TRANS_DDI_SELECT_PORT(x) ((x)<<28) |
5187 | #define TRANS_DDI_PORT_NONE (0<<28) |
5808 | #define TRANS_DDI_PORT_NONE (0<<28) |
5188 | #define TRANS_DDI_MODE_SELECT_MASK (7<<24) |
5809 | #define TRANS_DDI_MODE_SELECT_MASK (7<<24) |
5189 | #define TRANS_DDI_MODE_SELECT_HDMI (0<<24) |
5810 | #define TRANS_DDI_MODE_SELECT_HDMI (0<<24) |
5190 | #define TRANS_DDI_MODE_SELECT_DVI (1<<24) |
5811 | #define TRANS_DDI_MODE_SELECT_DVI (1<<24) |
Line 5201... | Line 5822... | ||
5201 | #define TRANS_DDI_EDP_INPUT_MASK (7<<12) |
5822 | #define TRANS_DDI_EDP_INPUT_MASK (7<<12) |
5202 | #define TRANS_DDI_EDP_INPUT_A_ON (0<<12) |
5823 | #define TRANS_DDI_EDP_INPUT_A_ON (0<<12) |
5203 | #define TRANS_DDI_EDP_INPUT_A_ONOFF (4<<12) |
5824 | #define TRANS_DDI_EDP_INPUT_A_ONOFF (4<<12) |
5204 | #define TRANS_DDI_EDP_INPUT_B_ONOFF (5<<12) |
5825 | #define TRANS_DDI_EDP_INPUT_B_ONOFF (5<<12) |
5205 | #define TRANS_DDI_EDP_INPUT_C_ONOFF (6<<12) |
5826 | #define TRANS_DDI_EDP_INPUT_C_ONOFF (6<<12) |
- | 5827 | #define TRANS_DDI_DP_VC_PAYLOAD_ALLOC (1<<8) |
|
5206 | #define TRANS_DDI_BFI_ENABLE (1<<4) |
5828 | #define TRANS_DDI_BFI_ENABLE (1<<4) |
Line 5207... | Line 5829... | ||
5207 | 5829 | ||
5208 | /* DisplayPort Transport Control */ |
5830 | /* DisplayPort Transport Control */ |
5209 | #define DP_TP_CTL_A 0x64040 |
5831 | #define DP_TP_CTL_A 0x64040 |
5210 | #define DP_TP_CTL_B 0x64140 |
5832 | #define DP_TP_CTL_B 0x64140 |
5211 | #define DP_TP_CTL(port) _PORT(port, DP_TP_CTL_A, DP_TP_CTL_B) |
5833 | #define DP_TP_CTL(port) _PORT(port, DP_TP_CTL_A, DP_TP_CTL_B) |
5212 | #define DP_TP_CTL_ENABLE (1<<31) |
5834 | #define DP_TP_CTL_ENABLE (1<<31) |
5213 | #define DP_TP_CTL_MODE_SST (0<<27) |
5835 | #define DP_TP_CTL_MODE_SST (0<<27) |
- | 5836 | #define DP_TP_CTL_MODE_MST (1<<27) |
|
5214 | #define DP_TP_CTL_MODE_MST (1<<27) |
5837 | #define DP_TP_CTL_FORCE_ACT (1<<25) |
5215 | #define DP_TP_CTL_ENHANCED_FRAME_ENABLE (1<<18) |
5838 | #define DP_TP_CTL_ENHANCED_FRAME_ENABLE (1<<18) |
5216 | #define DP_TP_CTL_FDI_AUTOTRAIN (1<<15) |
5839 | #define DP_TP_CTL_FDI_AUTOTRAIN (1<<15) |
5217 | #define DP_TP_CTL_LINK_TRAIN_MASK (7<<8) |
5840 | #define DP_TP_CTL_LINK_TRAIN_MASK (7<<8) |
5218 | #define DP_TP_CTL_LINK_TRAIN_PAT1 (0<<8) |
5841 | #define DP_TP_CTL_LINK_TRAIN_PAT1 (0<<8) |
Line 5225... | Line 5848... | ||
5225 | /* DisplayPort Transport Status */ |
5848 | /* DisplayPort Transport Status */ |
5226 | #define DP_TP_STATUS_A 0x64044 |
5849 | #define DP_TP_STATUS_A 0x64044 |
5227 | #define DP_TP_STATUS_B 0x64144 |
5850 | #define DP_TP_STATUS_B 0x64144 |
5228 | #define DP_TP_STATUS(port) _PORT(port, DP_TP_STATUS_A, DP_TP_STATUS_B) |
5851 | #define DP_TP_STATUS(port) _PORT(port, DP_TP_STATUS_A, DP_TP_STATUS_B) |
5229 | #define DP_TP_STATUS_IDLE_DONE (1<<25) |
5852 | #define DP_TP_STATUS_IDLE_DONE (1<<25) |
- | 5853 | #define DP_TP_STATUS_ACT_SENT (1<<24) |
|
- | 5854 | #define DP_TP_STATUS_MODE_STATUS_MST (1<<23) |
|
5230 | #define DP_TP_STATUS_AUTOTRAIN_DONE (1<<12) |
5855 | #define DP_TP_STATUS_AUTOTRAIN_DONE (1<<12) |
- | 5856 | #define DP_TP_STATUS_PAYLOAD_MAPPING_VC2 (3 << 8) |
|
- | 5857 | #define DP_TP_STATUS_PAYLOAD_MAPPING_VC1 (3 << 4) |
|
- | 5858 | #define DP_TP_STATUS_PAYLOAD_MAPPING_VC0 (3 << 0) |
|
Line 5231... | Line 5859... | ||
5231 | 5859 | ||
5232 | /* DDI Buffer Control */ |
5860 | /* DDI Buffer Control */ |
5233 | #define DDI_BUF_CTL_A 0x64000 |
5861 | #define DDI_BUF_CTL_A 0x64000 |
5234 | #define DDI_BUF_CTL_B 0x64100 |
5862 | #define DDI_BUF_CTL_B 0x64100 |
5235 | #define DDI_BUF_CTL(port) _PORT(port, DDI_BUF_CTL_A, DDI_BUF_CTL_B) |
5863 | #define DDI_BUF_CTL(port) _PORT(port, DDI_BUF_CTL_A, DDI_BUF_CTL_B) |
5236 | #define DDI_BUF_CTL_ENABLE (1<<31) |
- | |
5237 | /* Haswell */ |
5864 | #define DDI_BUF_CTL_ENABLE (1<<31) |
5238 | #define DDI_BUF_EMP_400MV_0DB_HSW (0<<24) /* Sel0 */ |
5865 | #define DDI_BUF_EMP_400MV_0DB_HSW (0<<24) /* Sel0 */ |
5239 | #define DDI_BUF_EMP_400MV_3_5DB_HSW (1<<24) /* Sel1 */ |
5866 | #define DDI_BUF_EMP_400MV_3_5DB_HSW (1<<24) /* Sel1 */ |
5240 | #define DDI_BUF_EMP_400MV_6DB_HSW (2<<24) /* Sel2 */ |
5867 | #define DDI_BUF_EMP_400MV_6DB_HSW (2<<24) /* Sel2 */ |
5241 | #define DDI_BUF_EMP_400MV_9_5DB_HSW (3<<24) /* Sel3 */ |
5868 | #define DDI_BUF_EMP_400MV_9_5DB_HSW (3<<24) /* Sel3 */ |
5242 | #define DDI_BUF_EMP_600MV_0DB_HSW (4<<24) /* Sel4 */ |
5869 | #define DDI_BUF_EMP_600MV_0DB_HSW (4<<24) /* Sel4 */ |
5243 | #define DDI_BUF_EMP_600MV_3_5DB_HSW (5<<24) /* Sel5 */ |
5870 | #define DDI_BUF_EMP_600MV_3_5DB_HSW (5<<24) /* Sel5 */ |
5244 | #define DDI_BUF_EMP_600MV_6DB_HSW (6<<24) /* Sel6 */ |
5871 | #define DDI_BUF_EMP_600MV_6DB_HSW (6<<24) /* Sel6 */ |
5245 | #define DDI_BUF_EMP_800MV_0DB_HSW (7<<24) /* Sel7 */ |
5872 | #define DDI_BUF_EMP_800MV_0DB_HSW (7<<24) /* Sel7 */ |
5246 | #define DDI_BUF_EMP_800MV_3_5DB_HSW (8<<24) /* Sel8 */ |
- | |
5247 | /* Broadwell */ |
- | |
5248 | #define DDI_BUF_EMP_400MV_0DB_BDW (0<<24) /* Sel0 */ |
- | |
5249 | #define DDI_BUF_EMP_400MV_3_5DB_BDW (1<<24) /* Sel1 */ |
- | |
5250 | #define DDI_BUF_EMP_400MV_6DB_BDW (2<<24) /* Sel2 */ |
- | |
5251 | #define DDI_BUF_EMP_600MV_0DB_BDW (3<<24) /* Sel3 */ |
- | |
5252 | #define DDI_BUF_EMP_600MV_3_5DB_BDW (4<<24) /* Sel4 */ |
- | |
5253 | #define DDI_BUF_EMP_600MV_6DB_BDW (5<<24) /* Sel5 */ |
- | |
5254 | #define DDI_BUF_EMP_800MV_0DB_BDW (6<<24) /* Sel6 */ |
- | |
5255 | #define DDI_BUF_EMP_800MV_3_5DB_BDW (7<<24) /* Sel7 */ |
- | |
5256 | #define DDI_BUF_EMP_1200MV_0DB_BDW (8<<24) /* Sel8 */ |
5873 | #define DDI_BUF_EMP_800MV_3_5DB_HSW (8<<24) /* Sel8 */ |
5257 | #define DDI_BUF_EMP_MASK (0xf<<24) |
5874 | #define DDI_BUF_EMP_MASK (0xf<<24) |
5258 | #define DDI_BUF_PORT_REVERSAL (1<<16) |
5875 | #define DDI_BUF_PORT_REVERSAL (1<<16) |
5259 | #define DDI_BUF_IS_IDLE (1<<7) |
5876 | #define DDI_BUF_IS_IDLE (1<<7) |
5260 | #define DDI_A_4_LANES (1<<4) |
5877 | #define DDI_A_4_LANES (1<<4) |
Line 5309... | Line 5926... | ||
5309 | /* SPLL */ |
5926 | /* SPLL */ |
5310 | #define SPLL_CTL 0x46020 |
5927 | #define SPLL_CTL 0x46020 |
5311 | #define SPLL_PLL_ENABLE (1<<31) |
5928 | #define SPLL_PLL_ENABLE (1<<31) |
5312 | #define SPLL_PLL_SSC (1<<28) |
5929 | #define SPLL_PLL_SSC (1<<28) |
5313 | #define SPLL_PLL_NON_SSC (2<<28) |
5930 | #define SPLL_PLL_NON_SSC (2<<28) |
- | 5931 | #define SPLL_PLL_LCPLL (3<<28) |
|
- | 5932 | #define SPLL_PLL_REF_MASK (3<<28) |
|
5314 | #define SPLL_PLL_FREQ_810MHz (0<<26) |
5933 | #define SPLL_PLL_FREQ_810MHz (0<<26) |
5315 | #define SPLL_PLL_FREQ_1350MHz (1<<26) |
5934 | #define SPLL_PLL_FREQ_1350MHz (1<<26) |
- | 5935 | #define SPLL_PLL_FREQ_2700MHz (2<<26) |
|
- | 5936 | #define SPLL_PLL_FREQ_MASK (3<<26) |
|
Line 5316... | Line 5937... | ||
5316 | 5937 | ||
5317 | /* WRPLL */ |
5938 | /* WRPLL */ |
5318 | #define WRPLL_CTL1 0x46040 |
5939 | #define WRPLL_CTL1 0x46040 |
- | 5940 | #define WRPLL_CTL2 0x46060 |
|
5319 | #define WRPLL_CTL2 0x46060 |
5941 | #define WRPLL_CTL(pll) (pll == 0 ? WRPLL_CTL1 : WRPLL_CTL2) |
5320 | #define WRPLL_PLL_ENABLE (1<<31) |
5942 | #define WRPLL_PLL_ENABLE (1<<31) |
5321 | #define WRPLL_PLL_SELECT_SSC (0x01<<28) |
5943 | #define WRPLL_PLL_SSC (1<<28) |
5322 | #define WRPLL_PLL_SELECT_NON_SSC (0x02<<28) |
5944 | #define WRPLL_PLL_NON_SSC (2<<28) |
- | 5945 | #define WRPLL_PLL_LCPLL (3<<28) |
|
5323 | #define WRPLL_PLL_SELECT_LCPLL_2700 (0x03<<28) |
5946 | #define WRPLL_PLL_REF_MASK (3<<28) |
5324 | /* WRPLL divider programming */ |
5947 | /* WRPLL divider programming */ |
- | 5948 | #define WRPLL_DIVIDER_REFERENCE(x) ((x)<<0) |
|
5325 | #define WRPLL_DIVIDER_REFERENCE(x) ((x)<<0) |
5949 | #define WRPLL_DIVIDER_REF_MASK (0xff) |
- | 5950 | #define WRPLL_DIVIDER_POST(x) ((x)<<8) |
|
- | 5951 | #define WRPLL_DIVIDER_POST_MASK (0x3f<<8) |
|
5326 | #define WRPLL_DIVIDER_POST(x) ((x)<<8) |
5952 | #define WRPLL_DIVIDER_POST_SHIFT 8 |
- | 5953 | #define WRPLL_DIVIDER_FEEDBACK(x) ((x)<<16) |
|
- | 5954 | #define WRPLL_DIVIDER_FB_SHIFT 16 |
|
Line 5327... | Line 5955... | ||
5327 | #define WRPLL_DIVIDER_FEEDBACK(x) ((x)<<16) |
5955 | #define WRPLL_DIVIDER_FB_MASK (0xff<<16) |
5328 | 5956 | ||
5329 | /* Port clock selection */ |
5957 | /* Port clock selection */ |
5330 | #define PORT_CLK_SEL_A 0x46100 |
5958 | #define PORT_CLK_SEL_A 0x46100 |
5331 | #define PORT_CLK_SEL_B 0x46104 |
5959 | #define PORT_CLK_SEL_B 0x46104 |
5332 | #define PORT_CLK_SEL(port) _PORT(port, PORT_CLK_SEL_A, PORT_CLK_SEL_B) |
5960 | #define PORT_CLK_SEL(port) _PORT(port, PORT_CLK_SEL_A, PORT_CLK_SEL_B) |
5333 | #define PORT_CLK_SEL_LCPLL_2700 (0<<29) |
5961 | #define PORT_CLK_SEL_LCPLL_2700 (0<<29) |
5334 | #define PORT_CLK_SEL_LCPLL_1350 (1<<29) |
5962 | #define PORT_CLK_SEL_LCPLL_1350 (1<<29) |
- | 5963 | #define PORT_CLK_SEL_LCPLL_810 (2<<29) |
|
5335 | #define PORT_CLK_SEL_LCPLL_810 (2<<29) |
5964 | #define PORT_CLK_SEL_SPLL (3<<29) |
5336 | #define PORT_CLK_SEL_SPLL (3<<29) |
5965 | #define PORT_CLK_SEL_WRPLL(pll) (((pll)+4)<<29) |
5337 | #define PORT_CLK_SEL_WRPLL1 (4<<29) |
5966 | #define PORT_CLK_SEL_WRPLL1 (4<<29) |
- | 5967 | #define PORT_CLK_SEL_WRPLL2 (5<<29) |
|
Line 5338... | Line 5968... | ||
5338 | #define PORT_CLK_SEL_WRPLL2 (5<<29) |
5968 | #define PORT_CLK_SEL_NONE (7<<29) |
5339 | #define PORT_CLK_SEL_NONE (7<<29) |
5969 | #define PORT_CLK_SEL_MASK (7<<29) |
5340 | 5970 | ||
5341 | /* Transcoder clock selection */ |
5971 | /* Transcoder clock selection */ |
5342 | #define TRANS_CLK_SEL_A 0x46140 |
5972 | #define TRANS_CLK_SEL_A 0x46140 |
5343 | #define TRANS_CLK_SEL_B 0x46144 |
5973 | #define TRANS_CLK_SEL_B 0x46144 |
5344 | #define TRANS_CLK_SEL(tran) _TRANSCODER(tran, TRANS_CLK_SEL_A, TRANS_CLK_SEL_B) |
5974 | #define TRANS_CLK_SEL(tran) _TRANSCODER(tran, TRANS_CLK_SEL_A, TRANS_CLK_SEL_B) |
Line 5345... | Line 5975... | ||
5345 | /* For each transcoder, we need to select the corresponding port clock */ |
5975 | /* For each transcoder, we need to select the corresponding port clock */ |
5346 | #define TRANS_CLK_SEL_DISABLED (0x0<<29) |
5976 | #define TRANS_CLK_SEL_DISABLED (0x0<<29) |
5347 | #define TRANS_CLK_SEL_PORT(x) ((x+1)<<29) |
5977 | #define TRANS_CLK_SEL_PORT(x) ((x+1)<<29) |
5348 | 5978 | ||
- | 5979 | #define TRANSA_MSA_MISC 0x60410 |
|
- | 5980 | #define TRANSB_MSA_MISC 0x61410 |
|
5349 | #define _TRANSA_MSA_MISC 0x60410 |
5981 | #define TRANSC_MSA_MISC 0x62410 |
5350 | #define _TRANSB_MSA_MISC 0x61410 |
5982 | #define TRANS_EDP_MSA_MISC 0x6f410 |
5351 | #define TRANS_MSA_MISC(tran) _TRANSCODER(tran, _TRANSA_MSA_MISC, \ |
5983 | #define TRANS_MSA_MISC(tran) _TRANSCODER2(tran, TRANSA_MSA_MISC) |
5352 | _TRANSB_MSA_MISC) |
5984 | |
5353 | #define TRANS_MSA_SYNC_CLK (1<<0) |
5985 | #define TRANS_MSA_SYNC_CLK (1<<0) |
Line 5370... | Line 6002... | ||
5370 | #define LCPLL_CD2X_CLOCK_DISABLE (1<<23) |
6002 | #define LCPLL_CD2X_CLOCK_DISABLE (1<<23) |
5371 | #define LCPLL_POWER_DOWN_ALLOW (1<<22) |
6003 | #define LCPLL_POWER_DOWN_ALLOW (1<<22) |
5372 | #define LCPLL_CD_SOURCE_FCLK (1<<21) |
6004 | #define LCPLL_CD_SOURCE_FCLK (1<<21) |
5373 | #define LCPLL_CD_SOURCE_FCLK_DONE (1<<19) |
6005 | #define LCPLL_CD_SOURCE_FCLK_DONE (1<<19) |
Line -... | Line 6006... | ||
- | 6006 | ||
- | 6007 | /* Please see hsw_read_dcomp() and hsw_write_dcomp() before using this register, |
|
5374 | 6008 | * since on HSW we can't write to it using I915_WRITE. */ |
|
- | 6009 | #define D_COMP_HSW (MCHBAR_MIRROR_BASE_SNB + 0x5F0C) |
|
5375 | #define D_COMP (MCHBAR_MIRROR_BASE_SNB + 0x5F0C) |
6010 | #define D_COMP_BDW 0x138144 |
5376 | #define D_COMP_RCOMP_IN_PROGRESS (1<<9) |
6011 | #define D_COMP_RCOMP_IN_PROGRESS (1<<9) |
5377 | #define D_COMP_COMP_FORCE (1<<8) |
6012 | #define D_COMP_COMP_FORCE (1<<8) |
Line 5378... | Line 6013... | ||
5378 | #define D_COMP_COMP_DISABLE (1<<0) |
6013 | #define D_COMP_COMP_DISABLE (1<<0) |
Line 5387... | Line 6022... | ||
5387 | #define PIPE_WM_LINETIME_IPS_LINETIME_MASK (0x1ff<<16) |
6022 | #define PIPE_WM_LINETIME_IPS_LINETIME_MASK (0x1ff<<16) |
5388 | #define PIPE_WM_LINETIME_IPS_LINETIME(x) ((x)<<16) |
6023 | #define PIPE_WM_LINETIME_IPS_LINETIME(x) ((x)<<16) |
Line 5389... | Line 6024... | ||
5389 | 6024 | ||
5390 | /* SFUSE_STRAP */ |
6025 | /* SFUSE_STRAP */ |
- | 6026 | #define SFUSE_STRAP 0xc2014 |
|
- | 6027 | #define SFUSE_STRAP_FUSE_LOCK (1<<13) |
|
5391 | #define SFUSE_STRAP 0xc2014 |
6028 | #define SFUSE_STRAP_DISPLAY_DISABLED (1<<7) |
5392 | #define SFUSE_STRAP_DDIB_DETECTED (1<<2) |
6029 | #define SFUSE_STRAP_DDIB_DETECTED (1<<2) |
5393 | #define SFUSE_STRAP_DDIC_DETECTED (1<<1) |
6030 | #define SFUSE_STRAP_DDIC_DETECTED (1<<1) |
Line 5394... | Line 6031... | ||
5394 | #define SFUSE_STRAP_DDID_DETECTED (1<<0) |
6031 | #define SFUSE_STRAP_DDID_DETECTED (1<<0) |
Line 5449... | Line 6086... | ||
5449 | 6086 | ||
Line 5450... | Line 6087... | ||
5450 | /* VLV MIPI registers */ |
6087 | /* VLV MIPI registers */ |
5451 | 6088 | ||
5452 | #define _MIPIA_PORT_CTRL (VLV_DISPLAY_BASE + 0x61190) |
6089 | #define _MIPIA_PORT_CTRL (VLV_DISPLAY_BASE + 0x61190) |
- | 6090 | #define _MIPIB_PORT_CTRL (VLV_DISPLAY_BASE + 0x61700) |
|
5453 | #define _MIPIB_PORT_CTRL (VLV_DISPLAY_BASE + 0x61700) |
6091 | #define MIPI_PORT_CTRL(tc) _TRANSCODER(tc, _MIPIA_PORT_CTRL, \ |
5454 | #define MIPI_PORT_CTRL(pipe) _PIPE(pipe, _MIPIA_PORT_CTRL, _MIPIB_PORT_CTRL) |
6092 | _MIPIB_PORT_CTRL) |
5455 | #define DPI_ENABLE (1 << 31) /* A + B */ |
6093 | #define DPI_ENABLE (1 << 31) /* A + B */ |
5456 | #define MIPIA_MIPI4DPHY_DELAY_COUNT_SHIFT 27 |
6094 | #define MIPIA_MIPI4DPHY_DELAY_COUNT_SHIFT 27 |
5457 | #define MIPIA_MIPI4DPHY_DELAY_COUNT_MASK (0xf << 27) |
6095 | #define MIPIA_MIPI4DPHY_DELAY_COUNT_MASK (0xf << 27) |
Line 5491... | Line 6129... | ||
5491 | #define LANE_CONFIGURATION_DUAL_LINK_A (1 << 0) |
6129 | #define LANE_CONFIGURATION_DUAL_LINK_A (1 << 0) |
5492 | #define LANE_CONFIGURATION_DUAL_LINK_B (2 << 0) |
6130 | #define LANE_CONFIGURATION_DUAL_LINK_B (2 << 0) |
Line 5493... | Line 6131... | ||
5493 | 6131 | ||
5494 | #define _MIPIA_TEARING_CTRL (VLV_DISPLAY_BASE + 0x61194) |
6132 | #define _MIPIA_TEARING_CTRL (VLV_DISPLAY_BASE + 0x61194) |
- | 6133 | #define _MIPIB_TEARING_CTRL (VLV_DISPLAY_BASE + 0x61704) |
|
5495 | #define _MIPIB_TEARING_CTRL (VLV_DISPLAY_BASE + 0x61704) |
6134 | #define MIPI_TEARING_CTRL(tc) _TRANSCODER(tc, \ |
5496 | #define MIPI_TEARING_CTRL(pipe) _PIPE(pipe, _MIPIA_TEARING_CTRL, _MIPIB_TEARING_CTRL) |
6135 | _MIPIA_TEARING_CTRL, _MIPIB_TEARING_CTRL) |
5497 | #define TEARING_EFFECT_DELAY_SHIFT 0 |
6136 | #define TEARING_EFFECT_DELAY_SHIFT 0 |
Line 5498... | Line 6137... | ||
5498 | #define TEARING_EFFECT_DELAY_MASK (0xffff << 0) |
6137 | #define TEARING_EFFECT_DELAY_MASK (0xffff << 0) |
5499 | 6138 | ||
Line 5500... | Line 6139... | ||
5500 | /* XXX: all bits reserved */ |
6139 | /* XXX: all bits reserved */ |
Line 5501... | Line 6140... | ||
5501 | #define _MIPIA_AUTOPWG (VLV_DISPLAY_BASE + 0x611a0) |
6140 | #define _MIPIA_AUTOPWG (VLV_DISPLAY_BASE + 0x611a0) |
5502 | 6141 | ||
5503 | /* MIPI DSI Controller and D-PHY registers */ |
6142 | /* MIPI DSI Controller and D-PHY registers */ |
- | 6143 | ||
5504 | 6144 | #define _MIPIA_DEVICE_READY (dev_priv->mipi_mmio_base + 0xb000) |
|
5505 | #define _MIPIA_DEVICE_READY (VLV_DISPLAY_BASE + 0xb000) |
6145 | #define _MIPIB_DEVICE_READY (dev_priv->mipi_mmio_base + 0xb800) |
5506 | #define _MIPIB_DEVICE_READY (VLV_DISPLAY_BASE + 0xb800) |
6146 | #define MIPI_DEVICE_READY(tc) _TRANSCODER(tc, _MIPIA_DEVICE_READY, \ |
5507 | #define MIPI_DEVICE_READY(pipe) _PIPE(pipe, _MIPIA_DEVICE_READY, _MIPIB_DEVICE_READY) |
6147 | _MIPIB_DEVICE_READY) |
5508 | #define BUS_POSSESSION (1 << 3) /* set to give bus to receiver */ |
6148 | #define BUS_POSSESSION (1 << 3) /* set to give bus to receiver */ |
5509 | #define ULPS_STATE_MASK (3 << 1) |
6149 | #define ULPS_STATE_MASK (3 << 1) |
Line 5510... | Line 6150... | ||
5510 | #define ULPS_STATE_ENTER (2 << 1) |
6150 | #define ULPS_STATE_ENTER (2 << 1) |
5511 | #define ULPS_STATE_EXIT (1 << 1) |
6151 | #define ULPS_STATE_EXIT (1 << 1) |
5512 | #define ULPS_STATE_NORMAL_OPERATION (0 << 1) |
6152 | #define ULPS_STATE_NORMAL_OPERATION (0 << 1) |
- | 6153 | #define DEVICE_READY (1 << 0) |
|
5513 | #define DEVICE_READY (1 << 0) |
6154 | |
5514 | 6155 | #define _MIPIA_INTR_STAT (dev_priv->mipi_mmio_base + 0xb004) |
|
5515 | #define _MIPIA_INTR_STAT (VLV_DISPLAY_BASE + 0xb004) |
6156 | #define _MIPIB_INTR_STAT (dev_priv->mipi_mmio_base + 0xb804) |
- | 6157 | #define MIPI_INTR_STAT(tc) _TRANSCODER(tc, _MIPIA_INTR_STAT, \ |
|
5516 | #define _MIPIB_INTR_STAT (VLV_DISPLAY_BASE + 0xb804) |
6158 | _MIPIB_INTR_STAT) |
5517 | #define MIPI_INTR_STAT(pipe) _PIPE(pipe, _MIPIA_INTR_STAT, _MIPIB_INTR_STAT) |
6159 | #define _MIPIA_INTR_EN (dev_priv->mipi_mmio_base + 0xb008) |
5518 | #define _MIPIA_INTR_EN (VLV_DISPLAY_BASE + 0xb008) |
6160 | #define _MIPIB_INTR_EN (dev_priv->mipi_mmio_base + 0xb808) |
5519 | #define _MIPIB_INTR_EN (VLV_DISPLAY_BASE + 0xb808) |
6161 | #define MIPI_INTR_EN(tc) _TRANSCODER(tc, _MIPIA_INTR_EN, \ |
5520 | #define MIPI_INTR_EN(pipe) _PIPE(pipe, _MIPIA_INTR_EN, _MIPIB_INTR_EN) |
6162 | _MIPIB_INTR_EN) |
Line 5549... | Line 6191... | ||
5549 | #define RXEXCAPE_MODE_ENTRY_ERROR (1 << 3) |
6191 | #define RXEXCAPE_MODE_ENTRY_ERROR (1 << 3) |
5550 | #define RXEOT_SYNC_ERROR (1 << 2) |
6192 | #define RXEOT_SYNC_ERROR (1 << 2) |
5551 | #define RXSOT_SYNC_ERROR (1 << 1) |
6193 | #define RXSOT_SYNC_ERROR (1 << 1) |
5552 | #define RXSOT_ERROR (1 << 0) |
6194 | #define RXSOT_ERROR (1 << 0) |
Line 5553... | Line 6195... | ||
5553 | 6195 | ||
5554 | #define _MIPIA_DSI_FUNC_PRG (VLV_DISPLAY_BASE + 0xb00c) |
6196 | #define _MIPIA_DSI_FUNC_PRG (dev_priv->mipi_mmio_base + 0xb00c) |
5555 | #define _MIPIB_DSI_FUNC_PRG (VLV_DISPLAY_BASE + 0xb80c) |
6197 | #define _MIPIB_DSI_FUNC_PRG (dev_priv->mipi_mmio_base + 0xb80c) |
- | 6198 | #define MIPI_DSI_FUNC_PRG(tc) _TRANSCODER(tc, _MIPIA_DSI_FUNC_PRG, \ |
|
5556 | #define MIPI_DSI_FUNC_PRG(pipe) _PIPE(pipe, _MIPIA_DSI_FUNC_PRG, _MIPIB_DSI_FUNC_PRG) |
6199 | _MIPIB_DSI_FUNC_PRG) |
5557 | #define CMD_MODE_DATA_WIDTH_MASK (7 << 13) |
6200 | #define CMD_MODE_DATA_WIDTH_MASK (7 << 13) |
5558 | #define CMD_MODE_NOT_SUPPORTED (0 << 13) |
6201 | #define CMD_MODE_NOT_SUPPORTED (0 << 13) |
5559 | #define CMD_MODE_DATA_WIDTH_16_BIT (1 << 13) |
6202 | #define CMD_MODE_DATA_WIDTH_16_BIT (1 << 13) |
5560 | #define CMD_MODE_DATA_WIDTH_9_BIT (2 << 13) |
6203 | #define CMD_MODE_DATA_WIDTH_9_BIT (2 << 13) |
Line 5572... | Line 6215... | ||
5572 | #define VID_MODE_CHANNEL_NUMBER_SHIFT 3 |
6215 | #define VID_MODE_CHANNEL_NUMBER_SHIFT 3 |
5573 | #define VID_MODE_CHANNEL_NUMBER_MASK (3 << 3) |
6216 | #define VID_MODE_CHANNEL_NUMBER_MASK (3 << 3) |
5574 | #define DATA_LANES_PRG_REG_SHIFT 0 |
6217 | #define DATA_LANES_PRG_REG_SHIFT 0 |
5575 | #define DATA_LANES_PRG_REG_MASK (7 << 0) |
6218 | #define DATA_LANES_PRG_REG_MASK (7 << 0) |
Line 5576... | Line 6219... | ||
5576 | 6219 | ||
5577 | #define _MIPIA_HS_TX_TIMEOUT (VLV_DISPLAY_BASE + 0xb010) |
6220 | #define _MIPIA_HS_TX_TIMEOUT (dev_priv->mipi_mmio_base + 0xb010) |
5578 | #define _MIPIB_HS_TX_TIMEOUT (VLV_DISPLAY_BASE + 0xb810) |
6221 | #define _MIPIB_HS_TX_TIMEOUT (dev_priv->mipi_mmio_base + 0xb810) |
- | 6222 | #define MIPI_HS_TX_TIMEOUT(tc) _TRANSCODER(tc, _MIPIA_HS_TX_TIMEOUT, \ |
|
5579 | #define MIPI_HS_TX_TIMEOUT(pipe) _PIPE(pipe, _MIPIA_HS_TX_TIMEOUT, _MIPIB_HS_TX_TIMEOUT) |
6223 | _MIPIB_HS_TX_TIMEOUT) |
Line 5580... | Line 6224... | ||
5580 | #define HIGH_SPEED_TX_TIMEOUT_COUNTER_MASK 0xffffff |
6224 | #define HIGH_SPEED_TX_TIMEOUT_COUNTER_MASK 0xffffff |
5581 | 6225 | ||
5582 | #define _MIPIA_LP_RX_TIMEOUT (VLV_DISPLAY_BASE + 0xb014) |
6226 | #define _MIPIA_LP_RX_TIMEOUT (dev_priv->mipi_mmio_base + 0xb014) |
- | 6227 | #define _MIPIB_LP_RX_TIMEOUT (dev_priv->mipi_mmio_base + 0xb814) |
|
5583 | #define _MIPIB_LP_RX_TIMEOUT (VLV_DISPLAY_BASE + 0xb814) |
6228 | #define MIPI_LP_RX_TIMEOUT(tc) _TRANSCODER(tc, _MIPIA_LP_RX_TIMEOUT, \ |
Line 5584... | Line 6229... | ||
5584 | #define MIPI_LP_RX_TIMEOUT(pipe) _PIPE(pipe, _MIPIA_LP_RX_TIMEOUT, _MIPIB_LP_RX_TIMEOUT) |
6229 | _MIPIB_LP_RX_TIMEOUT) |
5585 | #define LOW_POWER_RX_TIMEOUT_COUNTER_MASK 0xffffff |
6230 | #define LOW_POWER_RX_TIMEOUT_COUNTER_MASK 0xffffff |
- | 6231 | ||
5586 | 6232 | #define _MIPIA_TURN_AROUND_TIMEOUT (dev_priv->mipi_mmio_base + 0xb018) |
|
5587 | #define _MIPIA_TURN_AROUND_TIMEOUT (VLV_DISPLAY_BASE + 0xb018) |
6233 | #define _MIPIB_TURN_AROUND_TIMEOUT (dev_priv->mipi_mmio_base + 0xb818) |
Line 5588... | Line 6234... | ||
5588 | #define _MIPIB_TURN_AROUND_TIMEOUT (VLV_DISPLAY_BASE + 0xb818) |
6234 | #define MIPI_TURN_AROUND_TIMEOUT(tc) _TRANSCODER(tc, \ |
5589 | #define MIPI_TURN_AROUND_TIMEOUT(pipe) _PIPE(pipe, _MIPIA_TURN_AROUND_TIMEOUT, _MIPIB_TURN_AROUND_TIMEOUT) |
6235 | _MIPIA_TURN_AROUND_TIMEOUT, _MIPIB_TURN_AROUND_TIMEOUT) |
- | 6236 | #define TURN_AROUND_TIMEOUT_MASK 0x3f |
|
5590 | #define TURN_AROUND_TIMEOUT_MASK 0x3f |
6237 | |
5591 | 6238 | #define _MIPIA_DEVICE_RESET_TIMER (dev_priv->mipi_mmio_base + 0xb01c) |
|
Line 5592... | Line 6239... | ||
5592 | #define _MIPIA_DEVICE_RESET_TIMER (VLV_DISPLAY_BASE + 0xb01c) |
6239 | #define _MIPIB_DEVICE_RESET_TIMER (dev_priv->mipi_mmio_base + 0xb81c) |
5593 | #define _MIPIB_DEVICE_RESET_TIMER (VLV_DISPLAY_BASE + 0xb81c) |
6240 | #define MIPI_DEVICE_RESET_TIMER(tc) _TRANSCODER(tc, \ |
5594 | #define MIPI_DEVICE_RESET_TIMER(pipe) _PIPE(pipe, _MIPIA_DEVICE_RESET_TIMER, _MIPIB_DEVICE_RESET_TIMER) |
6241 | _MIPIA_DEVICE_RESET_TIMER, _MIPIB_DEVICE_RESET_TIMER) |
- | 6242 | #define DEVICE_RESET_TIMER_MASK 0xffff |
|
5595 | #define DEVICE_RESET_TIMER_MASK 0xffff |
6243 | |
5596 | 6244 | #define _MIPIA_DPI_RESOLUTION (dev_priv->mipi_mmio_base + 0xb020) |
|
5597 | #define _MIPIA_DPI_RESOLUTION (VLV_DISPLAY_BASE + 0xb020) |
6245 | #define _MIPIB_DPI_RESOLUTION (dev_priv->mipi_mmio_base + 0xb820) |
5598 | #define _MIPIB_DPI_RESOLUTION (VLV_DISPLAY_BASE + 0xb820) |
6246 | #define MIPI_DPI_RESOLUTION(tc) _TRANSCODER(tc, _MIPIA_DPI_RESOLUTION, \ |
Line 5599... | Line 6247... | ||
5599 | #define MIPI_DPI_RESOLUTION(pipe) _PIPE(pipe, _MIPIA_DPI_RESOLUTION, _MIPIB_DPI_RESOLUTION) |
6247 | _MIPIB_DPI_RESOLUTION) |
5600 | #define VERTICAL_ADDRESS_SHIFT 16 |
6248 | #define VERTICAL_ADDRESS_SHIFT 16 |
- | 6249 | #define VERTICAL_ADDRESS_MASK (0xffff << 16) |
|
5601 | #define VERTICAL_ADDRESS_MASK (0xffff << 16) |
6250 | #define HORIZONTAL_ADDRESS_SHIFT 0 |
5602 | #define HORIZONTAL_ADDRESS_SHIFT 0 |
6251 | #define HORIZONTAL_ADDRESS_MASK 0xffff |
5603 | #define HORIZONTAL_ADDRESS_MASK 0xffff |
6252 | |
5604 | 6253 | #define _MIPIA_DBI_FIFO_THROTTLE (dev_priv->mipi_mmio_base + 0xb024) |
|
Line 5605... | Line 6254... | ||
5605 | #define _MIPIA_DBI_FIFO_THROTTLE (VLV_DISPLAY_BASE + 0xb024) |
6254 | #define _MIPIB_DBI_FIFO_THROTTLE (dev_priv->mipi_mmio_base + 0xb824) |
5606 | #define _MIPIB_DBI_FIFO_THROTTLE (VLV_DISPLAY_BASE + 0xb824) |
6255 | #define MIPI_DBI_FIFO_THROTTLE(tc) _TRANSCODER(tc, \ |
5607 | #define MIPI_DBI_FIFO_THROTTLE(pipe) _PIPE(pipe, _MIPIA_DBI_FIFO_THROTTLE, _MIPIB_DBI_FIFO_THROTTLE) |
6256 | _MIPIA_DBI_FIFO_THROTTLE, _MIPIB_DBI_FIFO_THROTTLE) |
- | 6257 | #define DBI_FIFO_EMPTY_HALF (0 << 0) |
|
5608 | #define DBI_FIFO_EMPTY_HALF (0 << 0) |
6258 | #define DBI_FIFO_EMPTY_QUARTER (1 << 0) |
5609 | #define DBI_FIFO_EMPTY_QUARTER (1 << 0) |
6259 | #define DBI_FIFO_EMPTY_7_LOCATIONS (2 << 0) |
5610 | #define DBI_FIFO_EMPTY_7_LOCATIONS (2 << 0) |
6260 | |
5611 | 6261 | /* regs below are bits 15:0 */ |
|
5612 | /* regs below are bits 15:0 */ |
6262 | #define _MIPIA_HSYNC_PADDING_COUNT (dev_priv->mipi_mmio_base + 0xb028) |
- | 6263 | #define _MIPIB_HSYNC_PADDING_COUNT (dev_priv->mipi_mmio_base + 0xb828) |
|
5613 | #define _MIPIA_HSYNC_PADDING_COUNT (VLV_DISPLAY_BASE + 0xb028) |
6264 | #define MIPI_HSYNC_PADDING_COUNT(tc) _TRANSCODER(tc, \ |
5614 | #define _MIPIB_HSYNC_PADDING_COUNT (VLV_DISPLAY_BASE + 0xb828) |
6265 | _MIPIA_HSYNC_PADDING_COUNT, _MIPIB_HSYNC_PADDING_COUNT) |
5615 | #define MIPI_HSYNC_PADDING_COUNT(pipe) _PIPE(pipe, _MIPIA_HSYNC_PADDING_COUNT, _MIPIB_HSYNC_PADDING_COUNT) |
6266 | |
5616 | 6267 | #define _MIPIA_HBP_COUNT (dev_priv->mipi_mmio_base + 0xb02c) |
|
- | 6268 | #define _MIPIB_HBP_COUNT (dev_priv->mipi_mmio_base + 0xb82c) |
|
5617 | #define _MIPIA_HBP_COUNT (VLV_DISPLAY_BASE + 0xb02c) |
6269 | #define MIPI_HBP_COUNT(tc) _TRANSCODER(tc, _MIPIA_HBP_COUNT, \ |
5618 | #define _MIPIB_HBP_COUNT (VLV_DISPLAY_BASE + 0xb82c) |
6270 | _MIPIB_HBP_COUNT) |
5619 | #define MIPI_HBP_COUNT(pipe) _PIPE(pipe, _MIPIA_HBP_COUNT, _MIPIB_HBP_COUNT) |
6271 | |
- | 6272 | #define _MIPIA_HFP_COUNT (dev_priv->mipi_mmio_base + 0xb030) |
|
5620 | 6273 | #define _MIPIB_HFP_COUNT (dev_priv->mipi_mmio_base + 0xb830) |
|
5621 | #define _MIPIA_HFP_COUNT (VLV_DISPLAY_BASE + 0xb030) |
6274 | #define MIPI_HFP_COUNT(tc) _TRANSCODER(tc, _MIPIA_HFP_COUNT, \ |
5622 | #define _MIPIB_HFP_COUNT (VLV_DISPLAY_BASE + 0xb830) |
6275 | _MIPIB_HFP_COUNT) |
5623 | #define MIPI_HFP_COUNT(pipe) _PIPE(pipe, _MIPIA_HFP_COUNT, _MIPIB_HFP_COUNT) |
6276 | |
- | 6277 | #define _MIPIA_HACTIVE_AREA_COUNT (dev_priv->mipi_mmio_base + 0xb034) |
|
5624 | 6278 | #define _MIPIB_HACTIVE_AREA_COUNT (dev_priv->mipi_mmio_base + 0xb834) |
|
5625 | #define _MIPIA_HACTIVE_AREA_COUNT (VLV_DISPLAY_BASE + 0xb034) |
6279 | #define MIPI_HACTIVE_AREA_COUNT(tc) _TRANSCODER(tc, \ |
5626 | #define _MIPIB_HACTIVE_AREA_COUNT (VLV_DISPLAY_BASE + 0xb834) |
6280 | _MIPIA_HACTIVE_AREA_COUNT, _MIPIB_HACTIVE_AREA_COUNT) |
5627 | #define MIPI_HACTIVE_AREA_COUNT(pipe) _PIPE(pipe, _MIPIA_HACTIVE_AREA_COUNT, _MIPIB_HACTIVE_AREA_COUNT) |
6281 | |
5628 | 6282 | #define _MIPIA_VSYNC_PADDING_COUNT (dev_priv->mipi_mmio_base + 0xb038) |
|
- | 6283 | #define _MIPIB_VSYNC_PADDING_COUNT (dev_priv->mipi_mmio_base + 0xb838) |
|
5629 | #define _MIPIA_VSYNC_PADDING_COUNT (VLV_DISPLAY_BASE + 0xb038) |
6284 | #define MIPI_VSYNC_PADDING_COUNT(tc) _TRANSCODER(tc, \ |
5630 | #define _MIPIB_VSYNC_PADDING_COUNT (VLV_DISPLAY_BASE + 0xb838) |
6285 | _MIPIA_VSYNC_PADDING_COUNT, _MIPIB_VSYNC_PADDING_COUNT) |
5631 | #define MIPI_VSYNC_PADDING_COUNT(pipe) _PIPE(pipe, _MIPIA_VSYNC_PADDING_COUNT, _MIPIB_VSYNC_PADDING_COUNT) |
6286 | |
5632 | 6287 | #define _MIPIA_VBP_COUNT (dev_priv->mipi_mmio_base + 0xb03c) |
|
- | 6288 | #define _MIPIB_VBP_COUNT (dev_priv->mipi_mmio_base + 0xb83c) |
|
5633 | #define _MIPIA_VBP_COUNT (VLV_DISPLAY_BASE + 0xb03c) |
6289 | #define MIPI_VBP_COUNT(tc) _TRANSCODER(tc, _MIPIA_VBP_COUNT, \ |
5634 | #define _MIPIB_VBP_COUNT (VLV_DISPLAY_BASE + 0xb83c) |
6290 | _MIPIB_VBP_COUNT) |
5635 | #define MIPI_VBP_COUNT(pipe) _PIPE(pipe, _MIPIA_VBP_COUNT, _MIPIB_VBP_COUNT) |
6291 | |
- | 6292 | #define _MIPIA_VFP_COUNT (dev_priv->mipi_mmio_base + 0xb040) |
|
5636 | 6293 | #define _MIPIB_VFP_COUNT (dev_priv->mipi_mmio_base + 0xb840) |
|
- | 6294 | #define MIPI_VFP_COUNT(tc) _TRANSCODER(tc, _MIPIA_VFP_COUNT, \ |
|
5637 | #define _MIPIA_VFP_COUNT (VLV_DISPLAY_BASE + 0xb040) |
6295 | _MIPIB_VFP_COUNT) |
Line 5638... | Line 6296... | ||
5638 | #define _MIPIB_VFP_COUNT (VLV_DISPLAY_BASE + 0xb840) |
6296 | |
5639 | #define MIPI_VFP_COUNT(pipe) _PIPE(pipe, _MIPIA_VFP_COUNT, _MIPIB_VFP_COUNT) |
6297 | #define _MIPIA_HIGH_LOW_SWITCH_COUNT (dev_priv->mipi_mmio_base + 0xb044) |
5640 | 6298 | #define _MIPIB_HIGH_LOW_SWITCH_COUNT (dev_priv->mipi_mmio_base + 0xb844) |
|
- | 6299 | #define MIPI_HIGH_LOW_SWITCH_COUNT(tc) _TRANSCODER(tc, \ |
|
5641 | #define _MIPIA_HIGH_LOW_SWITCH_COUNT (VLV_DISPLAY_BASE + 0xb044) |
6300 | _MIPIA_HIGH_LOW_SWITCH_COUNT, _MIPIB_HIGH_LOW_SWITCH_COUNT) |
5642 | #define _MIPIB_HIGH_LOW_SWITCH_COUNT (VLV_DISPLAY_BASE + 0xb844) |
6301 | |
5643 | #define MIPI_HIGH_LOW_SWITCH_COUNT(pipe) _PIPE(pipe, _MIPIA_HIGH_LOW_SWITCH_COUNT, _MIPIB_HIGH_LOW_SWITCH_COUNT) |
6302 | /* regs above are bits 15:0 */ |
5644 | /* regs above are bits 15:0 */ |
6303 | |
5645 | 6304 | #define _MIPIA_DPI_CONTROL (dev_priv->mipi_mmio_base + 0xb048) |
|
5646 | #define _MIPIA_DPI_CONTROL (VLV_DISPLAY_BASE + 0xb048) |
6305 | #define _MIPIB_DPI_CONTROL (dev_priv->mipi_mmio_base + 0xb848) |
5647 | #define _MIPIB_DPI_CONTROL (VLV_DISPLAY_BASE + 0xb848) |
6306 | #define MIPI_DPI_CONTROL(tc) _TRANSCODER(tc, _MIPIA_DPI_CONTROL, \ |
Line 5648... | Line 6307... | ||
5648 | #define MIPI_DPI_CONTROL(pipe) _PIPE(pipe, _MIPIA_DPI_CONTROL, _MIPIB_DPI_CONTROL) |
6307 | _MIPIB_DPI_CONTROL) |
5649 | #define DPI_LP_MODE (1 << 6) |
6308 | #define DPI_LP_MODE (1 << 6) |
5650 | #define BACKLIGHT_OFF (1 << 5) |
6309 | #define BACKLIGHT_OFF (1 << 5) |
- | 6310 | #define BACKLIGHT_ON (1 << 4) |
|
5651 | #define BACKLIGHT_ON (1 << 4) |
6311 | #define COLOR_MODE_OFF (1 << 3) |
5652 | #define COLOR_MODE_OFF (1 << 3) |
6312 | #define COLOR_MODE_ON (1 << 2) |
Line 5653... | Line 6313... | ||
5653 | #define COLOR_MODE_ON (1 << 2) |
6313 | #define TURN_ON (1 << 1) |
5654 | #define TURN_ON (1 << 1) |
6314 | #define SHUTDOWN (1 << 0) |
5655 | #define SHUTDOWN (1 << 0) |
6315 | |
- | 6316 | #define _MIPIA_DPI_DATA (dev_priv->mipi_mmio_base + 0xb04c) |
|
5656 | 6317 | #define _MIPIB_DPI_DATA (dev_priv->mipi_mmio_base + 0xb84c) |
|
5657 | #define _MIPIA_DPI_DATA (VLV_DISPLAY_BASE + 0xb04c) |
6318 | #define MIPI_DPI_DATA(tc) _TRANSCODER(tc, _MIPIA_DPI_DATA, \ |
Line 5658... | Line 6319... | ||
5658 | #define _MIPIB_DPI_DATA (VLV_DISPLAY_BASE + 0xb84c) |
6319 | _MIPIB_DPI_DATA) |
5659 | #define MIPI_DPI_DATA(pipe) _PIPE(pipe, _MIPIA_DPI_DATA, _MIPIB_DPI_DATA) |
6320 | #define COMMAND_BYTE_SHIFT 0 |
- | 6321 | #define COMMAND_BYTE_MASK (0x3f << 0) |
|
5660 | #define COMMAND_BYTE_SHIFT 0 |
6322 | |
5661 | #define COMMAND_BYTE_MASK (0x3f << 0) |
6323 | #define _MIPIA_INIT_COUNT (dev_priv->mipi_mmio_base + 0xb050) |
5662 | 6324 | #define _MIPIB_INIT_COUNT (dev_priv->mipi_mmio_base + 0xb850) |
|
Line 5663... | Line 6325... | ||
5663 | #define _MIPIA_INIT_COUNT (VLV_DISPLAY_BASE + 0xb050) |
6325 | #define MIPI_INIT_COUNT(tc) _TRANSCODER(tc, _MIPIA_INIT_COUNT, \ |
5664 | #define _MIPIB_INIT_COUNT (VLV_DISPLAY_BASE + 0xb850) |
6326 | _MIPIB_INIT_COUNT) |
- | 6327 | #define MASTER_INIT_TIMER_SHIFT 0 |
|
5665 | #define MIPI_INIT_COUNT(pipe) _PIPE(pipe, _MIPIA_INIT_COUNT, _MIPIB_INIT_COUNT) |
6328 | #define MASTER_INIT_TIMER_MASK (0xffff << 0) |
5666 | #define MASTER_INIT_TIMER_SHIFT 0 |
6329 | |
5667 | #define MASTER_INIT_TIMER_MASK (0xffff << 0) |
6330 | #define _MIPIA_MAX_RETURN_PKT_SIZE (dev_priv->mipi_mmio_base + 0xb054) |
5668 | 6331 | #define _MIPIB_MAX_RETURN_PKT_SIZE (dev_priv->mipi_mmio_base + 0xb854) |
|
5669 | #define _MIPIA_MAX_RETURN_PKT_SIZE (VLV_DISPLAY_BASE + 0xb054) |
6332 | #define MIPI_MAX_RETURN_PKT_SIZE(tc) _TRANSCODER(tc, \ |
5670 | #define _MIPIB_MAX_RETURN_PKT_SIZE (VLV_DISPLAY_BASE + 0xb854) |
6333 | _MIPIA_MAX_RETURN_PKT_SIZE, _MIPIB_MAX_RETURN_PKT_SIZE) |
5671 | #define MIPI_MAX_RETURN_PKT_SIZE(pipe) _PIPE(pipe, _MIPIA_MAX_RETURN_PKT_SIZE, _MIPIB_MAX_RETURN_PKT_SIZE) |
6334 | #define MAX_RETURN_PKT_SIZE_SHIFT 0 |
Line 5672... | Line 6335... | ||
5672 | #define MAX_RETURN_PKT_SIZE_SHIFT 0 |
6335 | #define MAX_RETURN_PKT_SIZE_MASK (0x3ff << 0) |
5673 | #define MAX_RETURN_PKT_SIZE_MASK (0x3ff << 0) |
6336 | |
5674 | 6337 | #define _MIPIA_VIDEO_MODE_FORMAT (dev_priv->mipi_mmio_base + 0xb058) |
|
- | 6338 | #define _MIPIB_VIDEO_MODE_FORMAT (dev_priv->mipi_mmio_base + 0xb858) |
|
5675 | #define _MIPIA_VIDEO_MODE_FORMAT (VLV_DISPLAY_BASE + 0xb058) |
6339 | #define MIPI_VIDEO_MODE_FORMAT(tc) _TRANSCODER(tc, \ |
5676 | #define _MIPIB_VIDEO_MODE_FORMAT (VLV_DISPLAY_BASE + 0xb858) |
6340 | _MIPIA_VIDEO_MODE_FORMAT, _MIPIB_VIDEO_MODE_FORMAT) |
5677 | #define MIPI_VIDEO_MODE_FORMAT(pipe) _PIPE(pipe, _MIPIA_VIDEO_MODE_FORMAT, _MIPIB_VIDEO_MODE_FORMAT) |
6341 | #define RANDOM_DPI_DISPLAY_RESOLUTION (1 << 4) |
5678 | #define RANDOM_DPI_DISPLAY_RESOLUTION (1 << 4) |
6342 | #define DISABLE_VIDEO_BTA (1 << 3) |
5679 | #define DISABLE_VIDEO_BTA (1 << 3) |
6343 | #define IP_TG_CONFIG (1 << 2) |
5680 | #define IP_TG_CONFIG (1 << 2) |
6344 | #define VIDEO_MODE_NON_BURST_WITH_SYNC_PULSE (1 << 0) |
5681 | #define VIDEO_MODE_NON_BURST_WITH_SYNC_PULSE (1 << 0) |
6345 | #define VIDEO_MODE_NON_BURST_WITH_SYNC_EVENTS (2 << 0) |
5682 | #define VIDEO_MODE_NON_BURST_WITH_SYNC_EVENTS (2 << 0) |
6346 | #define VIDEO_MODE_BURST (3 << 0) |
Line 5683... | Line 6347... | ||
5683 | #define VIDEO_MODE_BURST (3 << 0) |
6347 | |
5684 | 6348 | #define _MIPIA_EOT_DISABLE (dev_priv->mipi_mmio_base + 0xb05c) |
|
5685 | #define _MIPIA_EOT_DISABLE (VLV_DISPLAY_BASE + 0xb05c) |
6349 | #define _MIPIB_EOT_DISABLE (dev_priv->mipi_mmio_base + 0xb85c) |
- | 6350 | #define MIPI_EOT_DISABLE(tc) _TRANSCODER(tc, _MIPIA_EOT_DISABLE, \ |
|
5686 | #define _MIPIB_EOT_DISABLE (VLV_DISPLAY_BASE + 0xb85c) |
6351 | _MIPIB_EOT_DISABLE) |
5687 | #define MIPI_EOT_DISABLE(pipe) _PIPE(pipe, _MIPIA_EOT_DISABLE, _MIPIB_EOT_DISABLE) |
6352 | #define LP_RX_TIMEOUT_ERROR_RECOVERY_DISABLE (1 << 7) |
Line 5688... | Line 6353... | ||
5688 | #define LP_RX_TIMEOUT_ERROR_RECOVERY_DISABLE (1 << 7) |
6353 | #define HS_RX_TIMEOUT_ERROR_RECOVERY_DISABLE (1 << 6) |
5689 | #define HS_RX_TIMEOUT_ERROR_RECOVERY_DISABLE (1 << 6) |
6354 | #define LOW_CONTENTION_RECOVERY_DISABLE (1 << 5) |
5690 | #define LOW_CONTENTION_RECOVERY_DISABLE (1 << 5) |
6355 | #define HIGH_CONTENTION_RECOVERY_DISABLE (1 << 4) |
5691 | #define HIGH_CONTENTION_RECOVERY_DISABLE (1 << 4) |
6356 | #define TXDSI_TYPE_NOT_RECOGNISED_ERROR_RECOVERY_DISABLE (1 << 3) |
- | 6357 | #define TXECC_MULTIBIT_ERROR_RECOVERY_DISABLE (1 << 2) |
|
Line 5692... | Line 6358... | ||
5692 | #define TXDSI_TYPE_NOT_RECOGNISED_ERROR_RECOVERY_DISABLE (1 << 3) |
6358 | #define CLOCKSTOP (1 << 1) |
5693 | #define TXECC_MULTIBIT_ERROR_RECOVERY_DISABLE (1 << 2) |
6359 | #define EOT_DISABLE (1 << 0) |
5694 | #define CLOCKSTOP (1 << 1) |
6360 | |
5695 | #define EOT_DISABLE (1 << 0) |
6361 | #define _MIPIA_LP_BYTECLK (dev_priv->mipi_mmio_base + 0xb060) |
- | 6362 | #define _MIPIB_LP_BYTECLK (dev_priv->mipi_mmio_base + 0xb860) |
|
5696 | 6363 | #define MIPI_LP_BYTECLK(tc) _TRANSCODER(tc, _MIPIA_LP_BYTECLK, \ |
|
5697 | #define _MIPIA_LP_BYTECLK (VLV_DISPLAY_BASE + 0xb060) |
6364 | _MIPIB_LP_BYTECLK) |
5698 | #define _MIPIB_LP_BYTECLK (VLV_DISPLAY_BASE + 0xb860) |
6365 | #define LP_BYTECLK_SHIFT 0 |
5699 | #define MIPI_LP_BYTECLK(pipe) _PIPE(pipe, _MIPIA_LP_BYTECLK, _MIPIB_LP_BYTECLK) |
6366 | #define LP_BYTECLK_MASK (0xffff << 0) |
- | 6367 | ||
5700 | #define LP_BYTECLK_SHIFT 0 |
6368 | /* bits 31:0 */ |
5701 | #define LP_BYTECLK_MASK (0xffff << 0) |
6369 | #define _MIPIA_LP_GEN_DATA (dev_priv->mipi_mmio_base + 0xb064) |
5702 | 6370 | #define _MIPIB_LP_GEN_DATA (dev_priv->mipi_mmio_base + 0xb864) |
|
- | 6371 | #define MIPI_LP_GEN_DATA(tc) _TRANSCODER(tc, _MIPIA_LP_GEN_DATA, \ |
|
5703 | /* bits 31:0 */ |
6372 | _MIPIB_LP_GEN_DATA) |
5704 | #define _MIPIA_LP_GEN_DATA (VLV_DISPLAY_BASE + 0xb064) |
6373 | |
5705 | #define _MIPIB_LP_GEN_DATA (VLV_DISPLAY_BASE + 0xb864) |
6374 | /* bits 31:0 */ |
5706 | #define MIPI_LP_GEN_DATA(pipe) _PIPE(pipe, _MIPIA_LP_GEN_DATA, _MIPIB_LP_GEN_DATA) |
6375 | #define _MIPIA_HS_GEN_DATA (dev_priv->mipi_mmio_base + 0xb068) |
5707 | 6376 | #define _MIPIB_HS_GEN_DATA (dev_priv->mipi_mmio_base + 0xb868) |
|
5708 | /* bits 31:0 */ |
6377 | #define MIPI_HS_GEN_DATA(tc) _TRANSCODER(tc, _MIPIA_HS_GEN_DATA, \ |
5709 | #define _MIPIA_HS_GEN_DATA (VLV_DISPLAY_BASE + 0xb068) |
6378 | _MIPIB_HS_GEN_DATA) |
5710 | #define _MIPIB_HS_GEN_DATA (VLV_DISPLAY_BASE + 0xb868) |
6379 | |
5711 | #define MIPI_HS_GEN_DATA(pipe) _PIPE(pipe, _MIPIA_HS_GEN_DATA, _MIPIB_HS_GEN_DATA) |
6380 | #define _MIPIA_LP_GEN_CTRL (dev_priv->mipi_mmio_base + 0xb06c) |
Line 5712... | Line 6381... | ||
5712 | 6381 | #define _MIPIB_LP_GEN_CTRL (dev_priv->mipi_mmio_base + 0xb86c) |
|
5713 | #define _MIPIA_LP_GEN_CTRL (VLV_DISPLAY_BASE + 0xb06c) |
6382 | #define MIPI_LP_GEN_CTRL(tc) _TRANSCODER(tc, _MIPIA_LP_GEN_CTRL, \ |
5714 | #define _MIPIB_LP_GEN_CTRL (VLV_DISPLAY_BASE + 0xb86c) |
6383 | _MIPIB_LP_GEN_CTRL) |
- | 6384 | #define _MIPIA_HS_GEN_CTRL (dev_priv->mipi_mmio_base + 0xb070) |
|
5715 | #define MIPI_LP_GEN_CTRL(pipe) _PIPE(pipe, _MIPIA_LP_GEN_CTRL, _MIPIB_LP_GEN_CTRL) |
6385 | #define _MIPIB_HS_GEN_CTRL (dev_priv->mipi_mmio_base + 0xb870) |
5716 | #define _MIPIA_HS_GEN_CTRL (VLV_DISPLAY_BASE + 0xb070) |
6386 | #define MIPI_HS_GEN_CTRL(tc) _TRANSCODER(tc, _MIPIA_HS_GEN_CTRL, \ |
5717 | #define _MIPIB_HS_GEN_CTRL (VLV_DISPLAY_BASE + 0xb870) |
6387 | _MIPIB_HS_GEN_CTRL) |
5718 | #define MIPI_HS_GEN_CTRL(pipe) _PIPE(pipe, _MIPIA_HS_GEN_CTRL, _MIPIB_HS_GEN_CTRL) |
6388 | #define LONG_PACKET_WORD_COUNT_SHIFT 8 |
5719 | #define LONG_PACKET_WORD_COUNT_SHIFT 8 |
6389 | #define LONG_PACKET_WORD_COUNT_MASK (0xffff << 8) |
Line 5742... | Line 6412... | ||
5742 | #define LP_DATA_FIFO_FULL (1 << 8) |
6412 | #define LP_DATA_FIFO_FULL (1 << 8) |
5743 | #define HS_DATA_FIFO_EMPTY (1 << 2) |
6413 | #define HS_DATA_FIFO_EMPTY (1 << 2) |
5744 | #define HS_DATA_FIFO_HALF_EMPTY (1 << 1) |
6414 | #define HS_DATA_FIFO_HALF_EMPTY (1 << 1) |
5745 | #define HS_DATA_FIFO_FULL (1 << 0) |
6415 | #define HS_DATA_FIFO_FULL (1 << 0) |
Line 5746... | Line 6416... | ||
5746 | 6416 | ||
5747 | #define _MIPIA_HS_LS_DBI_ENABLE (VLV_DISPLAY_BASE + 0xb078) |
6417 | #define _MIPIA_HS_LS_DBI_ENABLE (dev_priv->mipi_mmio_base + 0xb078) |
- | 6418 | #define _MIPIB_HS_LS_DBI_ENABLE (dev_priv->mipi_mmio_base + 0xb878) |
|
5748 | #define _MIPIB_HS_LS_DBI_ENABLE (VLV_DISPLAY_BASE + 0xb878) |
6419 | #define MIPI_HS_LP_DBI_ENABLE(tc) _TRANSCODER(tc, \ |
5749 | #define MIPI_HS_LP_DBI_ENABLE(pipe) _PIPE(pipe, _MIPIA_HS_LS_DBI_ENABLE, _MIPIB_HS_LS_DBI_ENABLE) |
6420 | _MIPIA_HS_LS_DBI_ENABLE, _MIPIB_HS_LS_DBI_ENABLE) |
5750 | #define DBI_HS_LP_MODE_MASK (1 << 0) |
6421 | #define DBI_HS_LP_MODE_MASK (1 << 0) |
5751 | #define DBI_LP_MODE (1 << 0) |
6422 | #define DBI_LP_MODE (1 << 0) |
Line 5752... | Line 6423... | ||
5752 | #define DBI_HS_MODE (0 << 0) |
6423 | #define DBI_HS_MODE (0 << 0) |
5753 | 6424 | ||
5754 | #define _MIPIA_DPHY_PARAM (VLV_DISPLAY_BASE + 0xb080) |
6425 | #define _MIPIA_DPHY_PARAM (dev_priv->mipi_mmio_base + 0xb080) |
- | 6426 | #define _MIPIB_DPHY_PARAM (dev_priv->mipi_mmio_base + 0xb880) |
|
5755 | #define _MIPIB_DPHY_PARAM (VLV_DISPLAY_BASE + 0xb880) |
6427 | #define MIPI_DPHY_PARAM(tc) _TRANSCODER(tc, _MIPIA_DPHY_PARAM, \ |
5756 | #define MIPI_DPHY_PARAM(pipe) _PIPE(pipe, _MIPIA_DPHY_PARAM, _MIPIB_DPHY_PARAM) |
6428 | _MIPIB_DPHY_PARAM) |
5757 | #define EXIT_ZERO_COUNT_SHIFT 24 |
6429 | #define EXIT_ZERO_COUNT_SHIFT 24 |
5758 | #define EXIT_ZERO_COUNT_MASK (0x3f << 24) |
6430 | #define EXIT_ZERO_COUNT_MASK (0x3f << 24) |
5759 | #define TRAIL_COUNT_SHIFT 16 |
6431 | #define TRAIL_COUNT_SHIFT 16 |
5760 | #define TRAIL_COUNT_MASK (0x1f << 16) |
6432 | #define TRAIL_COUNT_MASK (0x1f << 16) |
5761 | #define CLK_ZERO_COUNT_SHIFT 8 |
6433 | #define CLK_ZERO_COUNT_SHIFT 8 |
5762 | #define CLK_ZERO_COUNT_MASK (0xff << 8) |
6434 | #define CLK_ZERO_COUNT_MASK (0xff << 8) |
Line 5763... | Line 6435... | ||
5763 | #define PREPARE_COUNT_SHIFT 0 |
6435 | #define PREPARE_COUNT_SHIFT 0 |
5764 | #define PREPARE_COUNT_MASK (0x3f << 0) |
6436 | #define PREPARE_COUNT_MASK (0x3f << 0) |
5765 | 6437 | ||
5766 | /* bits 31:0 */ |
6438 | /* bits 31:0 */ |
- | 6439 | #define _MIPIA_DBI_BW_CTRL (dev_priv->mipi_mmio_base + 0xb084) |
|
5767 | #define _MIPIA_DBI_BW_CTRL (VLV_DISPLAY_BASE + 0xb084) |
6440 | #define _MIPIB_DBI_BW_CTRL (dev_priv->mipi_mmio_base + 0xb884) |
5768 | #define _MIPIB_DBI_BW_CTRL (VLV_DISPLAY_BASE + 0xb884) |
6441 | #define MIPI_DBI_BW_CTRL(tc) _TRANSCODER(tc, _MIPIA_DBI_BW_CTRL, \ |
- | 6442 | _MIPIB_DBI_BW_CTRL) |
|
5769 | #define MIPI_DBI_BW_CTRL(pipe) _PIPE(pipe, _MIPIA_DBI_BW_CTRL, _MIPIB_DBI_BW_CTRL) |
6443 | |
- | 6444 | #define _MIPIA_CLK_LANE_SWITCH_TIME_CNT (dev_priv->mipi_mmio_base \ |
|
- | 6445 | + 0xb088) |
|
5770 | 6446 | #define _MIPIB_CLK_LANE_SWITCH_TIME_CNT (dev_priv->mipi_mmio_base \ |
|
5771 | #define _MIPIA_CLK_LANE_SWITCH_TIME_CNT (VLV_DISPLAY_BASE + 0xb088) |
6447 | + 0xb888) |
5772 | #define _MIPIB_CLK_LANE_SWITCH_TIME_CNT (VLV_DISPLAY_BASE + 0xb888) |
6448 | #define MIPI_CLK_LANE_SWITCH_TIME_CNT(tc) _TRANSCODER(tc, \ |
5773 | #define MIPI_CLK_LANE_SWITCH_TIME_CNT(pipe) _PIPE(pipe, _MIPIA_CLK_LANE_SWITCH_TIME_CNT, _MIPIB_CLK_LANE_SWITCH_TIME_CNT) |
6449 | _MIPIA_CLK_LANE_SWITCH_TIME_CNT, _MIPIB_CLK_LANE_SWITCH_TIME_CNT) |
5774 | #define LP_HS_SSW_CNT_SHIFT 16 |
6450 | #define LP_HS_SSW_CNT_SHIFT 16 |
Line 5775... | Line 6451... | ||
5775 | #define LP_HS_SSW_CNT_MASK (0xffff << 16) |
6451 | #define LP_HS_SSW_CNT_MASK (0xffff << 16) |
5776 | #define HS_LP_PWR_SW_CNT_SHIFT 0 |
6452 | #define HS_LP_PWR_SW_CNT_SHIFT 0 |
- | 6453 | #define HS_LP_PWR_SW_CNT_MASK (0xffff << 0) |
|
5777 | #define HS_LP_PWR_SW_CNT_MASK (0xffff << 0) |
6454 | |
5778 | 6455 | #define _MIPIA_STOP_STATE_STALL (dev_priv->mipi_mmio_base + 0xb08c) |
|
5779 | #define _MIPIA_STOP_STATE_STALL (VLV_DISPLAY_BASE + 0xb08c) |
6456 | #define _MIPIB_STOP_STATE_STALL (dev_priv->mipi_mmio_base + 0xb88c) |
Line 5780... | Line 6457... | ||
5780 | #define _MIPIB_STOP_STATE_STALL (VLV_DISPLAY_BASE + 0xb88c) |
6457 | #define MIPI_STOP_STATE_STALL(tc) _TRANSCODER(tc, \ |
5781 | #define MIPI_STOP_STATE_STALL(pipe) _PIPE(pipe, _MIPIA_STOP_STATE_STALL, _MIPIB_STOP_STATE_STALL) |
6458 | _MIPIA_STOP_STATE_STALL, _MIPIB_STOP_STATE_STALL) |
- | 6459 | #define STOP_STATE_STALL_COUNTER_SHIFT 0 |
|
5782 | #define STOP_STATE_STALL_COUNTER_SHIFT 0 |
6460 | #define STOP_STATE_STALL_COUNTER_MASK (0xff << 0) |
5783 | #define STOP_STATE_STALL_COUNTER_MASK (0xff << 0) |
6461 | |
5784 | 6462 | #define _MIPIA_INTR_STAT_REG_1 (dev_priv->mipi_mmio_base + 0xb090) |
|
5785 | #define _MIPIA_INTR_STAT_REG_1 (VLV_DISPLAY_BASE + 0xb090) |
6463 | #define _MIPIB_INTR_STAT_REG_1 (dev_priv->mipi_mmio_base + 0xb890) |
- | 6464 | #define MIPI_INTR_STAT_REG_1(tc) _TRANSCODER(tc, \ |
|
5786 | #define _MIPIB_INTR_STAT_REG_1 (VLV_DISPLAY_BASE + 0xb890) |
6465 | _MIPIA_INTR_STAT_REG_1, _MIPIB_INTR_STAT_REG_1) |
Line 5787... | Line 6466... | ||
5787 | #define MIPI_INTR_STAT_REG_1(pipe) _PIPE(pipe, _MIPIA_INTR_STAT_REG_1, _MIPIB_INTR_STAT_REG_1) |
6466 | #define _MIPIA_INTR_EN_REG_1 (dev_priv->mipi_mmio_base + 0xb094) |
5788 | #define _MIPIA_INTR_EN_REG_1 (VLV_DISPLAY_BASE + 0xb094) |
6467 | #define _MIPIB_INTR_EN_REG_1 (dev_priv->mipi_mmio_base + 0xb894) |
5789 | #define _MIPIB_INTR_EN_REG_1 (VLV_DISPLAY_BASE + 0xb894) |
6468 | #define MIPI_INTR_EN_REG_1(tc) _TRANSCODER(tc, _MIPIA_INTR_EN_REG_1, \ |
5790 | #define MIPI_INTR_EN_REG_1(pipe) _PIPE(pipe, _MIPIA_INTR_EN_REG_1, _MIPIB_INTR_EN_REG_1) |
6469 | _MIPIB_INTR_EN_REG_1) |
5791 | #define RX_CONTENTION_DETECTED (1 << 0) |
6470 | #define RX_CONTENTION_DETECTED (1 << 0) |
5792 | 6471 | ||
5793 | /* XXX: only pipe A ?!? */ |
6472 | /* XXX: only pipe A ?!? */ |
Line 5803... | Line 6482... | ||
5803 | #define DBI_TYPEC_OVERRIDE_COUNTER_MASK (0xff << 0) |
6482 | #define DBI_TYPEC_OVERRIDE_COUNTER_MASK (0xff << 0) |
Line 5804... | Line 6483... | ||
5804 | 6483 | ||
Line 5805... | Line 6484... | ||
5805 | 6484 | ||
5806 | /* MIPI adapter registers */ |
6485 | /* MIPI adapter registers */ |
5807 | 6486 | ||
- | 6487 | #define _MIPIA_CTRL (dev_priv->mipi_mmio_base + 0xb104) |
|
5808 | #define _MIPIA_CTRL (VLV_DISPLAY_BASE + 0xb104) |
6488 | #define _MIPIB_CTRL (dev_priv->mipi_mmio_base + 0xb904) |
5809 | #define _MIPIB_CTRL (VLV_DISPLAY_BASE + 0xb904) |
6489 | #define MIPI_CTRL(tc) _TRANSCODER(tc, _MIPIA_CTRL, \ |
5810 | #define MIPI_CTRL(pipe) _PIPE(pipe, _MIPIA_CTRL, _MIPIB_CTRL) |
6490 | _MIPIB_CTRL) |
5811 | #define ESCAPE_CLOCK_DIVIDER_SHIFT 5 /* A only */ |
6491 | #define ESCAPE_CLOCK_DIVIDER_SHIFT 5 /* A only */ |
5812 | #define ESCAPE_CLOCK_DIVIDER_MASK (3 << 5) |
6492 | #define ESCAPE_CLOCK_DIVIDER_MASK (3 << 5) |
Line 5817... | Line 6497... | ||
5817 | #define READ_REQUEST_PRIORITY_MASK (3 << 3) |
6497 | #define READ_REQUEST_PRIORITY_MASK (3 << 3) |
5818 | #define READ_REQUEST_PRIORITY_LOW (0 << 3) |
6498 | #define READ_REQUEST_PRIORITY_LOW (0 << 3) |
5819 | #define READ_REQUEST_PRIORITY_HIGH (3 << 3) |
6499 | #define READ_REQUEST_PRIORITY_HIGH (3 << 3) |
5820 | #define RGB_FLIP_TO_BGR (1 << 2) |
6500 | #define RGB_FLIP_TO_BGR (1 << 2) |
Line 5821... | Line 6501... | ||
5821 | 6501 | ||
5822 | #define _MIPIA_DATA_ADDRESS (VLV_DISPLAY_BASE + 0xb108) |
6502 | #define _MIPIA_DATA_ADDRESS (dev_priv->mipi_mmio_base + 0xb108) |
5823 | #define _MIPIB_DATA_ADDRESS (VLV_DISPLAY_BASE + 0xb908) |
6503 | #define _MIPIB_DATA_ADDRESS (dev_priv->mipi_mmio_base + 0xb908) |
- | 6504 | #define MIPI_DATA_ADDRESS(tc) _TRANSCODER(tc, _MIPIA_DATA_ADDRESS, \ |
|
5824 | #define MIPI_DATA_ADDRESS(pipe) _PIPE(pipe, _MIPIA_DATA_ADDRESS, _MIPIB_DATA_ADDRESS) |
6505 | _MIPIB_DATA_ADDRESS) |
5825 | #define DATA_MEM_ADDRESS_SHIFT 5 |
6506 | #define DATA_MEM_ADDRESS_SHIFT 5 |
5826 | #define DATA_MEM_ADDRESS_MASK (0x7ffffff << 5) |
6507 | #define DATA_MEM_ADDRESS_MASK (0x7ffffff << 5) |
Line 5827... | Line 6508... | ||
5827 | #define DATA_VALID (1 << 0) |
6508 | #define DATA_VALID (1 << 0) |
5828 | 6509 | ||
5829 | #define _MIPIA_DATA_LENGTH (VLV_DISPLAY_BASE + 0xb10c) |
6510 | #define _MIPIA_DATA_LENGTH (dev_priv->mipi_mmio_base + 0xb10c) |
- | 6511 | #define _MIPIB_DATA_LENGTH (dev_priv->mipi_mmio_base + 0xb90c) |
|
5830 | #define _MIPIB_DATA_LENGTH (VLV_DISPLAY_BASE + 0xb90c) |
6512 | #define MIPI_DATA_LENGTH(tc) _TRANSCODER(tc, _MIPIA_DATA_LENGTH, \ |
5831 | #define MIPI_DATA_LENGTH(pipe) _PIPE(pipe, _MIPIA_DATA_LENGTH, _MIPIB_DATA_LENGTH) |
6513 | _MIPIB_DATA_LENGTH) |
Line 5832... | Line 6514... | ||
5832 | #define DATA_LENGTH_SHIFT 0 |
6514 | #define DATA_LENGTH_SHIFT 0 |
5833 | #define DATA_LENGTH_MASK (0xfffff << 0) |
6515 | #define DATA_LENGTH_MASK (0xfffff << 0) |
- | 6516 | ||
5834 | 6517 | #define _MIPIA_COMMAND_ADDRESS (dev_priv->mipi_mmio_base + 0xb110) |
|
5835 | #define _MIPIA_COMMAND_ADDRESS (VLV_DISPLAY_BASE + 0xb110) |
6518 | #define _MIPIB_COMMAND_ADDRESS (dev_priv->mipi_mmio_base + 0xb910) |
5836 | #define _MIPIB_COMMAND_ADDRESS (VLV_DISPLAY_BASE + 0xb910) |
6519 | #define MIPI_COMMAND_ADDRESS(tc) _TRANSCODER(tc, \ |
5837 | #define MIPI_COMMAND_ADDRESS(pipe) _PIPE(pipe, _MIPIA_COMMAND_ADDRESS, _MIPIB_COMMAND_ADDRESS) |
6520 | _MIPIA_COMMAND_ADDRESS, _MIPIB_COMMAND_ADDRESS) |
5838 | #define COMMAND_MEM_ADDRESS_SHIFT 5 |
6521 | #define COMMAND_MEM_ADDRESS_SHIFT 5 |
5839 | #define COMMAND_MEM_ADDRESS_MASK (0x7ffffff << 5) |
6522 | #define COMMAND_MEM_ADDRESS_MASK (0x7ffffff << 5) |
Line 5840... | Line 6523... | ||
5840 | #define AUTO_PWG_ENABLE (1 << 2) |
6523 | #define AUTO_PWG_ENABLE (1 << 2) |
5841 | #define MEMORY_WRITE_DATA_FROM_PIPE_RENDERING (1 << 1) |
6524 | #define MEMORY_WRITE_DATA_FROM_PIPE_RENDERING (1 << 1) |
5842 | #define COMMAND_VALID (1 << 0) |
6525 | #define COMMAND_VALID (1 << 0) |
- | 6526 | ||
5843 | 6527 | #define _MIPIA_COMMAND_LENGTH (dev_priv->mipi_mmio_base + 0xb114) |
|
5844 | #define _MIPIA_COMMAND_LENGTH (VLV_DISPLAY_BASE + 0xb114) |
6528 | #define _MIPIB_COMMAND_LENGTH (dev_priv->mipi_mmio_base + 0xb914) |
Line 5845... | Line 6529... | ||
5845 | #define _MIPIB_COMMAND_LENGTH (VLV_DISPLAY_BASE + 0xb914) |
6529 | #define MIPI_COMMAND_LENGTH(tc) _TRANSCODER(tc, _MIPIA_COMMAND_LENGTH, \ |
5846 | #define MIPI_COMMAND_LENGTH(pipe) _PIPE(pipe, _MIPIA_COMMAND_LENGTH, _MIPIB_COMMAND_LENGTH) |
6530 | _MIPIB_COMMAND_LENGTH) |
5847 | #define COMMAND_LENGTH_SHIFT(n) (8 * (n)) /* n: 0...3 */ |
6531 | #define COMMAND_LENGTH_SHIFT(n) (8 * (n)) /* n: 0...3 */ |
5848 | #define COMMAND_LENGTH_MASK(n) (0xff << (8 * (n))) |
6532 | #define COMMAND_LENGTH_MASK(n) (0xff << (8 * (n))) |
- | 6533 | ||
5849 | 6534 | #define _MIPIA_READ_DATA_RETURN0 (dev_priv->mipi_mmio_base + 0xb118) |
|
5850 | #define _MIPIA_READ_DATA_RETURN0 (VLV_DISPLAY_BASE + 0xb118) |
6535 | #define _MIPIB_READ_DATA_RETURN0 (dev_priv->mipi_mmio_base + 0xb918) |
5851 | #define _MIPIB_READ_DATA_RETURN0 (VLV_DISPLAY_BASE + 0xb918) |
6536 | #define MIPI_READ_DATA_RETURN(tc, n) \ |
- | 6537 | (_TRANSCODER(tc, _MIPIA_READ_DATA_RETURN0, _MIPIB_READ_DATA_RETURN0) \ |
|
5852 | #define MIPI_READ_DATA_RETURN(pipe, n) \ |
6538 | + 4 * (n)) /* n: 0...7 */ |
5853 | (_PIPE(pipe, _MIPIA_READ_DATA_RETURN0, _MIPIB_READ_DATA_RETURN0) + 4 * (n)) /* n: 0...7 */ |
6539 | |
Line -... | Line 6540... | ||
- | 6540 | #define _MIPIA_READ_DATA_VALID (dev_priv->mipi_mmio_base + 0xb138) |
|
- | 6541 | #define _MIPIB_READ_DATA_VALID (dev_priv->mipi_mmio_base + 0xb938) |
|
- | 6542 | #define MIPI_READ_DATA_VALID(tc) _TRANSCODER(tc, \ |
|
- | 6543 | _MIPIA_READ_DATA_VALID, _MIPIB_READ_DATA_VALID) |
|
5854 | 6544 | #define READ_DATA_VALID(n) (1 << (n)) |