drm/i915: Use drm_mm for PPGTT PDEs
Subsystems (2)
PATCH 1/1 drm/i915: Use drm_mm for PPGTT PDEs
I think this is a nice generalization on it's own, but it's primarily prep work for my PPGTT support. Does this bother anyone?
The only down side I can see is we waste 2k of cpu unmappable space (unless we have something else that is <= 2k and doesn't need to be page aligned).
It's RFC because I have only hacked this up and haven't thoroughly tested a bunch of error and suspend/resume paths.
--- drivers/gpu/drm/i915/i915_drv.h | 1 + drivers/gpu/drm/i915/i915_gem_gtt.c | 56 ++++++++++++++++++++++++------------- 2 files changed, 38 insertions(+), 19 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +1 -0
@@ -440,6 +440,7 @@ struct i915_hw_ppgtt {uint32_t pd_offset;dma_addr_t *pt_dma_addr;dma_addr_t scratch_page_dma_addr; +struct drm_mm_node node;/* pte functions, mirroring the interface of the global gtt. */ void (*clear_range)(struct i915_hw_ppgtt *ppgtt,
drivers/gpu/drm/i915/i915_gem_gtt.c +37 -19
122 lines not on this page · raw message
Signature · 1 line
1.8.2.1
Re: (should have been RFC) [PATCH] drm/i915: Use drm_mm for PPGTT PDEs
Oops forget the RFC tag in the subject.
[snip]
Quoted 9 lines · Ben Widawsky
I think this is a nice generalization on it's own, but it's primarily prep work for my PPGTT support. Does this bother anyone?
The only down side I can see is we waste 2k of cpu unmappable space (unless we have something else that is <= 2k and doesn't need to be page aligned).
It's RFC because I have only hacked this up and haven't thoroughly tested a bunch of error and suspend/resume paths.
Ugh. Fragmentation, you need a top down allocator. -Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre
Quoted 8 lines · Chris Wilson
Quoted 7 lines · Ben Widawsky
I think this is a nice generalization on it's own, but it's primarily prep work for my PPGTT support. Does this bother anyone?
The only down side I can see is we waste 2k of cpu unmappable space (unless we have something else that is <= 2k and doesn't need to be page aligned).
Quoted 5 lines
Quoted 2 lines
It's RFC because I have only hacked this up and haven't thoroughly tested a bunch of error and suspend/resume paths.
Ugh. Fragmentation, you need a top down allocator. -Chris
For the current case we can easily address this by setting the range to be the old range and keep the existing allocator but limit it to the same portion it used before. This isn't very interesting though and the previous code is probably better suited for this case anyway since it's inherently much more robust against accidentally overwriting the PDEs.
Would you agree that on GEN7 + multiple PPGTTs; the fragmentation is a "don't care"?
Signature · 1 line
Ben Widawsky, Intel Open Source Technology Center
Quoted 12 lines · Ben Widawsky
Quoted 11 lines · Chris Wilson
Quoted 9 lines · Ben Widawsky
I think this is a nice generalization on it's own, but it's primarily prep work for my PPGTT support. Does this bother anyone?
The only down side I can see is we waste 2k of cpu unmappable space (unless we have something else that is <= 2k and doesn't need to be page aligned).
It's RFC because I have only hacked this up and haven't thoroughly tested a bunch of error and suspend/resume paths.
Quoted 8 lines
Quoted 2 lines
Ugh. Fragmentation, you need a top down allocator. -Chris
For the current case we can easily address this by setting the range to be the old range and keep the existing allocator but limit it to the same portion it used before. This isn't very interesting though and the previous code is probably better suited for this case anyway since it's inherently much more robust against accidentally overwriting the PDEs.
As discussed, my concern here is that we are limiting the maximum object size by placing very long lived and unmovable objects right in the middle of the GTT.
Quoted 2 lines
Would you agree that on GEN7 + multiple PPGTTs; the fragmentation is a "don't care"?
Yes. Given true ppggt, then we mostly only care about fragmentation in the mappable region.
-Chris
Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre