summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpc.fuc
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2013-07-01 04:32:42 (GMT)
committerBen Skeggs <bskeggs@redhat.com>2013-07-05 03:42:57 (GMT)
commit5ee86c4190f9e19a9e13906389069c73d7f75bfb (patch)
tree29d57627c2078d8f36a09ea792046a84690fcd45 /drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpc.fuc
parentc03ff9e8fa5fc0186158b99a89f613325ff352cf (diff)
downloadlinux-fsl-qoriq-5ee86c4190f9e19a9e13906389069c73d7f75bfb.tar.xz
drm/nve0-/gr: some new gpc registers can have multiple copies
GK110 exposes more than one, and needs to be dealt with in the ctxsw ucode just like the TPC sets are. Broadcast is at +0xe00. Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpc.fuc')
-rw-r--r--drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpc.fuc35
1 files changed, 34 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpc.fuc b/drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpc.fuc
index 4770e8c..3d7599d 100644
--- a/drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpc.fuc
+++ b/drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpc.fuc
@@ -38,6 +38,13 @@ tpc_mask: .b32 0
tpc_mmio_list_head: .b32 0
tpc_mmio_list_tail: .b32 0
+#ifdef NVGK
+unk_count: .b32 1
+unk_mask: .b32 1
+unk_mmio_list_head: .b32 #nve4_unk_mmio_head
+unk_mmio_list_tail: .b32 #nve4_unk_mmio_tail
+#endif
+
cmd_queue: queue_init
#endif
@@ -160,6 +167,17 @@ init:
add b32 $r2 $r14
add b32 $r3 $r14
+#ifdef NVGK
+ // calculate per-UNK mmio context size
+ ld b32 $r14 D[$r0 + #unk_mmio_list_head]
+ ld b32 $r15 D[$r0 + #unk_mmio_list_tail]
+ call #mmctx_size
+ ld b32 $r14 D[$r0 + #unk_count]
+ mulu $r14 $r15
+ add b32 $r2 $r14
+ add b32 $r3 $r14
+#endif
+
// round up base/size to 256 byte boundary (for strand SWBASE)
add b32 $r4 0x1300
shr b32 $r3 2
@@ -335,7 +353,6 @@ ctx_xfer:
// per-TPC mmio context
xbit $r10 $flags $p1 // direction
- or $r10 4 // last
mov $r11 0x4000
sethi $r11 0x500000 // base = NV_PGRAPH_GPC0_TPC0
ld b32 $r12 D[$r0 + #gpc_id]
@@ -347,6 +364,22 @@ ctx_xfer:
mov $r14 0x800 // stride = 0x800
call #mmctx_xfer
+#ifdef NVGK
+ // per-UNK mmio context
+ xbit $r10 $flags $p1 // direction
+ or $r10 4 // last
+ mov $r11 0x3000
+ sethi $r11 0x500000 // base = NV_PGRAPH_GPC0_UNK0
+ ld b32 $r12 D[$r0 + #gpc_id]
+ shl b32 $r12 15
+ add b32 $r11 $r12 // base = NV_PGRAPH_GPCn_UNK0
+ ld b32 $r12 D[$r0 + #unk_mmio_list_head]
+ ld b32 $r13 D[$r0 + #unk_mmio_list_tail]
+ ld b32 $r15 D[$r0 + #unk_mask]
+ mov $r14 0x200 // stride = 0x200
+ call #mmctx_xfer
+#endif
+
// wait for strands to finish
call #strand_wait