drm/i915/gtt: Mark newly created ppgtt dirty
Subsystems (2)
PATCH 1/1 drm/i915/gtt: Mark newly created ppgtt dirty
We mark ppgtt dirty when vm area grows. As one needs to allocate atleast one batchbuffer object before running anything in vm space, this was considered adequate. However in init, we run batch which doesn't need to allocate anything. This is the render state initialization batch, part of context init. Newly created ppgtt is not marked dirty as no allocations for it are done. This results bb emission skip the pdps writing to hw, and we start the batch with uninitialized (zero) pdp registers causing gpu hangs early in the init.
Always mark newly created ppgtts dirty to ensure that pdps are pushed before first bb.
--- drivers/gpu/drm/i915/i915_gem_gtt.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/gpu/drm/i915/i915_gem_gtt.c +2 -0
@@ -2134,6 +2134,8 @@ int i915_ppgtt_init(struct drm_device *dev, struct i915_hw_ppgtt *ppgtt)i915_init_vm (dev_priv, &ppgtt->base); } +mark_tlbs_dirty (ppgtt); +return ret; }
Signature · 6 lines
2.1.4 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 9 lines · Mika Kuoppala
We mark ppgtt dirty when vm area grows. As one needs to allocate atleast one batchbuffer object before running anything in vm space, this was considered adequate. However in init, we run batch which doesn't need to allocate anything. This is the render state initialization batch, part of context init. Newly created ppgtt is not marked dirty as no allocations for it are done. This results bb emission skip the pdps writing to hw, and we start the batch with uninitialized (zero) pdp registers causing gpu hangs early in the init.
That's true, although I was under the impression that the render state batch was executed in the ggtt.
Quoted 18 lines
Always mark newly created ppgtts dirty to ensure that pdps are pushed before first bb.
Cc Michel Thierry <[email protected]>Cc Arun Siluvery <[email protected]>Cc Chris Wilson <[email protected]>Cc Imre Deak <[email protected]>Signed-off-by Mika Kuoppala <[email protected]>--- drivers/gpu/drm/i915/i915_gem_gtt.c | 2 ++ 1 file changed, 2 insertions(+)drivers/gpu/drm/i915/i915_gem_gtt.c +0
-0
drivers/gpu/drm/i915/i915_gem_gtt.c int i915_ppgtt_init(struct drm_device *dev, struct i915_hw_ppgtt *ppgtt) · line 2138
Quoted 5 lines
drivers/gpu/drm/i915/i915_gem_gtt.c +2
-0@@ -2134,6 +2134,8 @@ int i915_ppgtt_init(struct drm_device *dev, struct i915_hw_ppgtt *ppgtt)i915_init_vm (dev_priv, &ppgtt->base); } +mark_tlbs_dirty (ppgtt); +
Does this also apply for gen7? (or should only be in gen8_ppgtt_init).
drivers/gpu/drm/i915/i915_gem_gtt.c int i915_ppgtt_init(struct drm_device *dev, struct i915_hw_ppgtt *ppgtt) · line 2141
Quoted 4 lines
drivers/gpu/drm/i915/i915_gem_gtt.c +0
-0return ret; }
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx