Regression since 53984635a659e360f206a81ada4ae813152d72f1 (drm/i915: use the complete gtt)
Subsystems (2)
commit 53984635a659e360f206a81ada4ae813152d72f1
Author: Daniel Vetter <[email protected]> Date: Wed Sep 22 23:44:24 2010 +0200
drm/i915: use the complete gtt
At least the part that's currently enabled by the BIOS.
Since the above commit, my GL app will crash after a period of sustained graphics activity. It appears to use quite a lot of small BOs for uploading changed VBO data with glBufferSubData, and I don't think these are being purged until the GTT is full.
For some reason, with gtt size != mappable size, the GPU will hang after a while. I had thought that we were missing a guard page from mappable_size, but subtracting a PAGE_SIZE did not help. Only resetting gtt_size to mappable_size (still subtracting a guard page) helped.
Adding some instrumentation shows:
Prealloc size 33550336, gtt size 2147479552, mappable size 268435456
This is an GM45 on a HP 6730b laptop.
Any hints as to where to look now?
Are things being put into unmappable GTT space when they need to be mappable? Is purging all my purgable BOs taking too long and causing a HANG to be declared? (NB: Hang still occurs if I increase hangcheck timer to over a second).
Best regards,
Signature · 11 lines
Peter Clifton Electrical Engineering Division, Engineering Department, University of Cambridge, 9, JJ Thomson Avenue, Cambridge CB3 0FA Tel: +44 (0)7729 980173 - (No signal in the lab!) Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me)
Quoted 8 lines · Peter Clifton
commit
53984635a659e360f206a81ada4ae813152d72f1Author: Daniel Vetter <[email protected]> Date: Wed Sep 22 23:44:24 2010 +0200drm/i915: use the complete gtt
At least the part that's currently enabled by the BIOS.
Quoted 8 lines
Signed-off-by Daniel Vetter <[email protected]>Signed-off-by Chris Wilson <[email protected]>Since the above commit, my GL app will crash after a period of sustained graphics activity. It appears to use quite a lot of small BOs for uploading changed VBO data with glBufferSubData, and I don't think these are being purged until the GTT is full.
I can also work around the crash by ensuring nothing gets into unmapable areas:
drivers/gpu/drm/i915/i915_gem.c +1 -0
@@ -3538,6 +3538,7 @@ i915_gem_execbuffer_pin(struct drm_device *dev,/* g33/pnv can't fence buffers in the unmappable part */ bool need_mappable = entry->relocation_count ? true : need_fence; + need_mappable = true;/* Check fence reg constraints and rebind if necessary */ if (need_mappable && !obj->map_and_fenceable) {
Signature · 11 lines
Peter Clifton Electrical Engineering Division, Engineering Department, University of Cambridge, 9, JJ Thomson Avenue, Cambridge CB3 0FA Tel: +44 (0)7729 980173 - (No signal in the lab!) Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me)
Quoted 5 lines · Peter Clifton
Since the above commit, my GL app will crash after a period of sustained graphics activity. It appears to use quite a lot of small BOs for uploading changed VBO data with glBufferSubData, and I don't think these are being purged until the GTT is full.
Quoted 8 lines
For some reason, with gtt size != mappable size, the GPU will hang after a while. I had thought that we were missing a guard page from
mappable_size, but subtracting aPAGE_SIZEdid not help. Only resettinggtt_sizetomappable_size(still subtracting a guard page) helped.Adding some instrumentation shows:
Prealloc size 33550336, gtt size 2147479552, mappable size 268435456
/sys/kernel/debug/dri/0/i915_gem_objects
Quoted 6 lines
This is an GM45 on a HP 6730b laptop.
Any hints as to where to look now?
Are things being put into unmappable GTT space when they need to be mappable?
This is the likely suspect. Check /sys/kernel/debug/dri/0/i915_error_state.
Do you have a test case that I can run? I've been beating upon this using i945, pnv, q35 and g45 for quite some time and found it to be stable (for my uses at least).
-Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
Quoted 3 lines · Chris Wilson
Do you have a test case that I can run? I've been beating upon this using i945, pnv, q35 and g45 for quite some time and found it to be stable (for my uses at least).
Nothing small, but if you're prepared to do build something more complex:
git://repo.or.cz/geda-pcb/pcjc2.git
Build from the "local_customisation_no_pours" branch.
(With stgit I'm lazy about making "proper" feature branches ;)). Note that I rebase this branch a lot, as it is from a stgit series.
I'll send you the PCB layout I've been testing it with privately.
Steps to reproduce are:
1. Load the board.
2. Drag the white / black (depends on your theme) circular control on the left hand bar. This is a track-ball.
3. Drag like crazy, perhaps stop for a little bit. Drag again.
Eventually it hangs when the full GTT is in use.
Signature · 11 lines
Peter Clifton Electrical Engineering Division, Engineering Department, University of Cambridge, 9, JJ Thomson Avenue, Cambridge CB3 0FA Tel: +44 (0)7729 980173 - (No signal in the lab!) Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me)
Quoted 2 lines · Peter Clifton
Nothing small, but if you're prepared to do build something more complex:
Thanks. I think I know why it is crashing. Excuse me whilst I go and hide under a rock.
-Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre