Occasionally "GPU lockup" after resuming from suspend.
Quoted 9 lines · On Don, 2011-12-08 at 19:35 +0800, [email protected] wrote:
Quoted 3 lines
I found
CP_RB_WPTRhas changed when "ring test failed", so I think CP is active, but what it get from ring buffer is wrong.
CP_RB_WPTRis normally only changed by the CPU after adding commands to the ring buffer, so I'm afraid that may not be a valid conclusion.
I'm sorry, I've made a spelling mistake. In fact, CP_RB_RPTR and CP_RB_WPTR both changed, so I think CP is active.
Quoted 6 lines
Quoted 2 lines
Then, I want to know whether there is a way to check the content that GPU get from ring buffer.
See the
r100_debugfs_cp_csq_fifo()function, which generates the output for/sys/kernel/debug/dri/0/r100_cp_csq_fifo.
Hmmm, I don't think this function can be used by r600 (or write a similar one for R600), because I haven't found CSQ registers in r600 code.
Quoted 14 lines
Quoted 7 lines
BTW, when I use "echo shutdown >
/sys/power/disk; echo disk >/sys/power/state" to do a hibernation, there will be occasionally "GPU reset" just like suspend. However, if I use "echo reboot >/sys/power/disk; echo disk >/sys/power/state" to do a hibernation and wakeup automatically, there is no "GPU reset" after hundreds of tests. What does this imply? Power loss cause something break?Yeah, it sounds like the resume code doesn't properly re-initialize something that's preserved on a warm boot but lost on a cold boot.
--
Earthling Michel D
Quoted 11 lines · On Fre, 2011-12-16 at 16:42 +0800, [email protected] wrote:
Quoted 9 lines · On Don, 2011-12-08 at 19:35 +0800, [email protected] wrote:
Quoted 3 lines
I found
CP_RB_WPTRhas changed when "ring test failed", so I think CP is active, but what it get from ring buffer is wrong.
CP_RB_WPTRis normally only changed by the CPU after adding commands to the ring buffer, so I'm afraid that may not be a valid conclusion.I'm sorry, I've made a spelling mistake. In fact,
CP_RB_RPTRandCP_RB_WPTRboth changed, so I think CP is active.
I see. However, I think this actually makes it unlikely that the problem is the CP reading wrong values from the ring, as otherwise the CP itself would likely get stuck sooner or later.
Quoted 8 lines
Quoted 6 lines
Quoted 2 lines
Then, I want to know whether there is a way to check the content that GPU get from ring buffer.
See the
r100_debugfs_cp_csq_fifo()function, which generates the output for/sys/kernel/debug/dri/0/r100_cp_csq_fifo.Hmmm, I don't think this function can be used by r600 (or write a similar one for R600), because I haven't found CSQ registers in r600 code.
Hmm yeah, looks like the registers for this have changed.
Signature · 6 lines
Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Debian, X and DRI developer _______________________________________________ dri-devel mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/dri-devel
2011/12/16 <[email protected]>:
Quoted 12 lines
Quoted 9 lines · On Don, 2011-12-08 at 19:35 +0800, [email protected] wrote:
Quoted 3 lines
I found
CP_RB_WPTRhas changed when "ring test failed", so I think CP is active, but what it get from ring buffer is wrong.
CP_RB_WPTRis normally only changed by the CPU after adding commands to the ring buffer, so I'm afraid that may not be a valid conclusion.I'm sorry, I've made a spelling mistake. In fact,
CP_RB_RPTRandCP_RB_WPTRboth changed, so I think CP is active.
Quoted 24 lines
Quoted 6 lines
Quoted 2 lines
Then, I want to know whether there is a way to check the content that GPU get from ring buffer.
See the
r100_debugfs_cp_csq_fifo()function, which generates the output for/sys/kernel/debug/dri/0/r100_cp_csq_fifo.Hmmm, I don't think this function can be used by r600 (or write a similar one for R600), because I haven't found CSQ registers in r600 code.
Quoted 14 lines
Quoted 7 lines
BTW, when I use "echo shutdown >
/sys/power/disk; echo disk >/sys/power/state" to do a hibernation, there will be occasionally "GPU reset" just like suspend. However, if I use "echo reboot >/sys/power/disk; echo disk >/sys/power/state" to do a hibernation and wakeup automatically, there is no "GPU reset" after hundreds of tests. What does this imply? Power loss cause something break?Yeah, it sounds like the resume code doesn't properly re-initialize something that's preserved on a warm boot but lost on a cold boot.
--
Earthling Michel D
It might be pci issue, you should check pci configuration before and after suspend thought kernel should properly restore things. The cp might still be reading random data that doesn't lockup the cp (i saw it happen more than once).
Cheers,
Jerome