Skip to content

Commit

Permalink
drm/nvf0-/gr: ctxsw scratch reg count got bumped to 16
Browse files Browse the repository at this point in the history
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
  • Loading branch information
Ben Skeggs committed Jul 5, 2013
1 parent f8adeb8 commit 60a4acd
Show file tree
Hide file tree
Showing 12 changed files with 3,303 additions and 3,034 deletions.
8 changes: 2 additions & 6 deletions drivers/gpu/drm/nouveau/core/engine/graph/fuc/com.fuc
Original file line number Diff line number Diff line change
Expand Up @@ -149,13 +149,9 @@ watchdog_clear:
//
wait_donez:
trace_set(T_WAIT);
mov $r8 0x818
shl b32 $r8 6
iowr I[$r8 + 0x000] $r10
nv_iowr(NV_PGRAPH_FECS_CC_SCRATCH_VAL(6), 0, $r10)
wait_donez_ne:
mov $r8 0x400
shl b32 $r8 6
iord $r8 I[$r8 + 0x000]
nv_iord($r8, NV_PGRAPH_FECS_SIGNAL, 0)
xbit $r8 $r8 $r10
bra ne #wait_donez_ne
trace_clr(T_WAIT)
Expand Down
12 changes: 4 additions & 8 deletions drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpc.fuc
Original file line number Diff line number Diff line change
Expand Up @@ -141,9 +141,7 @@ init:
#endif

// initialise context base, and size tracking
mov $r2 0x800
shl b32 $r2 6
iord $r2 I[$r2 + 0x100] // CC_SCRATCH[1], initial base
nv_iord($r2, NV_PGRAPH_GPCX_GPCCS_CC_SCRATCH_VAL(1), 0)
clear b32 $r3 // track GPC context size here

// set mmctx base addresses now so we don't have to do it later,
Expand Down Expand Up @@ -198,13 +196,10 @@ init:
add b32 $r3 $r15

// save context size, and tell HUB we're done
mov $r1 0x800
shl b32 $r1 6
iowr I[$r1 + 0x100] $r3 // CC_SCRATCH[1] = context size
add b32 $r1 0x800
nv_iowr(NV_PGRAPH_GPCX_GPCCS_CC_SCRATCH_VAL(1), 0, $r3)
clear b32 $r2
bset $r2 31
iowr I[$r1 + 0x000] $r2 // CC_SCRATCH[0] |= 0x80000000
nv_iowr(NV_PGRAPH_GPCX_GPCCS_CC_SCRATCH_SET(0), 0, $r2)

// Main program loop, very simple, sleeps until woken up by the interrupt
// handler, pulls a command from the queue and executes its handler
Expand Down Expand Up @@ -249,6 +244,7 @@ ih:
push $r13
push $r14
push $r15
clear b32 $r0

// incoming fifo command?
iord $r10 I[$r0 + 0x200] // INTR
Expand Down
Loading

0 comments on commit 60a4acd

Please sign in to comment.