Message ID | 1394308697-3683-2-git-send-email-benjamin.widawsky@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Sat, Mar 08, 2014 at 11:58:17AM -0800, Ben Widawsky wrote: > Our code allows have a PPGTT that is smaller than the maximum size for > GEN6-GEN7. Though I don't think this actually ever occurs, the code may > as well work properly and more importantly look correct by using the > variable size instead of the HW max. Might mention that the num_pd_entries is set during allocation of the page directories, and so here we just compute the size for the drm_mm range manager (and the variables only exist for consistency with legacy GGTT interfaces). > Signed-off-by: Ben Widawsky <ben@bwidawsk.net> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> -Chris
On Tue, Mar 11, 2014 at 12:21:12PM +0000, Chris Wilson wrote: > On Sat, Mar 08, 2014 at 11:58:17AM -0800, Ben Widawsky wrote: > > Our code allows have a PPGTT that is smaller than the maximum size for > > GEN6-GEN7. Though I don't think this actually ever occurs, the code may > > as well work properly and more importantly look correct by using the > > variable size instead of the HW max. > > Might mention that the num_pd_entries is set during allocation of the > page directories, and so here we just compute the size for the drm_mm > range manager (and the variables only exist for consistency with legacy > GGTT interfaces). > > > Signed-off-by: Ben Widawsky <ben@bwidawsk.net> > Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Both merged, thanks for patches&review. -Daniel
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c index 0f39090..68f55c4 100644 --- a/drivers/gpu/drm/i915/i915_gem_gtt.c +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c @@ -1170,7 +1170,7 @@ static int gen6_ppgtt_init(struct i915_hw_ppgtt *ppgtt) ppgtt->base.insert_entries = gen6_ppgtt_insert_entries; ppgtt->base.cleanup = gen6_ppgtt_cleanup; ppgtt->base.start = 0; - ppgtt->base.total = GEN6_PPGTT_PD_ENTRIES * I915_PPGTT_PT_ENTRIES * PAGE_SIZE; + ppgtt->base.total = ppgtt->num_pd_entries * I915_PPGTT_PT_ENTRIES * PAGE_SIZE; ppgtt->debug_dump = gen6_dump_ppgtt; ppgtt->pd_offset =
Our code allows have a PPGTT that is smaller than the maximum size for GEN6-GEN7. Though I don't think this actually ever occurs, the code may as well work properly and more importantly look correct by using the variable size instead of the HW max. Signed-off-by: Ben Widawsky <ben@bwidawsk.net> --- drivers/gpu/drm/i915/i915_gem_gtt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)