Commit 6778911b authored by Roy Spliet's avatar Roy Spliet Committed by Ben Skeggs

drm/nouveau/pwr/memx: Return debugging information

Time measured from disabling FB to re-enabling, PPWR_IN reveals status of
heads at the end of script. Helps debug various issues (like flicker).
Signed-off-by: default avatarRoy Spliet <rspliet@eclipso.eu>
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent d93e996a
......@@ -55,6 +55,11 @@ memx_func_tail:
.equ #memx_func_size #memx_func_next - #memx_func_head
.equ #memx_func_num (#memx_func_tail - #memx_func_head) / #memx_func_size
memx_ts_start:
.b32 0
memx_ts_end:
.b32 0
memx_data_head:
.skip 0x0800
memx_data_tail:
......@@ -78,6 +83,9 @@ memx_func_enter:
and $r6 NV_PPWR_OUTPUT_FB_PAUSE
bra z #memx_func_enter_wait
nv_iord($r6, NV_PPWR_TIMER_LOW)
st b32 D[$r0 + #memx_ts_start] $r6
ret
// description
......@@ -87,6 +95,9 @@ memx_func_enter:
// $r3 - opcode desciption
// $r0 - zero
memx_func_leave:
nv_iord($r6, NV_PPWR_TIMER_LOW)
st b32 D[$r0 + #memx_ts_end] $r6
mov $r6 NV_PPWR_OUTPUT_CLR_FB_PAUSE
nv_iowr(NV_PPWR_OUTPUT_CLR, $r6)
memx_func_leave_wait:
......@@ -210,6 +221,7 @@ memx_exec:
push $r13
mov b32 $r1 $r12
mov b32 $r2 $r11
memx_exec_next:
// fetch the packet header, and locate opcode info
ld b32 $r3 D[$r1]
......@@ -226,6 +238,10 @@ memx_exec:
bra l #memx_exec_next
// send completion reply
ld b32 $r11 D[$r0 + #memx_ts_start]
ld b32 $r12 D[$r0 + #memx_ts_end]
sub b32 $r12 $r11
nv_iord($r11, NV_PPWR_INPUT)
pop $r13
pop $r14
call(send)
......
......@@ -86,6 +86,8 @@ nouveau_memx_fini(struct nouveau_memx **pmemx, bool exec)
memx->base, finish);
}
nv_debug(memx->ppwr, "Exec took %uns, PPWR_IN %08x\n",
reply[0], reply[1]);
kfree(memx);
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment