diff options
author | Ben Skeggs <bskeggs@redhat.com> | 2012-04-01 07:09:13 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2012-05-24 02:31:49 -0400 |
commit | 6d597027755b2eed4298b85ebe3cb5c93b29d1a9 (patch) | |
tree | 827e189534f285c2bbf4c96e627685d27937b4db | |
parent | 78339fb75c21403677f61a02e1839b626a79325b (diff) |
drm/nouveau: use the same packet header macros as userspace
Cosmetic cleanup only.
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_bo.c | 30 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_display.c | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_dma.h | 26 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_fbcon.c | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_fence.c | 26 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_state.c | 8 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nv04_fbcon.c | 48 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nv50_crtc.c | 46 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nv50_cursor.c | 12 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nv50_dac.c | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nv50_display.c | 50 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nv50_fbcon.c | 58 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nv50_sor.c | 6 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvc0_fbcon.c | 54 | ||||
-rw-r--r-- | drivers/gpu/drm/nouveau/nvd0_display.c | 4 |
15 files changed, 203 insertions, 185 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_bo.c b/drivers/gpu/drm/nouveau/nouveau_bo.c index 1da403123eca..c45c7bce9ebd 100644 --- a/drivers/gpu/drm/nouveau/nouveau_bo.c +++ b/drivers/gpu/drm/nouveau/nouveau_bo.c | |||
@@ -495,7 +495,7 @@ nve0_bo_move_copy(struct nouveau_channel *chan, struct ttm_buffer_object *bo, | |||
495 | struct nouveau_mem *node = old_mem->mm_node; | 495 | struct nouveau_mem *node = old_mem->mm_node; |
496 | int ret = RING_SPACE(chan, 10); | 496 | int ret = RING_SPACE(chan, 10); |
497 | if (ret == 0) { | 497 | if (ret == 0) { |
498 | BEGIN_NVC0(chan, 2, NvSubCopy, 0x0400, 8); | 498 | BEGIN_NVC0(chan, NvSubCopy, 0x0400, 8); |
499 | OUT_RING (chan, upper_32_bits(node->vma[0].offset)); | 499 | OUT_RING (chan, upper_32_bits(node->vma[0].offset)); |
500 | OUT_RING (chan, lower_32_bits(node->vma[0].offset)); | 500 | OUT_RING (chan, lower_32_bits(node->vma[0].offset)); |
501 | OUT_RING (chan, upper_32_bits(node->vma[1].offset)); | 501 | OUT_RING (chan, upper_32_bits(node->vma[1].offset)); |
@@ -504,7 +504,7 @@ nve0_bo_move_copy(struct nouveau_channel *chan, struct ttm_buffer_object *bo, | |||
504 | OUT_RING (chan, PAGE_SIZE); | 504 | OUT_RING (chan, PAGE_SIZE); |
505 | OUT_RING (chan, PAGE_SIZE); | 505 | OUT_RING (chan, PAGE_SIZE); |
506 | OUT_RING (chan, new_mem->num_pages); | 506 | OUT_RING (chan, new_mem->num_pages); |
507 | BEGIN_NVC0(chan, 8, NvSubCopy, 0x0300, 0x0386); | 507 | BEGIN_IMC0(chan, NvSubCopy, 0x0300, 0x0386); |
508 | } | 508 | } |
509 | return ret; | 509 | return ret; |
510 | } | 510 | } |
@@ -527,17 +527,17 @@ nvc0_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo, | |||
527 | if (ret) | 527 | if (ret) |
528 | return ret; | 528 | return ret; |
529 | 529 | ||
530 | BEGIN_NVC0(chan, 2, NvSubM2MF, 0x0238, 2); | 530 | BEGIN_NVC0(chan, NvSubM2MF, 0x0238, 2); |
531 | OUT_RING (chan, upper_32_bits(dst_offset)); | 531 | OUT_RING (chan, upper_32_bits(dst_offset)); |
532 | OUT_RING (chan, lower_32_bits(dst_offset)); | 532 | OUT_RING (chan, lower_32_bits(dst_offset)); |
533 | BEGIN_NVC0(chan, 2, NvSubM2MF, 0x030c, 6); | 533 | BEGIN_NVC0(chan, NvSubM2MF, 0x030c, 6); |
534 | OUT_RING (chan, upper_32_bits(src_offset)); | 534 | OUT_RING (chan, upper_32_bits(src_offset)); |
535 | OUT_RING (chan, lower_32_bits(src_offset)); | 535 | OUT_RING (chan, lower_32_bits(src_offset)); |
536 | OUT_RING (chan, PAGE_SIZE); /* src_pitch */ | 536 | OUT_RING (chan, PAGE_SIZE); /* src_pitch */ |
537 | OUT_RING (chan, PAGE_SIZE); /* dst_pitch */ | 537 | OUT_RING (chan, PAGE_SIZE); /* dst_pitch */ |
538 | OUT_RING (chan, PAGE_SIZE); /* line_length */ | 538 | OUT_RING (chan, PAGE_SIZE); /* line_length */ |
539 | OUT_RING (chan, line_count); | 539 | OUT_RING (chan, line_count); |
540 | BEGIN_NVC0(chan, 2, NvSubM2MF, 0x0300, 1); | 540 | BEGIN_NVC0(chan, NvSubM2MF, 0x0300, 1); |
541 | OUT_RING (chan, 0x00100110); | 541 | OUT_RING (chan, 0x00100110); |
542 | 542 | ||
543 | page_count -= line_count; | 543 | page_count -= line_count; |
@@ -572,7 +572,7 @@ nv50_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo, | |||
572 | if (ret) | 572 | if (ret) |
573 | return ret; | 573 | return ret; |
574 | 574 | ||
575 | BEGIN_RING(chan, NvSubM2MF, 0x0200, 7); | 575 | BEGIN_NV04(chan, NvSubM2MF, 0x0200, 7); |
576 | OUT_RING (chan, 0); | 576 | OUT_RING (chan, 0); |
577 | OUT_RING (chan, 0); | 577 | OUT_RING (chan, 0); |
578 | OUT_RING (chan, stride); | 578 | OUT_RING (chan, stride); |
@@ -585,7 +585,7 @@ nv50_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo, | |||
585 | if (ret) | 585 | if (ret) |
586 | return ret; | 586 | return ret; |
587 | 587 | ||
588 | BEGIN_RING(chan, NvSubM2MF, 0x0200, 1); | 588 | BEGIN_NV04(chan, NvSubM2MF, 0x0200, 1); |
589 | OUT_RING (chan, 1); | 589 | OUT_RING (chan, 1); |
590 | } | 590 | } |
591 | if (old_mem->mem_type == TTM_PL_VRAM && | 591 | if (old_mem->mem_type == TTM_PL_VRAM && |
@@ -594,7 +594,7 @@ nv50_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo, | |||
594 | if (ret) | 594 | if (ret) |
595 | return ret; | 595 | return ret; |
596 | 596 | ||
597 | BEGIN_RING(chan, NvSubM2MF, 0x021c, 7); | 597 | BEGIN_NV04(chan, NvSubM2MF, 0x021c, 7); |
598 | OUT_RING (chan, 0); | 598 | OUT_RING (chan, 0); |
599 | OUT_RING (chan, 0); | 599 | OUT_RING (chan, 0); |
600 | OUT_RING (chan, stride); | 600 | OUT_RING (chan, stride); |
@@ -607,7 +607,7 @@ nv50_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo, | |||
607 | if (ret) | 607 | if (ret) |
608 | return ret; | 608 | return ret; |
609 | 609 | ||
610 | BEGIN_RING(chan, NvSubM2MF, 0x021c, 1); | 610 | BEGIN_NV04(chan, NvSubM2MF, 0x021c, 1); |
611 | OUT_RING (chan, 1); | 611 | OUT_RING (chan, 1); |
612 | } | 612 | } |
613 | 613 | ||
@@ -615,10 +615,10 @@ nv50_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo, | |||
615 | if (ret) | 615 | if (ret) |
616 | return ret; | 616 | return ret; |
617 | 617 | ||
618 | BEGIN_RING(chan, NvSubM2MF, 0x0238, 2); | 618 | BEGIN_NV04(chan, NvSubM2MF, 0x0238, 2); |
619 | OUT_RING (chan, upper_32_bits(src_offset)); | 619 | OUT_RING (chan, upper_32_bits(src_offset)); |
620 | OUT_RING (chan, upper_32_bits(dst_offset)); | 620 | OUT_RING (chan, upper_32_bits(dst_offset)); |
621 | BEGIN_RING(chan, NvSubM2MF, 0x030c, 8); | 621 | BEGIN_NV04(chan, NvSubM2MF, 0x030c, 8); |
622 | OUT_RING (chan, lower_32_bits(src_offset)); | 622 | OUT_RING (chan, lower_32_bits(src_offset)); |
623 | OUT_RING (chan, lower_32_bits(dst_offset)); | 623 | OUT_RING (chan, lower_32_bits(dst_offset)); |
624 | OUT_RING (chan, stride); | 624 | OUT_RING (chan, stride); |
@@ -627,7 +627,7 @@ nv50_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo, | |||
627 | OUT_RING (chan, height); | 627 | OUT_RING (chan, height); |
628 | OUT_RING (chan, 0x00000101); | 628 | OUT_RING (chan, 0x00000101); |
629 | OUT_RING (chan, 0x00000000); | 629 | OUT_RING (chan, 0x00000000); |
630 | BEGIN_RING(chan, NvSubM2MF, NV_MEMORY_TO_MEMORY_FORMAT_NOP, 1); | 630 | BEGIN_NV04(chan, NvSubM2MF, NV_MEMORY_TO_MEMORY_FORMAT_NOP, 1); |
631 | OUT_RING (chan, 0); | 631 | OUT_RING (chan, 0); |
632 | 632 | ||
633 | length -= amount; | 633 | length -= amount; |
@@ -660,7 +660,7 @@ nv04_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo, | |||
660 | if (ret) | 660 | if (ret) |
661 | return ret; | 661 | return ret; |
662 | 662 | ||
663 | BEGIN_RING(chan, NvSubM2MF, NV_MEMORY_TO_MEMORY_FORMAT_DMA_SOURCE, 2); | 663 | BEGIN_NV04(chan, NvSubM2MF, NV_MEMORY_TO_MEMORY_FORMAT_DMA_SOURCE, 2); |
664 | OUT_RING (chan, nouveau_bo_mem_ctxdma(bo, chan, old_mem)); | 664 | OUT_RING (chan, nouveau_bo_mem_ctxdma(bo, chan, old_mem)); |
665 | OUT_RING (chan, nouveau_bo_mem_ctxdma(bo, chan, new_mem)); | 665 | OUT_RING (chan, nouveau_bo_mem_ctxdma(bo, chan, new_mem)); |
666 | 666 | ||
@@ -672,7 +672,7 @@ nv04_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo, | |||
672 | if (ret) | 672 | if (ret) |
673 | return ret; | 673 | return ret; |
674 | 674 | ||
675 | BEGIN_RING(chan, NvSubM2MF, | 675 | BEGIN_NV04(chan, NvSubM2MF, |
676 | NV_MEMORY_TO_MEMORY_FORMAT_OFFSET_IN, 8); | 676 | NV_MEMORY_TO_MEMORY_FORMAT_OFFSET_IN, 8); |
677 | OUT_RING (chan, src_offset); | 677 | OUT_RING (chan, src_offset); |
678 | OUT_RING (chan, dst_offset); | 678 | OUT_RING (chan, dst_offset); |
@@ -682,7 +682,7 @@ nv04_bo_move_m2mf(struct nouveau_channel *chan, struct ttm_buffer_object *bo, | |||
682 | OUT_RING (chan, line_count); | 682 | OUT_RING (chan, line_count); |
683 | OUT_RING (chan, 0x00000101); | 683 | OUT_RING (chan, 0x00000101); |
684 | OUT_RING (chan, 0x00000000); | 684 | OUT_RING (chan, 0x00000000); |
685 | BEGIN_RING(chan, NvSubM2MF, NV_MEMORY_TO_MEMORY_FORMAT_NOP, 1); | 685 | BEGIN_NV04(chan, NvSubM2MF, NV_MEMORY_TO_MEMORY_FORMAT_NOP, 1); |
686 | OUT_RING (chan, 0); | 686 | OUT_RING (chan, 0); |
687 | 687 | ||
688 | page_count -= line_count; | 688 | page_count -= line_count; |
diff --git a/drivers/gpu/drm/nouveau/nouveau_display.c b/drivers/gpu/drm/nouveau/nouveau_display.c index 4b1cf7457983..b670b0d34233 100644 --- a/drivers/gpu/drm/nouveau/nouveau_display.c +++ b/drivers/gpu/drm/nouveau/nouveau_display.c | |||
@@ -446,13 +446,13 @@ nouveau_page_flip_emit(struct nouveau_channel *chan, | |||
446 | goto fail; | 446 | goto fail; |
447 | 447 | ||
448 | if (dev_priv->card_type < NV_C0) { | 448 | if (dev_priv->card_type < NV_C0) { |
449 | BEGIN_RING(chan, NvSubSw, NV_SW_PAGE_FLIP, 1); | 449 | BEGIN_NV04(chan, NvSubSw, NV_SW_PAGE_FLIP, 1); |
450 | OUT_RING (chan, 0x00000000); | 450 | OUT_RING (chan, 0x00000000); |
451 | OUT_RING (chan, 0x00000000); | 451 | OUT_RING (chan, 0x00000000); |
452 | } else { | 452 | } else { |
453 | BEGIN_NVC0(chan, 2, 0, NV10_SUBCHAN_REF_CNT, 1); | 453 | BEGIN_NVC0(chan, 0, NV10_SUBCHAN_REF_CNT, 1); |
454 | OUT_RING (chan, ++chan->fence.sequence); | 454 | OUT_RING (chan, ++chan->fence.sequence); |
455 | BEGIN_NVC0(chan, 8, 0, NVSW_SUBCHAN_PAGE_FLIP, 0x0000); | 455 | BEGIN_IMC0(chan, 0, NVSW_SUBCHAN_PAGE_FLIP, 0x0000); |
456 | } | 456 | } |
457 | FIRE_RING (chan); | 457 | FIRE_RING (chan); |
458 | 458 | ||
diff --git a/drivers/gpu/drm/nouveau/nouveau_dma.h b/drivers/gpu/drm/nouveau/nouveau_dma.h index f776b6af9640..b8838592d4e9 100644 --- a/drivers/gpu/drm/nouveau/nouveau_dma.h +++ b/drivers/gpu/drm/nouveau/nouveau_dma.h | |||
@@ -128,15 +128,33 @@ extern void | |||
128 | OUT_RINGp(struct nouveau_channel *chan, const void *data, unsigned nr_dwords); | 128 | OUT_RINGp(struct nouveau_channel *chan, const void *data, unsigned nr_dwords); |
129 | 129 | ||
130 | static inline void | 130 | static inline void |
131 | BEGIN_NVC0(struct nouveau_channel *chan, int op, int subc, int mthd, int size) | 131 | BEGIN_NV04(struct nouveau_channel *chan, int subc, int mthd, int size) |
132 | { | 132 | { |
133 | OUT_RING(chan, (op << 28) | (size << 16) | (subc << 13) | (mthd >> 2)); | 133 | OUT_RING(chan, 0x00000000 | (subc << 13) | (size << 18) | mthd); |
134 | } | 134 | } |
135 | 135 | ||
136 | static inline void | 136 | static inline void |
137 | BEGIN_RING(struct nouveau_channel *chan, int subc, int mthd, int size) | 137 | BEGIN_NI04(struct nouveau_channel *chan, int subc, int mthd, int size) |
138 | { | 138 | { |
139 | OUT_RING(chan, (subc << 13) | (size << 18) | mthd); | 139 | OUT_RING(chan, 0x40000000 | (subc << 13) | (size << 18) | mthd); |
140 | } | ||
141 | |||
142 | static inline void | ||
143 | BEGIN_NVC0(struct nouveau_channel *chan, int subc, int mthd, int size) | ||
144 | { | ||
145 | OUT_RING(chan, 0x20000000 | (size << 16) | (subc << 13) | (mthd >> 2)); | ||
146 | } | ||
147 | |||
148 | static inline void | ||
149 | BEGIN_NIC0(struct nouveau_channel *chan, int subc, int mthd, int size) | ||
150 | { | ||
151 | OUT_RING(chan, 0x60000000 | (size << 16) | (subc << 13) | (mthd >> 2)); | ||
152 | } | ||
153 | |||
154 | static inline void | ||
155 | BEGIN_IMC0(struct nouveau_channel *chan, int subc, int mthd, u16 data) | ||
156 | { | ||
157 | OUT_RING(chan, 0x80000000 | (data << 16) | (subc << 13) | (mthd >> 2)); | ||
140 | } | 158 | } |
141 | 159 | ||
142 | #define WRITE_PUT(val) do { \ | 160 | #define WRITE_PUT(val) do { \ |
diff --git a/drivers/gpu/drm/nouveau/nouveau_fbcon.c b/drivers/gpu/drm/nouveau/nouveau_fbcon.c index 8113e9201ed9..bce2e73b9ebd 100644 --- a/drivers/gpu/drm/nouveau/nouveau_fbcon.c +++ b/drivers/gpu/drm/nouveau/nouveau_fbcon.c | |||
@@ -171,14 +171,14 @@ nouveau_fbcon_sync(struct fb_info *info) | |||
171 | } | 171 | } |
172 | 172 | ||
173 | if (dev_priv->card_type >= NV_C0) { | 173 | if (dev_priv->card_type >= NV_C0) { |
174 | BEGIN_NVC0(chan, 2, NvSub2D, 0x010c, 1); | 174 | BEGIN_NVC0(chan, NvSub2D, 0x010c, 1); |
175 | OUT_RING (chan, 0); | 175 | OUT_RING (chan, 0); |
176 | BEGIN_NVC0(chan, 2, NvSub2D, 0x0100, 1); | 176 | BEGIN_NVC0(chan, NvSub2D, 0x0100, 1); |
177 | OUT_RING (chan, 0); | 177 | OUT_RING (chan, 0); |
178 | } else { | 178 | } else { |
179 | BEGIN_RING(chan, 0, 0x0104, 1); | 179 | BEGIN_NV04(chan, 0, 0x0104, 1); |
180 | OUT_RING (chan, 0); | 180 | OUT_RING (chan, 0); |
181 | BEGIN_RING(chan, 0, 0x0100, 1); | 181 | BEGIN_NV04(chan, 0, 0x0100, 1); |
182 | OUT_RING (chan, 0); | 182 | OUT_RING (chan, 0); |
183 | } | 183 | } |
184 | 184 | ||
diff --git a/drivers/gpu/drm/nouveau/nouveau_fence.c b/drivers/gpu/drm/nouveau/nouveau_fence.c index 965e3d2e8a7d..cb19bf447952 100644 --- a/drivers/gpu/drm/nouveau/nouveau_fence.c +++ b/drivers/gpu/drm/nouveau/nouveau_fence.c | |||
@@ -164,11 +164,11 @@ nouveau_fence_emit(struct nouveau_fence *fence) | |||
164 | 164 | ||
165 | if (USE_REFCNT(dev)) { | 165 | if (USE_REFCNT(dev)) { |
166 | if (dev_priv->card_type < NV_C0) | 166 | if (dev_priv->card_type < NV_C0) |
167 | BEGIN_RING(chan, 0, NV10_SUBCHAN_REF_CNT, 1); | 167 | BEGIN_NV04(chan, 0, NV10_SUBCHAN_REF_CNT, 1); |
168 | else | 168 | else |
169 | BEGIN_NVC0(chan, 2, 0, NV10_SUBCHAN_REF_CNT, 1); | 169 | BEGIN_NVC0(chan, 0, NV10_SUBCHAN_REF_CNT, 1); |
170 | } else { | 170 | } else { |
171 | BEGIN_RING(chan, NvSubSw, 0x0150, 1); | 171 | BEGIN_NV04(chan, NvSubSw, 0x0150, 1); |
172 | } | 172 | } |
173 | OUT_RING (chan, fence->sequence); | 173 | OUT_RING (chan, fence->sequence); |
174 | FIRE_RING(chan); | 174 | FIRE_RING(chan); |
@@ -343,7 +343,7 @@ semaphore_acquire(struct nouveau_channel *chan, struct nouveau_semaphore *sema) | |||
343 | if (ret) | 343 | if (ret) |
344 | return ret; | 344 | return ret; |
345 | 345 | ||
346 | BEGIN_RING(chan, 0, NV11_SUBCHAN_DMA_SEMAPHORE, 3); | 346 | BEGIN_NV04(chan, 0, NV11_SUBCHAN_DMA_SEMAPHORE, 3); |
347 | OUT_RING (chan, NvSema); | 347 | OUT_RING (chan, NvSema); |
348 | OUT_RING (chan, offset); | 348 | OUT_RING (chan, offset); |
349 | OUT_RING (chan, 1); | 349 | OUT_RING (chan, 1); |
@@ -353,9 +353,9 @@ semaphore_acquire(struct nouveau_channel *chan, struct nouveau_semaphore *sema) | |||
353 | if (ret) | 353 | if (ret) |
354 | return ret; | 354 | return ret; |
355 | 355 | ||
356 | BEGIN_RING(chan, 0, NV11_SUBCHAN_DMA_SEMAPHORE, 1); | 356 | BEGIN_NV04(chan, 0, NV11_SUBCHAN_DMA_SEMAPHORE, 1); |
357 | OUT_RING (chan, chan->vram_handle); | 357 | OUT_RING (chan, chan->vram_handle); |
358 | BEGIN_RING(chan, 0, NV84_SUBCHAN_SEMAPHORE_ADDRESS_HIGH, 4); | 358 | BEGIN_NV04(chan, 0, NV84_SUBCHAN_SEMAPHORE_ADDRESS_HIGH, 4); |
359 | OUT_RING (chan, upper_32_bits(offset)); | 359 | OUT_RING (chan, upper_32_bits(offset)); |
360 | OUT_RING (chan, lower_32_bits(offset)); | 360 | OUT_RING (chan, lower_32_bits(offset)); |
361 | OUT_RING (chan, 1); | 361 | OUT_RING (chan, 1); |
@@ -365,7 +365,7 @@ semaphore_acquire(struct nouveau_channel *chan, struct nouveau_semaphore *sema) | |||
365 | if (ret) | 365 | if (ret) |
366 | return ret; | 366 | return ret; |
367 | 367 | ||
368 | BEGIN_NVC0(chan, 2, 0, NV84_SUBCHAN_SEMAPHORE_ADDRESS_HIGH, 4); | 368 | BEGIN_NVC0(chan, 0, NV84_SUBCHAN_SEMAPHORE_ADDRESS_HIGH, 4); |
369 | OUT_RING (chan, upper_32_bits(offset)); | 369 | OUT_RING (chan, upper_32_bits(offset)); |
370 | OUT_RING (chan, lower_32_bits(offset)); | 370 | OUT_RING (chan, lower_32_bits(offset)); |
371 | OUT_RING (chan, 1); | 371 | OUT_RING (chan, 1); |
@@ -396,10 +396,10 @@ semaphore_release(struct nouveau_channel *chan, struct nouveau_semaphore *sema) | |||
396 | if (ret) | 396 | if (ret) |
397 | return ret; | 397 | return ret; |
398 | 398 | ||
399 | BEGIN_RING(chan, 0, NV11_SUBCHAN_DMA_SEMAPHORE, 2); | 399 | BEGIN_NV04(chan, 0, NV11_SUBCHAN_DMA_SEMAPHORE, 2); |
400 | OUT_RING (chan, NvSema); | 400 | OUT_RING (chan, NvSema); |
401 | OUT_RING (chan, offset); | 401 | OUT_RING (chan, offset); |
402 | BEGIN_RING(chan, 0, NV11_SUBCHAN_SEMAPHORE_RELEASE, 1); | 402 | BEGIN_NV04(chan, 0, NV11_SUBCHAN_SEMAPHORE_RELEASE, 1); |
403 | OUT_RING (chan, 1); | 403 | OUT_RING (chan, 1); |
404 | } else | 404 | } else |
405 | if (dev_priv->chipset < 0xc0) { | 405 | if (dev_priv->chipset < 0xc0) { |
@@ -407,9 +407,9 @@ semaphore_release(struct nouveau_channel *chan, struct nouveau_semaphore *sema) | |||
407 | if (ret) | 407 | if (ret) |
408 | return ret; | 408 | return ret; |
409 | 409 | ||
410 | BEGIN_RING(chan, 0, NV11_SUBCHAN_DMA_SEMAPHORE, 1); | 410 | BEGIN_NV04(chan, 0, NV11_SUBCHAN_DMA_SEMAPHORE, 1); |
411 | OUT_RING (chan, chan->vram_handle); | 411 | OUT_RING (chan, chan->vram_handle); |
412 | BEGIN_RING(chan, 0, NV84_SUBCHAN_SEMAPHORE_ADDRESS_HIGH, 4); | 412 | BEGIN_NV04(chan, 0, NV84_SUBCHAN_SEMAPHORE_ADDRESS_HIGH, 4); |
413 | OUT_RING (chan, upper_32_bits(offset)); | 413 | OUT_RING (chan, upper_32_bits(offset)); |
414 | OUT_RING (chan, lower_32_bits(offset)); | 414 | OUT_RING (chan, lower_32_bits(offset)); |
415 | OUT_RING (chan, 1); | 415 | OUT_RING (chan, 1); |
@@ -419,7 +419,7 @@ semaphore_release(struct nouveau_channel *chan, struct nouveau_semaphore *sema) | |||
419 | if (ret) | 419 | if (ret) |
420 | return ret; | 420 | return ret; |
421 | 421 | ||
422 | BEGIN_NVC0(chan, 2, 0, NV84_SUBCHAN_SEMAPHORE_ADDRESS_HIGH, 4); | 422 | BEGIN_NVC0(chan, 0, NV84_SUBCHAN_SEMAPHORE_ADDRESS_HIGH, 4); |
423 | OUT_RING (chan, upper_32_bits(offset)); | 423 | OUT_RING (chan, upper_32_bits(offset)); |
424 | OUT_RING (chan, lower_32_bits(offset)); | 424 | OUT_RING (chan, lower_32_bits(offset)); |
425 | OUT_RING (chan, 1); | 425 | OUT_RING (chan, 1); |
@@ -509,7 +509,7 @@ nouveau_fence_channel_init(struct nouveau_channel *chan) | |||
509 | if (ret) | 509 | if (ret) |
510 | return ret; | 510 | return ret; |
511 | 511 | ||
512 | BEGIN_RING(chan, NvSubSw, NV01_SUBCHAN_OBJECT, 1); | 512 | BEGIN_NV04(chan, NvSubSw, NV01_SUBCHAN_OBJECT, 1); |
513 | OUT_RING (chan, NvSw); | 513 | OUT_RING (chan, NvSw); |
514 | FIRE_RING (chan); | 514 | FIRE_RING (chan); |
515 | } | 515 | } |
diff --git a/drivers/gpu/drm/nouveau/nouveau_state.c b/drivers/gpu/drm/nouveau/nouveau_state.c index 78fb2cbeea23..e76edb51373d 100644 --- a/drivers/gpu/drm/nouveau/nouveau_state.c +++ b/drivers/gpu/drm/nouveau/nouveau_state.c | |||
@@ -639,9 +639,9 @@ nouveau_card_channel_init(struct drm_device *dev) | |||
639 | if (ret) | 639 | if (ret) |
640 | goto error; | 640 | goto error; |
641 | 641 | ||
642 | BEGIN_RING(chan, NvSubM2MF, NV_MEMORY_TO_MEMORY_FORMAT_NAME, 1); | 642 | BEGIN_NV04(chan, NvSubM2MF, NV_MEMORY_TO_MEMORY_FORMAT_NAME, 1); |
643 | OUT_RING (chan, NvM2MF); | 643 | OUT_RING (chan, NvM2MF); |
644 | BEGIN_RING(chan, NvSubM2MF, NV_MEMORY_TO_MEMORY_FORMAT_DMA_NOTIFY, 3); | 644 | BEGIN_NV04(chan, NvSubM2MF, NV_MEMORY_TO_MEMORY_FORMAT_DMA_NOTIFY, 3); |
645 | OUT_RING (chan, NvNotify0); | 645 | OUT_RING (chan, NvNotify0); |
646 | OUT_RING (chan, chan->vram_handle); | 646 | OUT_RING (chan, chan->vram_handle); |
647 | OUT_RING (chan, chan->gart_handle); | 647 | OUT_RING (chan, chan->gart_handle); |
@@ -655,7 +655,7 @@ nouveau_card_channel_init(struct drm_device *dev) | |||
655 | if (ret) | 655 | if (ret) |
656 | goto error; | 656 | goto error; |
657 | 657 | ||
658 | BEGIN_NVC0(chan, 2, NvSubM2MF, 0x0000, 1); | 658 | BEGIN_NVC0(chan, NvSubM2MF, 0x0000, 1); |
659 | OUT_RING (chan, 0x00009039); | 659 | OUT_RING (chan, 0x00009039); |
660 | } else | 660 | } else |
661 | if (dev_priv->card_type <= NV_E0) { | 661 | if (dev_priv->card_type <= NV_E0) { |
@@ -669,7 +669,7 @@ nouveau_card_channel_init(struct drm_device *dev) | |||
669 | if (ret) | 669 | if (ret) |
670 | goto error; | 670 | goto error; |
671 | 671 | ||
672 | BEGIN_NVC0(chan, 2, NvSubCopy, 0x0000, 1); | 672 | BEGIN_NVC0(chan, NvSubCopy, 0x0000, 1); |
673 | OUT_RING (chan, 0x0000a0b5); | 673 | OUT_RING (chan, 0x0000a0b5); |
674 | } | 674 | } |
675 | 675 | ||
diff --git a/drivers/gpu/drm/nouveau/nv04_fbcon.c b/drivers/gpu/drm/nouveau/nv04_fbcon.c index 7a1189371096..7cd7857347ef 100644 --- a/drivers/gpu/drm/nouveau/nv04_fbcon.c +++ b/drivers/gpu/drm/nouveau/nv04_fbcon.c | |||
@@ -41,7 +41,7 @@ nv04_fbcon_copyarea(struct fb_info *info, const struct fb_copyarea *region) | |||
41 | if (ret) | 41 | if (ret) |
42 | return ret; | 42 | return ret; |
43 | 43 | ||
44 | BEGIN_RING(chan, NvSubImageBlit, 0x0300, 3); | 44 | BEGIN_NV04(chan, NvSubImageBlit, 0x0300, 3); |
45 | OUT_RING(chan, (region->sy << 16) | region->sx); | 45 | OUT_RING(chan, (region->sy << 16) | region->sx); |
46 | OUT_RING(chan, (region->dy << 16) | region->dx); | 46 | OUT_RING(chan, (region->dy << 16) | region->dx); |
47 | OUT_RING(chan, (region->height << 16) | region->width); | 47 | OUT_RING(chan, (region->height << 16) | region->width); |
@@ -62,15 +62,15 @@ nv04_fbcon_fillrect(struct fb_info *info, const struct fb_fillrect *rect) | |||
62 | if (ret) | 62 | if (ret) |
63 | return ret; | 63 | return ret; |
64 | 64 | ||
65 | BEGIN_RING(chan, NvSubGdiRect, 0x02fc, 1); | 65 | BEGIN_NV04(chan, NvSubGdiRect, 0x02fc, 1); |
66 | OUT_RING(chan, (rect->rop != ROP_COPY) ? 1 : 3); | 66 | OUT_RING(chan, (rect->rop != ROP_COPY) ? 1 : 3); |
67 | BEGIN_RING(chan, NvSubGdiRect, 0x03fc, 1); | 67 | BEGIN_NV04(chan, NvSubGdiRect, 0x03fc, 1); |
68 | if (info->fix.visual == FB_VISUAL_TRUECOLOR || | 68 | if (info->fix.visual == FB_VISUAL_TRUECOLOR || |
69 | info->fix.visual == FB_VISUAL_DIRECTCOLOR) | 69 | info->fix.visual == FB_VISUAL_DIRECTCOLOR) |
70 | OUT_RING(chan, ((uint32_t *)info->pseudo_palette)[rect->color]); | 70 | OUT_RING(chan, ((uint32_t *)info->pseudo_palette)[rect->color]); |
71 | else | 71 | else |
72 | OUT_RING(chan, rect->color); | 72 | OUT_RING(chan, rect->color); |
73 | BEGIN_RING(chan, NvSubGdiRect, 0x0400, 2); | 73 | BEGIN_NV04(chan, NvSubGdiRect, 0x0400, 2); |
74 | OUT_RING(chan, (rect->dx << 16) | rect->dy); | 74 | OUT_RING(chan, (rect->dx << 16) | rect->dy); |
75 | OUT_RING(chan, (rect->width << 16) | rect->height); | 75 | OUT_RING(chan, (rect->width << 16) | rect->height); |
76 | FIRE_RING(chan); | 76 | FIRE_RING(chan); |
@@ -110,7 +110,7 @@ nv04_fbcon_imageblit(struct fb_info *info, const struct fb_image *image) | |||
110 | bg = image->bg_color; | 110 | bg = image->bg_color; |
111 | } | 111 | } |
112 | 112 | ||
113 | BEGIN_RING(chan, NvSubGdiRect, 0x0be4, 7); | 113 | BEGIN_NV04(chan, NvSubGdiRect, 0x0be4, 7); |
114 | OUT_RING(chan, (image->dy << 16) | (image->dx & 0xffff)); | 114 | OUT_RING(chan, (image->dy << 16) | (image->dx & 0xffff)); |
115 | OUT_RING(chan, ((image->dy + image->height) << 16) | | 115 | OUT_RING(chan, ((image->dy + image->height) << 16) | |
116 | ((image->dx + image->width) & 0xffff)); | 116 | ((image->dx + image->width) & 0xffff)); |
@@ -127,7 +127,7 @@ nv04_fbcon_imageblit(struct fb_info *info, const struct fb_image *image) | |||
127 | if (ret) | 127 | if (ret) |
128 | return ret; | 128 | return ret; |
129 | 129 | ||
130 | BEGIN_RING(chan, NvSubGdiRect, 0x0c00, iter_len); | 130 | BEGIN_NV04(chan, NvSubGdiRect, 0x0c00, iter_len); |
131 | OUT_RINGp(chan, data, iter_len); | 131 | OUT_RINGp(chan, data, iter_len); |
132 | data += iter_len; | 132 | data += iter_len; |
133 | dsize -= iter_len; | 133 | dsize -= iter_len; |
@@ -209,25 +209,25 @@ nv04_fbcon_accel_init(struct fb_info *info) | |||
209 | return 0; | 209 | return 0; |
210 | } | 210 | } |
211 | 211 | ||
212 | BEGIN_RING(chan, sub, 0x0000, 1); | 212 | BEGIN_NV04(chan, sub, 0x0000, 1); |
213 | OUT_RING(chan, NvCtxSurf2D); | 213 | OUT_RING(chan, NvCtxSurf2D); |
214 | BEGIN_RING(chan, sub, 0x0184, 2); | 214 | BEGIN_NV04(chan, sub, 0x0184, 2); |
215 | OUT_RING(chan, NvDmaFB); | 215 | OUT_RING(chan, NvDmaFB); |
216 | OUT_RING(chan, NvDmaFB); | 216 | OUT_RING(chan, NvDmaFB); |
217 | BEGIN_RING(chan, sub, 0x0300, 4); | 217 | BEGIN_NV04(chan, sub, 0x0300, 4); |
218 | OUT_RING(chan, surface_fmt); | 218 | OUT_RING(chan, surface_fmt); |
219 | OUT_RING(chan, info->fix.line_length | (info->fix.line_length << 16)); | 219 | OUT_RING(chan, info->fix.line_length | (info->fix.line_length << 16)); |
220 | OUT_RING(chan, info->fix.smem_start - dev->mode_config.fb_base); | 220 | OUT_RING(chan, info->fix.smem_start - dev->mode_config.fb_base); |
221 | OUT_RING(chan, info->fix.smem_start - dev->mode_config.fb_base); | 221 | OUT_RING(chan, info->fix.smem_start - dev->mode_config.fb_base); |
222 | 222 | ||
223 | BEGIN_RING(chan, sub, 0x0000, 1); | 223 | BEGIN_NV04(chan, sub, 0x0000, 1); |
224 | OUT_RING(chan, NvRop); | 224 | OUT_RING(chan, NvRop); |
225 | BEGIN_RING(chan, sub, 0x0300, 1); | 225 | BEGIN_NV04(chan, sub, 0x0300, 1); |
226 | OUT_RING(chan, 0x55); | 226 | OUT_RING(chan, 0x55); |
227 | 227 | ||
228 | BEGIN_RING(chan, sub, 0x0000, 1); | 228 | BEGIN_NV04(chan, sub, 0x0000, 1); |
229 | OUT_RING(chan, NvImagePatt); | 229 | OUT_RING(chan, NvImagePatt); |
230 | BEGIN_RING(chan, sub, 0x0300, 8); | 230 | BEGIN_NV04(chan, sub, 0x0300, 8); |
231 | OUT_RING(chan, pattern_fmt); | 231 | OUT_RING(chan, pattern_fmt); |
232 | #ifdef __BIG_ENDIAN | 232 | #ifdef __BIG_ENDIAN |
233 | OUT_RING(chan, 2); | 233 | OUT_RING(chan, 2); |
@@ -241,31 +241,31 @@ nv04_fbcon_accel_init(struct fb_info *info) | |||
241 | OUT_RING(chan, ~0); | 241 | OUT_RING(chan, ~0); |
242 | OUT_RING(chan, ~0); | 242 | OUT_RING(chan, ~0); |
243 | 243 | ||
244 | BEGIN_RING(chan, sub, 0x0000, 1); | 244 | BEGIN_NV04(chan, sub, 0x0000, 1); |
245 | OUT_RING(chan, NvClipRect); | 245 | OUT_RING(chan, NvClipRect); |
246 | BEGIN_RING(chan, sub, 0x0300, 2); | 246 | BEGIN_NV04(chan, sub, 0x0300, 2); |
247 | OUT_RING(chan, 0); | 247 | OUT_RING(chan, 0); |
248 | OUT_RING(chan, (info->var.yres_virtual << 16) | info->var.xres_virtual); | 248 | OUT_RING(chan, (info->var.yres_virtual << 16) | info->var.xres_virtual); |
249 | 249 | ||
250 | BEGIN_RING(chan, NvSubImageBlit, 0x0000, 1); | 250 | BEGIN_NV04(chan, NvSubImageBlit, 0x0000, 1); |
251 | OUT_RING(chan, NvImageBlit); | 251 | OUT_RING(chan, NvImageBlit); |
252 | BEGIN_RING(chan, NvSubImageBlit, 0x019c, 1); | 252 | BEGIN_NV04(chan, NvSubImageBlit, 0x019c, 1); |
253 | OUT_RING(chan, NvCtxSurf2D); | 253 | OUT_RING(chan, NvCtxSurf2D); |
254 | BEGIN_RING(chan, NvSubImageBlit, 0x02fc, 1); | 254 | BEGIN_NV04(chan, NvSubImageBlit, 0x02fc, 1); |
255 | OUT_RING(chan, 3); | 255 | OUT_RING(chan, 3); |
256 | 256 | ||
257 | BEGIN_RING(chan, NvSubGdiRect, 0x0000, 1); | 257 | BEGIN_NV04(chan, NvSubGdiRect, 0x0000, 1); |
258 | OUT_RING(chan, NvGdiRect); | 258 | OUT_RING(chan, NvGdiRect); |
259 | BEGIN_RING(chan, NvSubGdiRect, 0x0198, 1); | 259 | BEGIN_NV04(chan, NvSubGdiRect, 0x0198, 1); |
260 | OUT_RING(chan, NvCtxSurf2D); | 260 | OUT_RING(chan, NvCtxSurf2D); |
261 | BEGIN_RING(chan, NvSubGdiRect, 0x0188, 2); | 261 | BEGIN_NV04(chan, NvSubGdiRect, 0x0188, 2); |
262 | OUT_RING(chan, NvImagePatt); | 262 | OUT_RING(chan, NvImagePatt); |
263 | OUT_RING(chan, NvRop); | 263 | OUT_RING(chan, NvRop); |
264 | BEGIN_RING(chan, NvSubGdiRect, 0x0304, 1); | 264 | BEGIN_NV04(chan, NvSubGdiRect, 0x0304, 1); |
265 | OUT_RING(chan, 1); | 265 | OUT_RING(chan, 1); |
266 | BEGIN_RING(chan, NvSubGdiRect, 0x0300, 1); | 266 | BEGIN_NV04(chan, NvSubGdiRect, 0x0300, 1); |
267 | OUT_RING(chan, rect_fmt); | 267 | OUT_RING(chan, rect_fmt); |
268 | BEGIN_RING(chan, NvSubGdiRect, 0x02fc, 1); | 268 | BEGIN_NV04(chan, NvSubGdiRect, 0x02fc, 1); |
269 | OUT_RING(chan, 3); | 269 | OUT_RING(chan, 3); |
270 | 270 | ||
271 | FIRE_RING(chan); | 271 | FIRE_RING(chan); |
diff --git a/drivers/gpu/drm/nouveau/nv50_crtc.c b/drivers/gpu/drm/nouveau/nv50_crtc.c index cad2abd11756..7eb3aa3b099e 100644 --- a/drivers/gpu/drm/nouveau/nv50_crtc.c +++ b/drivers/gpu/drm/nouveau/nv50_crtc.c | |||
@@ -79,15 +79,15 @@ nv50_crtc_blank(struct nouveau_crtc *nv_crtc, bool blanked) | |||
79 | NV_ERROR(dev, "no space while blanking crtc\n"); | 79 | NV_ERROR(dev, "no space while blanking crtc\n"); |
80 | return ret; | 80 | return ret; |
81 | } | 81 | } |
82 | BEGIN_RING(evo, 0, NV50_EVO_CRTC(index, CLUT_MODE), 2); | 82 | BEGIN_NV04(evo, 0, NV50_EVO_CRTC(index, CLUT_MODE), 2); |
83 | OUT_RING(evo, NV50_EVO_CRTC_CLUT_MODE_BLANK); | 83 | OUT_RING(evo, NV50_EVO_CRTC_CLUT_MODE_BLANK); |
84 | OUT_RING(evo, 0); | 84 | OUT_RING(evo, 0); |
85 | if (dev_priv->chipset != 0x50) { | 85 | if (dev_priv->chipset != 0x50) { |
86 | BEGIN_RING(evo, 0, NV84_EVO_CRTC(index, CLUT_DMA), 1); | 86 | BEGIN_NV04(evo, 0, NV84_EVO_CRTC(index, CLUT_DMA), 1); |
87 | OUT_RING(evo, NV84_EVO_CRTC_CLUT_DMA_HANDLE_NONE); | 87 | OUT_RING(evo, NV84_EVO_CRTC_CLUT_DMA_HANDLE_NONE); |
88 | } | 88 | } |
89 | 89 | ||
90 | BEGIN_RING(evo, 0, NV50_EVO_CRTC(index, FB_DMA), 1); | 90 | BEGIN_NV04(evo, 0, NV50_EVO_CRTC(index, FB_DMA), 1); |
91 | OUT_RING(evo, NV50_EVO_CRTC_FB_DMA_HANDLE_NONE); | 91 | OUT_RING(evo, NV50_EVO_CRTC_FB_DMA_HANDLE_NONE); |
92 | } else { | 92 | } else { |
93 | if (nv_crtc->cursor.visible) | 93 | if (nv_crtc->cursor.visible) |
@@ -100,20 +100,20 @@ nv50_crtc_blank(struct nouveau_crtc *nv_crtc, bool blanked) | |||
100 | NV_ERROR(dev, "no space while unblanking crtc\n"); | 100 | NV_ERROR(dev, "no space while unblanking crtc\n"); |
101 | return ret; | 101 | return ret; |
102 | } | 102 | } |
103 | BEGIN_RING(evo, 0, NV50_EVO_CRTC(index, CLUT_MODE), 2); | 103 | BEGIN_NV04(evo, 0, NV50_EVO_CRTC(index, CLUT_MODE), 2); |
104 | OUT_RING(evo, nv_crtc->lut.depth == 8 ? | 104 | OUT_RING(evo, nv_crtc->lut.depth == 8 ? |
105 | NV50_EVO_CRTC_CLUT_MODE_OFF : | 105 | NV50_EVO_CRTC_CLUT_MODE_OFF : |
106 | NV50_EVO_CRTC_CLUT_MODE_ON); | 106 | NV50_EVO_CRTC_CLUT_MODE_ON); |
107 | OUT_RING(evo, nv_crtc->lut.nvbo->bo.offset >> 8); | 107 | OUT_RING(evo, nv_crtc->lut.nvbo->bo.offset >> 8); |
108 | if (dev_priv->chipset != 0x50) { | 108 | if (dev_priv->chipset != 0x50) { |
109 | BEGIN_RING(evo, 0, NV84_EVO_CRTC(index, CLUT_DMA), 1); | 109 | BEGIN_NV04(evo, 0, NV84_EVO_CRTC(index, CLUT_DMA), 1); |
110 | OUT_RING(evo, NvEvoVRAM); | 110 | OUT_RING(evo, NvEvoVRAM); |
111 | } | 111 | } |
112 | 112 | ||
113 | BEGIN_RING(evo, 0, NV50_EVO_CRTC(index, FB_OFFSET), 2); | 113 | BEGIN_NV04(evo, 0, NV50_EVO_CRTC(index, FB_OFFSET), 2); |
114 | OUT_RING(evo, nv_crtc->fb.offset >> 8); | 114 | OUT_RING(evo, nv_crtc->fb.offset >> 8); |
115 | OUT_RING(evo, 0); | 115 | OUT_RING(evo, 0); |
116 | BEGIN_RING(evo, 0, NV50_EVO_CRTC(index, FB_DMA), 1); | 116 | BEGIN_NV04(evo, 0, NV50_EVO_CRTC(index, FB_DMA), 1); |
117 | if (dev_priv->chipset != 0x50) | 117 | if (dev_priv->chipset != 0x50) |
118 | if (nv_crtc->fb.tile_flags == 0x7a00 || | 118 | if (nv_crtc->fb.tile_flags == 0x7a00 || |
119 | nv_crtc->fb.tile_flags == 0xfe00) | 119 | nv_crtc->fb.tile_flags == 0xfe00) |
@@ -158,10 +158,10 @@ nv50_crtc_set_dither(struct nouveau_crtc *nv_crtc, bool update) | |||
158 | 158 | ||
159 | ret = RING_SPACE(evo, 2 + (update ? 2 : 0)); | 159 | ret = RING_SPACE(evo, 2 + (update ? 2 : 0)); |
160 | if (ret == 0) { | 160 | if (ret == 0) { |
161 | BEGIN_RING(evo, 0, NV50_EVO_CRTC(head, DITHER_CTRL), 1); | 161 | BEGIN_NV04(evo, 0, NV50_EVO_CRTC(head, DITHER_CTRL), 1); |
162 | OUT_RING (evo, mode); | 162 | OUT_RING (evo, mode); |
163 | if (update) { | 163 | if (update) { |
164 | BEGIN_RING(evo, 0, NV50_EVO_UPDATE, 1); | 164 | BEGIN_NV04(evo, 0, NV50_EVO_UPDATE, 1); |
165 | OUT_RING (evo, 0); | 165 | OUT_RING (evo, 0); |
166 | FIRE_RING (evo); | 166 | FIRE_RING (evo); |
167 | } | 167 | } |
@@ -193,11 +193,11 @@ nv50_crtc_set_color_vibrance(struct nouveau_crtc *nv_crtc, bool update) | |||
193 | 193 | ||
194 | hue = ((nv_crtc->vibrant_hue * 2047) / 100) & 0xfff; | 194 | hue = ((nv_crtc->vibrant_hue * 2047) / 100) & 0xfff; |
195 | 195 | ||
196 | BEGIN_RING(evo, 0, NV50_EVO_CRTC(nv_crtc->index, COLOR_CTRL), 1); | 196 | BEGIN_NV04(evo, 0, NV50_EVO_CRTC(nv_crtc->index, COLOR_CTRL), 1); |
197 | OUT_RING (evo, (hue << 20) | (vib << 8)); | 197 | OUT_RING (evo, (hue << 20) | (vib << 8)); |
198 | 198 | ||
199 | if (update) { | 199 | if (update) { |
200 | BEGIN_RING(evo, 0, NV50_EVO_UPDATE, 1); | 200 | BEGIN_NV04(evo, 0, NV50_EVO_UPDATE, 1); |
201 | OUT_RING (evo, 0); | 201 | OUT_RING (evo, 0); |
202 | FIRE_RING (evo); | 202 | FIRE_RING (evo); |
203 | } | 203 | } |
@@ -311,9 +311,9 @@ nv50_crtc_set_scale(struct nouveau_crtc *nv_crtc, bool update) | |||
311 | if (ret) | 311 | if (ret) |
312 | return ret; | 312 | return ret; |
313 | 313 | ||
314 | BEGIN_RING(evo, 0, NV50_EVO_CRTC(nv_crtc->index, SCALE_CTRL), 1); | 314 | BEGIN_NV04(evo, 0, NV50_EVO_CRTC(nv_crtc->index, SCALE_CTRL), 1); |
315 | OUT_RING (evo, ctrl); | 315 | OUT_RING (evo, ctrl); |
316 | BEGIN_RING(evo, 0, NV50_EVO_CRTC(nv_crtc->index, SCALE_RES1), 2); | 316 | BEGIN_NV04(evo, 0, NV50_EVO_CRTC(nv_crtc->index, SCALE_RES1), 2); |
317 | OUT_RING (evo, oY << 16 | oX); | 317 | OUT_RING (evo, oY << 16 | oX); |
318 | OUT_RING (evo, oY << 16 | oX); | 318 | OUT_RING (evo, oY << 16 | oX); |
319 | 319 | ||
@@ -593,7 +593,7 @@ nv50_crtc_do_mode_set_base(struct drm_crtc *crtc, | |||
593 | if (ret) | 593 | if (ret) |
594 | return ret; | 594 | return ret; |
595 | 595 | ||
596 | BEGIN_RING(evo, 0, NV50_EVO_CRTC(nv_crtc->index, FB_DMA), 1); | 596 | BEGIN_NV04(evo, 0, NV50_EVO_CRTC(nv_crtc->index, FB_DMA), 1); |
597 | OUT_RING (evo, fb->r_dma); | 597 | OUT_RING (evo, fb->r_dma); |
598 | } | 598 | } |
599 | 599 | ||
@@ -601,18 +601,18 @@ nv50_crtc_do_mode_set_base(struct drm_crtc *crtc, | |||
601 | if (ret) | 601 | if (ret) |
602 | return ret; | 602 | return ret; |
603 | 603 | ||
604 | BEGIN_RING(evo, 0, NV50_EVO_CRTC(nv_crtc->index, FB_OFFSET), 5); | 604 | BEGIN_NV04(evo, 0, NV50_EVO_CRTC(nv_crtc->index, FB_OFFSET), 5); |
605 | OUT_RING (evo, nv_crtc->fb.offset >> 8); | 605 | OUT_RING (evo, nv_crtc->fb.offset >> 8); |
606 | OUT_RING (evo, 0); | 606 | OUT_RING (evo, 0); |
607 | OUT_RING (evo, (drm_fb->height << 16) | drm_fb->width); | 607 | OUT_RING (evo, (drm_fb->height << 16) | drm_fb->width); |
608 | OUT_RING (evo, fb->r_pitch); | 608 | OUT_RING (evo, fb->r_pitch); |
609 | OUT_RING (evo, fb->r_format); | 609 | OUT_RING (evo, fb->r_format); |
610 | 610 | ||
611 | BEGIN_RING(evo, 0, NV50_EVO_CRTC(nv_crtc->index, CLUT_MODE), 1); | 611 | BEGIN_NV04(evo, 0, NV50_EVO_CRTC(nv_crtc->index, CLUT_MODE), 1); |
612 | OUT_RING (evo, fb->base.depth == 8 ? | 612 | OUT_RING (evo, fb->base.depth == 8 ? |
613 | NV50_EVO_CRTC_CLUT_MODE_OFF : NV50_EVO_CRTC_CLUT_MODE_ON); | 613 | NV50_EVO_CRTC_CLUT_MODE_OFF : NV50_EVO_CRTC_CLUT_MODE_ON); |
614 | 614 | ||
615 | BEGIN_RING(evo, 0, NV50_EVO_CRTC(nv_crtc->index, FB_POS), 1); | 615 | BEGIN_NV04(evo, 0, NV50_EVO_CRTC(nv_crtc->index, FB_POS), 1); |
616 | OUT_RING (evo, (y << 16) | x); | 616 | OUT_RING (evo, (y << 16) | x); |
617 | 617 | ||
618 | if (nv_crtc->lut.depth != fb->base.depth) { | 618 | if (nv_crtc->lut.depth != fb->base.depth) { |
@@ -672,23 +672,23 @@ nv50_crtc_mode_set(struct drm_crtc *crtc, struct drm_display_mode *umode, | |||
672 | 672 | ||
673 | ret = RING_SPACE(evo, 18); | 673 | ret = RING_SPACE(evo, 18); |
674 | if (ret == 0) { | 674 | if (ret == 0) { |
675 | BEGIN_RING(evo, 0, 0x0804 + head, 2); | 675 | BEGIN_NV04(evo, 0, 0x0804 + head, 2); |
676 | OUT_RING (evo, 0x00800000 | mode->clock); | 676 | OUT_RING (evo, 0x00800000 | mode->clock); |
677 | OUT_RING (evo, (ilace == 2) ? 2 : 0); | 677 | OUT_RING (evo, (ilace == 2) ? 2 : 0); |
678 | BEGIN_RING(evo, 0, 0x0810 + head, 6); | 678 | BEGIN_NV04(evo, 0, 0x0810 + head, 6); |
679 | OUT_RING (evo, 0x00000000); /* border colour */ | 679 | OUT_RING (evo, 0x00000000); /* border colour */ |
680 | OUT_RING (evo, (vactive << 16) | hactive); | 680 | OUT_RING (evo, (vactive << 16) | hactive); |
681 | OUT_RING (evo, ( vsynce << 16) | hsynce); | 681 | OUT_RING (evo, ( vsynce << 16) | hsynce); |
682 | OUT_RING (evo, (vblanke << 16) | hblanke); | 682 | OUT_RING (evo, (vblanke << 16) | hblanke); |
683 | OUT_RING (evo, (vblanks << 16) | hblanks); | 683 | OUT_RING (evo, (vblanks << 16) | hblanks); |
684 | OUT_RING (evo, (vblan2e << 16) | vblan2s); | 684 | OUT_RING (evo, (vblan2e << 16) | vblan2s); |
685 | BEGIN_RING(evo, 0, 0x082c + head, 1); | 685 | BEGIN_NV04(evo, 0, 0x082c + head, 1); |
686 | OUT_RING (evo, 0x00000000); | 686 | OUT_RING (evo, 0x00000000); |
687 | BEGIN_RING(evo, 0, 0x0900 + head, 1); | 687 | BEGIN_NV04(evo, 0, 0x0900 + head, 1); |
688 | OUT_RING (evo, 0x00000311); /* makes sync channel work */ | 688 | OUT_RING (evo, 0x00000311); /* makes sync channel work */ |
689 | BEGIN_RING(evo, 0, 0x08c8 + head, 1); | 689 | BEGIN_NV04(evo, 0, 0x08c8 + head, 1); |
690 | OUT_RING (evo, (umode->vdisplay << 16) | umode->hdisplay); | 690 | OUT_RING (evo, (umode->vdisplay << 16) | umode->hdisplay); |
691 | BEGIN_RING(evo, 0, 0x08d4 + head, 1); | 691 | BEGIN_NV04(evo, 0, 0x08d4 + head, 1); |
692 | OUT_RING (evo, 0x00000000); /* screen position */ | 692 | OUT_RING (evo, 0x00000000); /* screen position */ |
693 | } | 693 | } |
694 | 694 | ||
diff --git a/drivers/gpu/drm/nouveau/nv50_cursor.c b/drivers/gpu/drm/nouveau/nv50_cursor.c index adfc9b607a50..af4ec7bf3670 100644 --- a/drivers/gpu/drm/nouveau/nv50_cursor.c +++ b/drivers/gpu/drm/nouveau/nv50_cursor.c | |||
@@ -53,15 +53,15 @@ nv50_cursor_show(struct nouveau_crtc *nv_crtc, bool update) | |||
53 | } | 53 | } |
54 | 54 | ||
55 | if (dev_priv->chipset != 0x50) { | 55 | if (dev_priv->chipset != 0x50) { |
56 | BEGIN_RING(evo, 0, NV84_EVO_CRTC(nv_crtc->index, CURSOR_DMA), 1); | 56 | BEGIN_NV04(evo, 0, NV84_EVO_CRTC(nv_crtc->index, CURSOR_DMA), 1); |
57 | OUT_RING(evo, NvEvoVRAM); | 57 | OUT_RING(evo, NvEvoVRAM); |
58 | } | 58 | } |
59 | BEGIN_RING(evo, 0, NV50_EVO_CRTC(nv_crtc->index, CURSOR_CTRL), 2); | 59 | BEGIN_NV04(evo, 0, NV50_EVO_CRTC(nv_crtc->index, CURSOR_CTRL), 2); |
60 | OUT_RING(evo, NV50_EVO_CRTC_CURSOR_CTRL_SHOW); | 60 | OUT_RING(evo, NV50_EVO_CRTC_CURSOR_CTRL_SHOW); |
61 | OUT_RING(evo, nv_crtc->cursor.offset >> 8); | 61 | OUT_RING(evo, nv_crtc->cursor.offset >> 8); |
62 | 62 | ||
63 | if (update) { | 63 | if (update) { |
64 | BEGIN_RING(evo, 0, NV50_EVO_UPDATE, 1); | 64 | BEGIN_NV04(evo, 0, NV50_EVO_UPDATE, 1); |
65 | OUT_RING(evo, 0); | 65 | OUT_RING(evo, 0); |
66 | FIRE_RING(evo); | 66 | FIRE_RING(evo); |
67 | nv_crtc->cursor.visible = true; | 67 | nv_crtc->cursor.visible = true; |
@@ -86,16 +86,16 @@ nv50_cursor_hide(struct nouveau_crtc *nv_crtc, bool update) | |||
86 | NV_ERROR(dev, "no space while hiding cursor\n"); | 86 | NV_ERROR(dev, "no space while hiding cursor\n"); |
87 | return; | 87 | return; |
88 | } | 88 | } |
89 | BEGIN_RING(evo, 0, NV50_EVO_CRTC(nv_crtc->index, CURSOR_CTRL), 2); | 89 | BEGIN_NV04(evo, 0, NV50_EVO_CRTC(nv_crtc->index, CURSOR_CTRL), 2); |
90 | OUT_RING(evo, NV50_EVO_CRTC_CURSOR_CTRL_HIDE); | 90 | OUT_RING(evo, NV50_EVO_CRTC_CURSOR_CTRL_HIDE); |
91 | OUT_RING(evo, 0); | 91 | OUT_RING(evo, 0); |
92 | if (dev_priv->chipset != 0x50) { | 92 | if (dev_priv->chipset != 0x50) { |
93 | BEGIN_RING(evo, 0, NV84_EVO_CRTC(nv_crtc->index, CURSOR_DMA), 1); | 93 | BEGIN_NV04(evo, 0, NV84_EVO_CRTC(nv_crtc->index, CURSOR_DMA), 1); |
94 | OUT_RING(evo, NV84_EVO_CRTC_CURSOR_DMA_HANDLE_NONE); | 94 | OUT_RING(evo, NV84_EVO_CRTC_CURSOR_DMA_HANDLE_NONE); |
95 | } | 95 | } |
96 | 96 | ||
97 | if (update) { | 97 | if (update) { |
98 | BEGIN_RING(evo, 0, NV50_EVO_UPDATE, 1); | 98 | BEGIN_NV04(evo, 0, NV50_EVO_UPDATE, 1); |
99 | OUT_RING(evo, 0); | 99 | OUT_RING(evo, 0); |
100 | FIRE_RING(evo); | 100 | FIRE_RING(evo); |
101 | nv_crtc->cursor.visible = false; | 101 | nv_crtc->cursor.visible = false; |
diff --git a/drivers/gpu/drm/nouveau/nv50_dac.c b/drivers/gpu/drm/nouveau/nv50_dac.c index 55c56330be6d..eb216a446b89 100644 --- a/drivers/gpu/drm/nouveau/nv50_dac.c +++ b/drivers/gpu/drm/nouveau/nv50_dac.c | |||
@@ -55,9 +55,9 @@ nv50_dac_disconnect(struct drm_encoder *encoder) | |||
55 | NV_ERROR(dev, "no space while disconnecting DAC\n"); | 55 | NV_ERROR(dev, "no space while disconnecting DAC\n"); |
56 | return; | 56 | return; |
57 | } | 57 | } |
58 | BEGIN_RING(evo, 0, NV50_EVO_DAC(nv_encoder->or, MODE_CTRL), 1); | 58 | BEGIN_NV04(evo, 0, NV50_EVO_DAC(nv_encoder->or, MODE_CTRL), 1); |
59 | OUT_RING (evo, 0); | 59 | OUT_RING (evo, 0); |
60 | BEGIN_RING(evo, 0, NV50_EVO_UPDATE, 1); | 60 | BEGIN_NV04(evo, 0, NV50_EVO_UPDATE, 1); |
61 | OUT_RING (evo, 0); | 61 | OUT_RING (evo, 0); |
62 | 62 | ||
63 | nv_encoder->crtc = NULL; | 63 | nv_encoder->crtc = NULL; |
@@ -240,7 +240,7 @@ nv50_dac_mode_set(struct drm_encoder *encoder, struct drm_display_mode *mode, | |||
240 | NV_ERROR(dev, "no space while connecting DAC\n"); | 240 | NV_ERROR(dev, "no space while connecting DAC\n"); |
241 | return; | 241 | return; |
242 | } | 242 | } |
243 | BEGIN_RING(evo, 0, NV50_EVO_DAC(nv_encoder->or, MODE_CTRL), 2); | 243 | BEGIN_NV04(evo, 0, NV50_EVO_DAC(nv_encoder->or, MODE_CTRL), 2); |
244 | OUT_RING(evo, mode_ctl); | 244 | OUT_RING(evo, mode_ctl); |
245 | OUT_RING(evo, mode_ctl2); | 245 | OUT_RING(evo, mode_ctl2); |
246 | 246 | ||
diff --git a/drivers/gpu/drm/nouveau/nv50_display.c b/drivers/gpu/drm/nouveau/nv50_display.c index 8b78b9cfa383..211e5e9565ce 100644 --- a/drivers/gpu/drm/nouveau/nv50_display.c +++ b/drivers/gpu/drm/nouveau/nv50_display.c | |||
@@ -140,11 +140,11 @@ nv50_display_sync(struct drm_device *dev) | |||
140 | 140 | ||
141 | ret = RING_SPACE(evo, 6); | 141 | ret = RING_SPACE(evo, 6); |
142 | if (ret == 0) { | 142 | if (ret == 0) { |
143 | BEGIN_RING(evo, 0, 0x0084, 1); | 143 | BEGIN_NV04(evo, 0, 0x0084, 1); |
144 | OUT_RING (evo, 0x80000000); | 144 | OUT_RING (evo, 0x80000000); |
145 | BEGIN_RING(evo, 0, 0x0080, 1); | 145 | BEGIN_NV04(evo, 0, 0x0080, 1); |
146 | OUT_RING (evo, 0); | 146 | OUT_RING (evo, 0); |
147 | BEGIN_RING(evo, 0, 0x0084, 1); | 147 | BEGIN_NV04(evo, 0, 0x0084, 1); |
148 | OUT_RING (evo, 0x00000000); | 148 | OUT_RING (evo, 0x00000000); |
149 | 149 | ||
150 | nv_wo32(disp->ntfy, 0x000, 0x00000000); | 150 | nv_wo32(disp->ntfy, 0x000, 0x00000000); |
@@ -267,7 +267,7 @@ nv50_display_init(struct drm_device *dev) | |||
267 | ret = RING_SPACE(evo, 3); | 267 | ret = RING_SPACE(evo, 3); |
268 | if (ret) | 268 | if (ret) |
269 | return ret; | 269 | return ret; |
270 | BEGIN_RING(evo, 0, NV50_EVO_UNK84, 2); | 270 | BEGIN_NV04(evo, 0, NV50_EVO_UNK84, 2); |
271 | OUT_RING (evo, NV50_EVO_UNK84_NOTIFY_DISABLED); | 271 | OUT_RING (evo, NV50_EVO_UNK84_NOTIFY_DISABLED); |
272 | OUT_RING (evo, NvEvoSync); | 272 | OUT_RING (evo, NvEvoSync); |
273 | 273 | ||
@@ -292,7 +292,7 @@ nv50_display_fini(struct drm_device *dev) | |||
292 | 292 | ||
293 | ret = RING_SPACE(evo, 2); | 293 | ret = RING_SPACE(evo, 2); |
294 | if (ret == 0) { | 294 | if (ret == 0) { |
295 | BEGIN_RING(evo, 0, NV50_EVO_UPDATE, 1); | 295 | BEGIN_NV04(evo, 0, NV50_EVO_UPDATE, 1); |
296 | OUT_RING(evo, 0); | 296 | OUT_RING(evo, 0); |
297 | } | 297 | } |
298 | FIRE_RING(evo); | 298 | FIRE_RING(evo); |
@@ -438,13 +438,13 @@ nv50_display_flip_stop(struct drm_crtc *crtc) | |||
438 | return; | 438 | return; |
439 | } | 439 | } |
440 | 440 | ||
441 | BEGIN_RING(evo, 0, 0x0084, 1); | 441 | BEGIN_NV04(evo, 0, 0x0084, 1); |
442 | OUT_RING (evo, 0x00000000); | 442 | OUT_RING (evo, 0x00000000); |
443 | BEGIN_RING(evo, 0, 0x0094, 1); | 443 | BEGIN_NV04(evo, 0, 0x0094, 1); |
444 | OUT_RING (evo, 0x00000000); | 444 | OUT_RING (evo, 0x00000000); |
445 | BEGIN_RING(evo, 0, 0x00c0, 1); | 445 | BEGIN_NV04(evo, 0, 0x00c0, 1); |
446 | OUT_RING (evo, 0x00000000); | 446 | OUT_RING (evo, 0x00000000); |
447 | BEGIN_RING(evo, 0, 0x0080, 1); | 447 | BEGIN_NV04(evo, 0, 0x0080, 1); |
448 | OUT_RING (evo, 0x00000000); | 448 | OUT_RING (evo, 0x00000000); |
449 | FIRE_RING (evo); | 449 | FIRE_RING (evo); |
450 | } | 450 | } |
@@ -474,15 +474,15 @@ nv50_display_flip_next(struct drm_crtc *crtc, struct drm_framebuffer *fb, | |||
474 | } | 474 | } |
475 | 475 | ||
476 | if (dev_priv->chipset < 0xc0) { | 476 | if (dev_priv->chipset < 0xc0) { |
477 | BEGIN_RING(chan, 0, 0x0060, 2); | 477 | BEGIN_NV04(chan, 0, 0x0060, 2); |
478 | OUT_RING (chan, NvEvoSema0 + nv_crtc->index); | 478 | OUT_RING (chan, NvEvoSema0 + nv_crtc->index); |
479 | OUT_RING (chan, dispc->sem.offset); | 479 | OUT_RING (chan, dispc->sem.offset); |
480 | BEGIN_RING(chan, 0, 0x006c, 1); | 480 | BEGIN_NV04(chan, 0, 0x006c, 1); |
481 | OUT_RING (chan, 0xf00d0000 | dispc->sem.value); | 481 | OUT_RING (chan, 0xf00d0000 | dispc->sem.value); |
482 | BEGIN_RING(chan, 0, 0x0064, 2); | 482 | BEGIN_NV04(chan, 0, 0x0064, 2); |
483 | OUT_RING (chan, dispc->sem.offset ^ 0x10); | 483 | OUT_RING (chan, dispc->sem.offset ^ 0x10); |
484 | OUT_RING (chan, 0x74b1e000); | 484 | OUT_RING (chan, 0x74b1e000); |
485 | BEGIN_RING(chan, 0, 0x0060, 1); | 485 | BEGIN_NV04(chan, 0, 0x0060, 1); |
486 | if (dev_priv->chipset < 0x84) | 486 | if (dev_priv->chipset < 0x84) |
487 | OUT_RING (chan, NvSema); | 487 | OUT_RING (chan, NvSema); |
488 | else | 488 | else |
@@ -490,12 +490,12 @@ nv50_display_flip_next(struct drm_crtc *crtc, struct drm_framebuffer *fb, | |||
490 | } else { | 490 | } else { |
491 | u64 offset = chan->dispc_vma[nv_crtc->index].offset; | 491 | u64 offset = chan->dispc_vma[nv_crtc->index].offset; |
492 | offset += dispc->sem.offset; | 492 | offset += dispc->sem.offset; |
493 | BEGIN_NVC0(chan, 2, 0, 0x0010, 4); | 493 | BEGIN_NVC0(chan, 0, 0x0010, 4); |
494 | OUT_RING (chan, upper_32_bits(offset)); | 494 | OUT_RING (chan, upper_32_bits(offset)); |
495 | OUT_RING (chan, lower_32_bits(offset)); | 495 | OUT_RING (chan, lower_32_bits(offset)); |
496 | OUT_RING (chan, 0xf00d0000 | dispc->sem.value); | 496 | OUT_RING (chan, 0xf00d0000 | dispc->sem.value); |
497 | OUT_RING (chan, 0x1002); | 497 | OUT_RING (chan, 0x1002); |
498 | BEGIN_NVC0(chan, 2, 0, 0x0010, 4); | 498 | BEGIN_NVC0(chan, 0, 0x0010, 4); |
499 | OUT_RING (chan, upper_32_bits(offset)); | 499 | OUT_RING (chan, upper_32_bits(offset)); |
500 | OUT_RING (chan, lower_32_bits(offset ^ 0x10)); | 500 | OUT_RING (chan, lower_32_bits(offset ^ 0x10)); |
501 | OUT_RING (chan, 0x74b1e000); | 501 | OUT_RING (chan, 0x74b1e000); |
@@ -508,40 +508,40 @@ nv50_display_flip_next(struct drm_crtc *crtc, struct drm_framebuffer *fb, | |||
508 | } | 508 | } |
509 | 509 | ||
510 | /* queue the flip on the crtc's "display sync" channel */ | 510 | /* queue the flip on the crtc's "display sync" channel */ |
511 | BEGIN_RING(evo, 0, 0x0100, 1); | 511 | BEGIN_NV04(evo, 0, 0x0100, 1); |
512 | OUT_RING (evo, 0xfffe0000); | 512 | OUT_RING (evo, 0xfffe0000); |
513 | if (chan) { | 513 | if (chan) { |
514 | BEGIN_RING(evo, 0, 0x0084, 1); | 514 | BEGIN_NV04(evo, 0, 0x0084, 1); |
515 | OUT_RING (evo, 0x00000100); | 515 | OUT_RING (evo, 0x00000100); |
516 | } else { | 516 | } else { |
517 | BEGIN_RING(evo, 0, 0x0084, 1); | 517 | BEGIN_NV04(evo, 0, 0x0084, 1); |
518 | OUT_RING (evo, 0x00000010); | 518 | OUT_RING (evo, 0x00000010); |
519 | /* allows gamma somehow, PDISP will bitch at you if | 519 | /* allows gamma somehow, PDISP will bitch at you if |
520 | * you don't wait for vblank before changing this.. | 520 | * you don't wait for vblank before changing this.. |
521 | */ | 521 | */ |
522 | BEGIN_RING(evo, 0, 0x00e0, 1); | 522 | BEGIN_NV04(evo, 0, 0x00e0, 1); |
523 | OUT_RING (evo, 0x40000000); | 523 | OUT_RING (evo, 0x40000000); |
524 | } | 524 | } |
525 | BEGIN_RING(evo, 0, 0x0088, 4); | 525 | BEGIN_NV04(evo, 0, 0x0088, 4); |
526 | OUT_RING (evo, dispc->sem.offset); | 526 | OUT_RING (evo, dispc->sem.offset); |
527 | OUT_RING (evo, 0xf00d0000 | dispc->sem.value); | 527 | OUT_RING (evo, 0xf00d0000 | dispc->sem.value); |
528 | OUT_RING (evo, 0x74b1e000); | 528 | OUT_RING (evo, 0x74b1e000); |
529 | OUT_RING (evo, NvEvoSync); | 529 | OUT_RING (evo, NvEvoSync); |
530 | BEGIN_RING(evo, 0, 0x00a0, 2); | 530 | BEGIN_NV04(evo, 0, 0x00a0, 2); |
531 | OUT_RING (evo, 0x00000000); | 531 | OUT_RING (evo, 0x00000000); |
532 | OUT_RING (evo, 0x00000000); | 532 | OUT_RING (evo, 0x00000000); |
533 | BEGIN_RING(evo, 0, 0x00c0, 1); | 533 | BEGIN_NV04(evo, 0, 0x00c0, 1); |
534 | OUT_RING (evo, nv_fb->r_dma); | 534 | OUT_RING (evo, nv_fb->r_dma); |
535 | BEGIN_RING(evo, 0, 0x0110, 2); | 535 | BEGIN_NV04(evo, 0, 0x0110, 2); |
536 | OUT_RING (evo, 0x00000000); | 536 | OUT_RING (evo, 0x00000000); |
537 | OUT_RING (evo, 0x00000000); | 537 | OUT_RING (evo, 0x00000000); |
538 | BEGIN_RING(evo, 0, 0x0800, 5); | 538 | BEGIN_NV04(evo, 0, 0x0800, 5); |
539 | OUT_RING (evo, nv_fb->nvbo->bo.offset >> 8); | 539 | OUT_RING (evo, nv_fb->nvbo->bo.offset >> 8); |
540 | OUT_RING (evo, 0); | 540 | OUT_RING (evo, 0); |
541 | OUT_RING (evo, (fb->height << 16) | fb->width); | 541 | OUT_RING (evo, (fb->height << 16) | fb->width); |
542 | OUT_RING (evo, nv_fb->r_pitch); | 542 | OUT_RING (evo, nv_fb->r_pitch); |
543 | OUT_RING (evo, nv_fb->r_format); | 543 | OUT_RING (evo, nv_fb->r_format); |
544 | BEGIN_RING(evo, 0, 0x0080, 1); | 544 | BEGIN_NV04(evo, 0, 0x0080, 1); |
545 | OUT_RING (evo, 0x00000000); | 545 | OUT_RING (evo, 0x00000000); |
546 | FIRE_RING (evo); | 546 | FIRE_RING (evo); |
547 | 547 | ||
diff --git a/drivers/gpu/drm/nouveau/nv50_fbcon.c b/drivers/gpu/drm/nouveau/nv50_fbcon.c index dc75a7206524..61747e0d1180 100644 --- a/drivers/gpu/drm/nouveau/nv50_fbcon.c +++ b/drivers/gpu/drm/nouveau/nv50_fbcon.c | |||
@@ -43,22 +43,22 @@ nv50_fbcon_fillrect(struct fb_info *info, const struct fb_fillrect *rect) | |||
43 | return ret; | 43 | return ret; |
44 | 44 | ||
45 | if (rect->rop != ROP_COPY) { | 45 | if (rect->rop != ROP_COPY) { |
46 | BEGIN_RING(chan, NvSub2D, 0x02ac, 1); | 46 | BEGIN_NV04(chan, NvSub2D, 0x02ac, 1); |
47 | OUT_RING(chan, 1); | 47 | OUT_RING(chan, 1); |
48 | } | 48 | } |
49 | BEGIN_RING(chan, NvSub2D, 0x0588, 1); | 49 | BEGIN_NV04(chan, NvSub2D, 0x0588, 1); |
50 | if (info->fix.visual == FB_VISUAL_TRUECOLOR || | 50 | if (info->fix.visual == FB_VISUAL_TRUECOLOR || |
51 | info->fix.visual == FB_VISUAL_DIRECTCOLOR) | 51 | info->fix.visual == FB_VISUAL_DIRECTCOLOR) |
52 | OUT_RING(chan, ((uint32_t *)info->pseudo_palette)[rect->color]); | 52 | OUT_RING(chan, ((uint32_t *)info->pseudo_palette)[rect->color]); |
53 | else | 53 | else |
54 | OUT_RING(chan, rect->color); | 54 | OUT_RING(chan, rect->color); |
55 | BEGIN_RING(chan, NvSub2D, 0x0600, 4); | 55 | BEGIN_NV04(chan, NvSub2D, 0x0600, 4); |
56 | OUT_RING(chan, rect->dx); | 56 | OUT_RING(chan, rect->dx); |
57 | OUT_RING(chan, rect->dy); | 57 | OUT_RING(chan, rect->dy); |
58 | OUT_RING(chan, rect->dx + rect->width); | 58 | OUT_RING(chan, rect->dx + rect->width); |
59 | OUT_RING(chan, rect->dy + rect->height); | 59 | OUT_RING(chan, rect->dy + rect->height); |
60 | if (rect->rop != ROP_COPY) { | 60 | if (rect->rop != ROP_COPY) { |
61 | BEGIN_RING(chan, NvSub2D, 0x02ac, 1); | 61 | BEGIN_NV04(chan, NvSub2D, 0x02ac, 1); |
62 | OUT_RING(chan, 3); | 62 | OUT_RING(chan, 3); |
63 | } | 63 | } |
64 | FIRE_RING(chan); | 64 | FIRE_RING(chan); |
@@ -78,14 +78,14 @@ nv50_fbcon_copyarea(struct fb_info *info, const struct fb_copyarea *region) | |||
78 | if (ret) | 78 | if (ret) |
79 | return ret; | 79 | return ret; |
80 | 80 | ||
81 | BEGIN_RING(chan, NvSub2D, 0x0110, 1); | 81 | BEGIN_NV04(chan, NvSub2D, 0x0110, 1); |
82 | OUT_RING(chan, 0); | 82 | OUT_RING(chan, 0); |
83 | BEGIN_RING(chan, NvSub2D, 0x08b0, 4); | 83 | BEGIN_NV04(chan, NvSub2D, 0x08b0, 4); |
84 | OUT_RING(chan, region->dx); | 84 | OUT_RING(chan, region->dx); |
85 | OUT_RING(chan, region->dy); | 85 | OUT_RING(chan, region->dy); |
86 | OUT_RING(chan, region->width); | 86 | OUT_RING(chan, region->width); |
87 | OUT_RING(chan, region->height); | 87 | OUT_RING(chan, region->height); |
88 | BEGIN_RING(chan, NvSub2D, 0x08d0, 4); | 88 | BEGIN_NV04(chan, NvSub2D, 0x08d0, 4); |
89 | OUT_RING(chan, 0); | 89 | OUT_RING(chan, 0); |
90 | OUT_RING(chan, region->sx); | 90 | OUT_RING(chan, region->sx); |
91 | OUT_RING(chan, 0); | 91 | OUT_RING(chan, 0); |
@@ -116,7 +116,7 @@ nv50_fbcon_imageblit(struct fb_info *info, const struct fb_image *image) | |||
116 | width = ALIGN(image->width, 32); | 116 | width = ALIGN(image->width, 32); |
117 | dwords = (width * image->height) >> 5; | 117 | dwords = (width * image->height) >> 5; |
118 | 118 | ||
119 | BEGIN_RING(chan, NvSub2D, 0x0814, 2); | 119 | BEGIN_NV04(chan, NvSub2D, 0x0814, 2); |
120 | if (info->fix.visual == FB_VISUAL_TRUECOLOR || | 120 | if (info->fix.visual == FB_VISUAL_TRUECOLOR || |
121 | info->fix.visual == FB_VISUAL_DIRECTCOLOR) { | 121 | info->fix.visual == FB_VISUAL_DIRECTCOLOR) { |
122 | OUT_RING(chan, palette[image->bg_color] | mask); | 122 | OUT_RING(chan, palette[image->bg_color] | mask); |
@@ -125,10 +125,10 @@ nv50_fbcon_imageblit(struct fb_info *info, const struct fb_image *image) | |||
125 | OUT_RING(chan, image->bg_color); | 125 | OUT_RING(chan, image->bg_color); |
126 | OUT_RING(chan, image->fg_color); | 126 | OUT_RING(chan, image->fg_color); |
127 | } | 127 | } |
128 | BEGIN_RING(chan, NvSub2D, 0x0838, 2); | 128 | BEGIN_NV04(chan, NvSub2D, 0x0838, 2); |
129 | OUT_RING(chan, image->width); | 129 | OUT_RING(chan, image->width); |
130 | OUT_RING(chan, image->height); | 130 | OUT_RING(chan, image->height); |
131 | BEGIN_RING(chan, NvSub2D, 0x0850, 4); | 131 | BEGIN_NV04(chan, NvSub2D, 0x0850, 4); |
132 | OUT_RING(chan, 0); | 132 | OUT_RING(chan, 0); |
133 | OUT_RING(chan, image->dx); | 133 | OUT_RING(chan, image->dx); |
134 | OUT_RING(chan, 0); | 134 | OUT_RING(chan, 0); |
@@ -143,7 +143,7 @@ nv50_fbcon_imageblit(struct fb_info *info, const struct fb_image *image) | |||
143 | 143 | ||
144 | dwords -= push; | 144 | dwords -= push; |
145 | 145 | ||
146 | BEGIN_RING(chan, NvSub2D, 0x40000860, push); | 146 | BEGIN_NI04(chan, NvSub2D, 0x0860, push); |
147 | OUT_RINGp(chan, data, push); | 147 | OUT_RINGp(chan, data, push); |
148 | data += push; | 148 | data += push; |
149 | } | 149 | } |
@@ -199,60 +199,60 @@ nv50_fbcon_accel_init(struct fb_info *info) | |||
199 | return ret; | 199 | return ret; |
200 | } | 200 | } |
201 | 201 | ||
202 | BEGIN_RING(chan, NvSub2D, 0x0000, 1); | 202 | BEGIN_NV04(chan, NvSub2D, 0x0000, 1); |
203 | OUT_RING(chan, Nv2D); | 203 | OUT_RING(chan, Nv2D); |
204 | BEGIN_RING(chan, NvSub2D, 0x0180, 4); | 204 | BEGIN_NV04(chan, NvSub2D, 0x0180, 4); |
205 | OUT_RING(chan, NvNotify0); | 205 | OUT_RING(chan, NvNotify0); |
206 | OUT_RING(chan, chan->vram_handle); | 206 | OUT_RING(chan, chan->vram_handle); |
207 | OUT_RING(chan, chan->vram_handle); | 207 | OUT_RING(chan, chan->vram_handle); |
208 | OUT_RING(chan, chan->vram_handle); | 208 | OUT_RING(chan, chan->vram_handle); |
209 | BEGIN_RING(chan, NvSub2D, 0x0290, 1); | 209 | BEGIN_NV04(chan, NvSub2D, 0x0290, 1); |
210 | OUT_RING(chan, 0); | 210 | OUT_RING(chan, 0); |
211 | BEGIN_RING(chan, NvSub2D, 0x0888, 1); | 211 | BEGIN_NV04(chan, NvSub2D, 0x0888, 1); |
212 | OUT_RING(chan, 1); | 212 | OUT_RING(chan, 1); |
213 | BEGIN_RING(chan, NvSub2D, 0x02ac, 1); | 213 | BEGIN_NV04(chan, NvSub2D, 0x02ac, 1); |
214 | OUT_RING(chan, 3); | 214 | OUT_RING(chan, 3); |
215 | BEGIN_RING(chan, NvSub2D, 0x02a0, 1); | 215 | BEGIN_NV04(chan, NvSub2D, 0x02a0, 1); |
216 | OUT_RING(chan, 0x55); | 216 | OUT_RING(chan, 0x55); |
217 | BEGIN_RING(chan, NvSub2D, 0x08c0, 4); | 217 | BEGIN_NV04(chan, NvSub2D, 0x08c0, 4); |
218 | OUT_RING(chan, 0); | 218 | OUT_RING(chan, 0); |
219 | OUT_RING(chan, 1); | 219 | OUT_RING(chan, 1); |
220 | OUT_RING(chan, 0); | 220 | OUT_RING(chan, 0); |
221 | OUT_RING(chan, 1); | 221 | OUT_RING(chan, 1); |
222 | BEGIN_RING(chan, NvSub2D, 0x0580, 2); | 222 | BEGIN_NV04(chan, NvSub2D, 0x0580, 2); |
223 | OUT_RING(chan, 4); | 223 | OUT_RING(chan, 4); |
224 | OUT_RING(chan, format); | 224 | OUT_RING(chan, format); |
225 | BEGIN_RING(chan, NvSub2D, 0x02e8, 2); | 225 | BEGIN_NV04(chan, NvSub2D, 0x02e8, 2); |
226 | OUT_RING(chan, 2); | 226 | OUT_RING(chan, 2); |
227 | OUT_RING(chan, 1); | 227 | OUT_RING(chan, 1); |
228 | BEGIN_RING(chan, NvSub2D, 0x0804, 1); | 228 | BEGIN_NV04(chan, NvSub2D, 0x0804, 1); |
229 | OUT_RING(chan, format); | 229 | OUT_RING(chan, format); |
230 | BEGIN_RING(chan, NvSub2D, 0x0800, 1); | 230 | BEGIN_NV04(chan, NvSub2D, 0x0800, 1); |
231 | OUT_RING(chan, 1); | 231 | OUT_RING(chan, 1); |
232 | BEGIN_RING(chan, NvSub2D, 0x0808, 3); | 232 | BEGIN_NV04(chan, NvSub2D, 0x0808, 3); |
233 | OUT_RING(chan, 0); | 233 | OUT_RING(chan, 0); |
234 | OUT_RING(chan, 0); | 234 | OUT_RING(chan, 0); |
235 | OUT_RING(chan, 1); | 235 | OUT_RING(chan, 1); |
236 | BEGIN_RING(chan, NvSub2D, 0x081c, 1); | 236 | BEGIN_NV04(chan, NvSub2D, 0x081c, 1); |
237 | OUT_RING(chan, 1); | 237 | OUT_RING(chan, 1); |
238 | BEGIN_RING(chan, NvSub2D, 0x0840, 4); | 238 | BEGIN_NV04(chan, NvSub2D, 0x0840, 4); |
239 | OUT_RING(chan, 0); | 239 | OUT_RING(chan, 0); |
240 | OUT_RING(chan, 1); | 240 | OUT_RING(chan, 1); |
241 | OUT_RING(chan, 0); | 241 | OUT_RING(chan, 0); |
242 | OUT_RING(chan, 1); | 242 | OUT_RING(chan, 1); |
243 | BEGIN_RING(chan, NvSub2D, 0x0200, 2); | 243 | BEGIN_NV04(chan, NvSub2D, 0x0200, 2); |
244 | OUT_RING(chan, format); | 244 | OUT_RING(chan, format); |
245 | OUT_RING(chan, 1); | 245 | OUT_RING(chan, 1); |
246 | BEGIN_RING(chan, NvSub2D, 0x0214, 5); | 246 | BEGIN_NV04(chan, NvSub2D, 0x0214, 5); |
247 | OUT_RING(chan, info->fix.line_length); | 247 | OUT_RING(chan, info->fix.line_length); |
248 | OUT_RING(chan, info->var.xres_virtual); | 248 | OUT_RING(chan, info->var.xres_virtual); |
249 | OUT_RING(chan, info->var.yres_virtual); | 249 | OUT_RING(chan, info->var.yres_virtual); |
250 | OUT_RING(chan, upper_32_bits(fb->vma.offset)); | 250 | OUT_RING(chan, upper_32_bits(fb->vma.offset)); |
251 | OUT_RING(chan, lower_32_bits(fb->vma.offset)); | 251 | OUT_RING(chan, lower_32_bits(fb->vma.offset)); |
252 | BEGIN_RING(chan, NvSub2D, 0x0230, 2); | 252 | BEGIN_NV04(chan, NvSub2D, 0x0230, 2); |
253 | OUT_RING(chan, format); | 253 | OUT_RING(chan, format); |
254 | OUT_RING(chan, 1); | 254 | OUT_RING(chan, 1); |
255 | BEGIN_RING(chan, NvSub2D, 0x0244, 5); | 255 | BEGIN_NV04(chan, NvSub2D, 0x0244, 5); |
256 | OUT_RING(chan, info->fix.line_length); | 256 | OUT_RING(chan, info->fix.line_length); |
257 | OUT_RING(chan, info->var.xres_virtual); | 257 | OUT_RING(chan, info->var.xres_virtual); |
258 | OUT_RING(chan, info->var.yres_virtual); | 258 | OUT_RING(chan, info->var.yres_virtual); |
diff --git a/drivers/gpu/drm/nouveau/nv50_sor.c b/drivers/gpu/drm/nouveau/nv50_sor.c index 274640212475..a9514eaa74c1 100644 --- a/drivers/gpu/drm/nouveau/nv50_sor.c +++ b/drivers/gpu/drm/nouveau/nv50_sor.c | |||
@@ -242,9 +242,9 @@ nv50_sor_disconnect(struct drm_encoder *encoder) | |||
242 | NV_ERROR(dev, "no space while disconnecting SOR\n"); | 242 | NV_ERROR(dev, "no space while disconnecting SOR\n"); |
243 | return; | 243 | return; |
244 | } | 244 | } |
245 | BEGIN_RING(evo, 0, NV50_EVO_SOR(nv_encoder->or, MODE_CTRL), 1); | 245 | BEGIN_NV04(evo, 0, NV50_EVO_SOR(nv_encoder->or, MODE_CTRL), 1); |
246 | OUT_RING (evo, 0); | 246 | OUT_RING (evo, 0); |
247 | BEGIN_RING(evo, 0, NV50_EVO_UPDATE, 1); | 247 | BEGIN_NV04(evo, 0, NV50_EVO_UPDATE, 1); |
248 | OUT_RING (evo, 0); | 248 | OUT_RING (evo, 0); |
249 | 249 | ||
250 | nouveau_hdmi_mode_set(encoder, NULL); | 250 | nouveau_hdmi_mode_set(encoder, NULL); |
@@ -430,7 +430,7 @@ nv50_sor_mode_set(struct drm_encoder *encoder, struct drm_display_mode *umode, | |||
430 | nv_encoder->crtc = NULL; | 430 | nv_encoder->crtc = NULL; |
431 | return; | 431 | return; |
432 | } | 432 | } |
433 | BEGIN_RING(evo, 0, NV50_EVO_SOR(nv_encoder->or, MODE_CTRL), 1); | 433 | BEGIN_NV04(evo, 0, NV50_EVO_SOR(nv_encoder->or, MODE_CTRL), 1); |
434 | OUT_RING(evo, mode_ctl); | 434 | OUT_RING(evo, mode_ctl); |
435 | } | 435 | } |
436 | 436 | ||
diff --git a/drivers/gpu/drm/nouveau/nvc0_fbcon.c b/drivers/gpu/drm/nouveau/nvc0_fbcon.c index a495e48197ca..797159e7b7a6 100644 --- a/drivers/gpu/drm/nouveau/nvc0_fbcon.c +++ b/drivers/gpu/drm/nouveau/nvc0_fbcon.c | |||
@@ -43,22 +43,22 @@ nvc0_fbcon_fillrect(struct fb_info *info, const struct fb_fillrect *rect) | |||
43 | return ret; | 43 | return ret; |
44 | 44 | ||
45 | if (rect->rop != ROP_COPY) { | 45 | if (rect->rop != ROP_COPY) { |
46 | BEGIN_NVC0(chan, 2, NvSub2D, 0x02ac, 1); | 46 | BEGIN_NVC0(chan, NvSub2D, 0x02ac, 1); |
47 | OUT_RING (chan, 1); | 47 | OUT_RING (chan, 1); |
48 | } | 48 | } |
49 | BEGIN_NVC0(chan, 2, NvSub2D, 0x0588, 1); | 49 | BEGIN_NVC0(chan, NvSub2D, 0x0588, 1); |
50 | if (info->fix.visual == FB_VISUAL_TRUECOLOR || | 50 | if (info->fix.visual == FB_VISUAL_TRUECOLOR || |
51 | info->fix.visual == FB_VISUAL_DIRECTCOLOR) | 51 | info->fix.visual == FB_VISUAL_DIRECTCOLOR) |
52 | OUT_RING (chan, ((uint32_t *)info->pseudo_palette)[rect->color]); | 52 | OUT_RING (chan, ((uint32_t *)info->pseudo_palette)[rect->color]); |
53 | else | 53 | else |
54 | OUT_RING (chan, rect->color); | 54 | OUT_RING (chan, rect->color); |
55 | BEGIN_NVC0(chan, 2, NvSub2D, 0x0600, 4); | 55 | BEGIN_NVC0(chan, NvSub2D, 0x0600, 4); |
56 | OUT_RING (chan, rect->dx); | 56 | OUT_RING (chan, rect->dx); |
57 | OUT_RING (chan, rect->dy); | 57 | OUT_RING (chan, rect->dy); |
58 | OUT_RING (chan, rect->dx + rect->width); | 58 | OUT_RING (chan, rect->dx + rect->width); |
59 | OUT_RING (chan, rect->dy + rect->height); | 59 | OUT_RING (chan, rect->dy + rect->height); |
60 | if (rect->rop != ROP_COPY) { | 60 | if (rect->rop != ROP_COPY) { |
61 | BEGIN_NVC0(chan, 2, NvSub2D, 0x02ac, 1); | 61 | BEGIN_NVC0(chan, NvSub2D, 0x02ac, 1); |
62 | OUT_RING (chan, 3); | 62 | OUT_RING (chan, 3); |
63 | } | 63 | } |
64 | FIRE_RING(chan); | 64 | FIRE_RING(chan); |
@@ -78,14 +78,14 @@ nvc0_fbcon_copyarea(struct fb_info *info, const struct fb_copyarea *region) | |||
78 | if (ret) | 78 | if (ret) |
79 | return ret; | 79 | return ret; |
80 | 80 | ||
81 | BEGIN_NVC0(chan, 2, NvSub2D, 0x0110, 1); | 81 | BEGIN_NVC0(chan, NvSub2D, 0x0110, 1); |
82 | OUT_RING (chan, 0); | 82 | OUT_RING (chan, 0); |
83 | BEGIN_NVC0(chan, 2, NvSub2D, 0x08b0, 4); | 83 | BEGIN_NVC0(chan, NvSub2D, 0x08b0, 4); |
84 | OUT_RING (chan, region->dx); | 84 | OUT_RING (chan, region->dx); |
85 | OUT_RING (chan, region->dy); | 85 | OUT_RING (chan, region->dy); |
86 | OUT_RING (chan, region->width); | 86 | OUT_RING (chan, region->width); |
87 | OUT_RING (chan, region->height); | 87 | OUT_RING (chan, region->height); |
88 | BEGIN_NVC0(chan, 2, NvSub2D, 0x08d0, 4); | 88 | BEGIN_NVC0(chan, NvSub2D, 0x08d0, 4); |
89 | OUT_RING (chan, 0); | 89 | OUT_RING (chan, 0); |
90 | OUT_RING (chan, region->sx); | 90 | OUT_RING (chan, region->sx); |
91 | OUT_RING (chan, 0); | 91 | OUT_RING (chan, 0); |
@@ -116,7 +116,7 @@ nvc0_fbcon_imageblit(struct fb_info *info, const struct fb_image *image) | |||
116 | width = ALIGN(image->width, 32); | 116 | width = ALIGN(image->width, 32); |
117 | dwords = (width * image->height) >> 5; | 117 | dwords = (width * image->height) >> 5; |
118 | 118 | ||
119 | BEGIN_NVC0(chan, 2, NvSub2D, 0x0814, 2); | 119 | BEGIN_NVC0(chan, NvSub2D, 0x0814, 2); |
120 | if (info->fix.visual == FB_VISUAL_TRUECOLOR || | 120 | if (info->fix.visual == FB_VISUAL_TRUECOLOR || |
121 | info->fix.visual == FB_VISUAL_DIRECTCOLOR) { | 121 | info->fix.visual == FB_VISUAL_DIRECTCOLOR) { |
122 | OUT_RING (chan, palette[image->bg_color] | mask); | 122 | OUT_RING (chan, palette[image->bg_color] | mask); |
@@ -125,10 +125,10 @@ nvc0_fbcon_imageblit(struct fb_info *info, const struct fb_image *image) | |||
125 | OUT_RING (chan, image->bg_color); | 125 | OUT_RING (chan, image->bg_color); |
126 | OUT_RING (chan, image->fg_color); | 126 | OUT_RING (chan, image->fg_color); |
127 | } | 127 | } |
128 | BEGIN_NVC0(chan, 2, NvSub2D, 0x0838, 2); | 128 | BEGIN_NVC0(chan, NvSub2D, 0x0838, 2); |
129 | OUT_RING (chan, image->width); | 129 | OUT_RING (chan, image->width); |
130 | OUT_RING (chan, image->height); | 130 | OUT_RING (chan, image->height); |
131 | BEGIN_NVC0(chan, 2, NvSub2D, 0x0850, 4); | 131 | BEGIN_NVC0(chan, NvSub2D, 0x0850, 4); |
132 | OUT_RING (chan, 0); | 132 | OUT_RING (chan, 0); |
133 | OUT_RING (chan, image->dx); | 133 | OUT_RING (chan, image->dx); |
134 | OUT_RING (chan, 0); | 134 | OUT_RING (chan, 0); |
@@ -143,7 +143,7 @@ nvc0_fbcon_imageblit(struct fb_info *info, const struct fb_image *image) | |||
143 | 143 | ||
144 | dwords -= push; | 144 | dwords -= push; |
145 | 145 | ||
146 | BEGIN_NVC0(chan, 6, NvSub2D, 0x0860, push); | 146 | BEGIN_NIC0(chan, NvSub2D, 0x0860, push); |
147 | OUT_RINGp(chan, data, push); | 147 | OUT_RINGp(chan, data, push); |
148 | data += push; | 148 | data += push; |
149 | } | 149 | } |
@@ -200,47 +200,47 @@ nvc0_fbcon_accel_init(struct fb_info *info) | |||
200 | return ret; | 200 | return ret; |
201 | } | 201 | } |
202 | 202 | ||
203 | BEGIN_NVC0(chan, 2, NvSub2D, 0x0000, 1); | 203 | BEGIN_NVC0(chan, NvSub2D, 0x0000, 1); |
204 | OUT_RING (chan, 0x0000902d); | 204 | OUT_RING (chan, 0x0000902d); |
205 | BEGIN_NVC0(chan, 2, NvSub2D, 0x0104, 2); | 205 | BEGIN_NVC0(chan, NvSub2D, 0x0104, 2); |
206 | OUT_RING (chan, upper_32_bits(chan->notifier_vma.offset)); | 206 | OUT_RING (chan, upper_32_bits(chan->notifier_vma.offset)); |
207 | OUT_RING (chan, lower_32_bits(chan->notifier_vma.offset)); | 207 | OUT_RING (chan, lower_32_bits(chan->notifier_vma.offset)); |
208 | BEGIN_NVC0(chan, 2, NvSub2D, 0x0290, 1); | 208 | BEGIN_NVC0(chan, NvSub2D, 0x0290, 1); |
209 | OUT_RING (chan, 0); | 209 | OUT_RING (chan, 0); |
210 | BEGIN_NVC0(chan, 2, NvSub2D, 0x0888, 1); | 210 | BEGIN_NVC0(chan, NvSub2D, 0x0888, 1); |
211 | OUT_RING (chan, 1); | 211 | OUT_RING (chan, 1); |
212 | BEGIN_NVC0(chan, 2, NvSub2D, 0x02ac, 1); | 212 | BEGIN_NVC0(chan, NvSub2D, 0x02ac, 1); |
213 | OUT_RING (chan, 3); | 213 | OUT_RING (chan, 3); |
214 | BEGIN_NVC0(chan, 2, NvSub2D, 0x02a0, 1); | 214 | BEGIN_NVC0(chan, NvSub2D, 0x02a0, 1); |
215 | OUT_RING (chan, 0x55); | 215 | OUT_RING (chan, 0x55); |
216 | BEGIN_NVC0(chan, 2, NvSub2D, 0x08c0, 4); | 216 | BEGIN_NVC0(chan, NvSub2D, 0x08c0, 4); |
217 | OUT_RING (chan, 0); | 217 | OUT_RING (chan, 0); |
218 | OUT_RING (chan, 1); | 218 | OUT_RING (chan, 1); |
219 | OUT_RING (chan, 0); | 219 | OUT_RING (chan, 0); |
220 | OUT_RING (chan, 1); | 220 | OUT_RING (chan, 1); |
221 | BEGIN_NVC0(chan, 2, NvSub2D, 0x0580, 2); | 221 | BEGIN_NVC0(chan, NvSub2D, 0x0580, 2); |
222 | OUT_RING (chan, 4); | 222 | OUT_RING (chan, 4); |
223 | OUT_RING (chan, format); | 223 | OUT_RING (chan, format); |
224 | BEGIN_NVC0(chan, 2, NvSub2D, 0x02e8, 2); | 224 | BEGIN_NVC0(chan, NvSub2D, 0x02e8, 2); |
225 | OUT_RING (chan, 2); | 225 | OUT_RING (chan, 2); |
226 | OUT_RING (chan, 1); | 226 | OUT_RING (chan, 1); |
227 | 227 | ||
228 | BEGIN_NVC0(chan, 2, NvSub2D, 0x0804, 1); | 228 | BEGIN_NVC0(chan, NvSub2D, 0x0804, 1); |
229 | OUT_RING (chan, format); | 229 | OUT_RING (chan, format); |
230 | BEGIN_NVC0(chan, 2, NvSub2D, 0x0800, 1); | 230 | BEGIN_NVC0(chan, NvSub2D, 0x0800, 1); |
231 | OUT_RING (chan, 1); | 231 | OUT_RING (chan, 1); |
232 | BEGIN_NVC0(chan, 2, NvSub2D, 0x0808, 3); | 232 | BEGIN_NVC0(chan, NvSub2D, 0x0808, 3); |
233 | OUT_RING (chan, 0); | 233 | OUT_RING (chan, 0); |
234 | OUT_RING (chan, 0); | 234 | OUT_RING (chan, 0); |
235 | OUT_RING (chan, 1); | 235 | OUT_RING (chan, 1); |
236 | BEGIN_NVC0(chan, 2, NvSub2D, 0x081c, 1); | 236 | BEGIN_NVC0(chan, NvSub2D, 0x081c, 1); |
237 | OUT_RING (chan, 1); | 237 | OUT_RING (chan, 1); |
238 | BEGIN_NVC0(chan, 2, NvSub2D, 0x0840, 4); | 238 | BEGIN_NVC0(chan, NvSub2D, 0x0840, 4); |
239 | OUT_RING (chan, 0); | 239 | OUT_RING (chan, 0); |
240 | OUT_RING (chan, 1); | 240 | OUT_RING (chan, 1); |
241 | OUT_RING (chan, 0); | 241 | OUT_RING (chan, 0); |
242 | OUT_RING (chan, 1); | 242 | OUT_RING (chan, 1); |
243 | BEGIN_NVC0(chan, 2, NvSub2D, 0x0200, 10); | 243 | BEGIN_NVC0(chan, NvSub2D, 0x0200, 10); |
244 | OUT_RING (chan, format); | 244 | OUT_RING (chan, format); |
245 | OUT_RING (chan, 1); | 245 | OUT_RING (chan, 1); |
246 | OUT_RING (chan, 0); | 246 | OUT_RING (chan, 0); |
@@ -251,7 +251,7 @@ nvc0_fbcon_accel_init(struct fb_info *info) | |||
251 | OUT_RING (chan, info->var.yres_virtual); | 251 | OUT_RING (chan, info->var.yres_virtual); |
252 | OUT_RING (chan, upper_32_bits(fb->vma.offset)); | 252 | OUT_RING (chan, upper_32_bits(fb->vma.offset)); |
253 | OUT_RING (chan, lower_32_bits(fb->vma.offset)); | 253 | OUT_RING (chan, lower_32_bits(fb->vma.offset)); |
254 | BEGIN_NVC0(chan, 2, NvSub2D, 0x0230, 10); | 254 | BEGIN_NVC0(chan, NvSub2D, 0x0230, 10); |
255 | OUT_RING (chan, format); | 255 | OUT_RING (chan, format); |
256 | OUT_RING (chan, 1); | 256 | OUT_RING (chan, 1); |
257 | OUT_RING (chan, 0); | 257 | OUT_RING (chan, 0); |
diff --git a/drivers/gpu/drm/nouveau/nvd0_display.c b/drivers/gpu/drm/nouveau/nvd0_display.c index 1f3a9b1240e8..ccc20dc1b6cb 100644 --- a/drivers/gpu/drm/nouveau/nvd0_display.c +++ b/drivers/gpu/drm/nouveau/nvd0_display.c | |||
@@ -303,12 +303,12 @@ nvd0_display_flip_next(struct drm_crtc *crtc, struct drm_framebuffer *fb, | |||
303 | offset = chan->dispc_vma[nv_crtc->index].offset; | 303 | offset = chan->dispc_vma[nv_crtc->index].offset; |
304 | offset += evo->sem.offset; | 304 | offset += evo->sem.offset; |
305 | 305 | ||
306 | BEGIN_NVC0(chan, 2, 0, NV84_SUBCHAN_SEMAPHORE_ADDRESS_HIGH, 4); | 306 | BEGIN_NVC0(chan, 0, NV84_SUBCHAN_SEMAPHORE_ADDRESS_HIGH, 4); |
307 | OUT_RING (chan, upper_32_bits(offset)); | 307 | OUT_RING (chan, upper_32_bits(offset)); |
308 | OUT_RING (chan, lower_32_bits(offset)); | 308 | OUT_RING (chan, lower_32_bits(offset)); |
309 | OUT_RING (chan, 0xf00d0000 | evo->sem.value); | 309 | OUT_RING (chan, 0xf00d0000 | evo->sem.value); |
310 | OUT_RING (chan, 0x1002); | 310 | OUT_RING (chan, 0x1002); |
311 | BEGIN_NVC0(chan, 2, 0, NV84_SUBCHAN_SEMAPHORE_ADDRESS_HIGH, 4); | 311 | BEGIN_NVC0(chan, 0, NV84_SUBCHAN_SEMAPHORE_ADDRESS_HIGH, 4); |
312 | OUT_RING (chan, upper_32_bits(offset)); | 312 | OUT_RING (chan, upper_32_bits(offset)); |
313 | OUT_RING (chan, lower_32_bits(offset ^ 0x10)); | 313 | OUT_RING (chan, lower_32_bits(offset ^ 0x10)); |
314 | OUT_RING (chan, 0x74b1e000); | 314 | OUT_RING (chan, 0x74b1e000); |