Message ID | 1372375867-1003-57-git-send-email-ben@bwidawsk.net (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c b/drivers/gpu/drm/i915/i915_gem_gtt.c index 646e8ef..7e9b2e2 100644 --- a/drivers/gpu/drm/i915/i915_gem_gtt.c +++ b/drivers/gpu/drm/i915/i915_gem_gtt.c @@ -175,8 +175,6 @@ static int gen6_ppgtt_enable(struct i915_hw_ppgtt *ppgtt) BUG_ON(ppgtt->pd_offset & 0x3f); - gen6_write_pdes(ppgtt); - if (INTEL_INFO(dev)->gen == 6) { uint32_t ecochk, gab_ctl, ecobits; @@ -435,9 +433,11 @@ int i915_gem_ppgtt_init(struct drm_device *dev, struct i915_hw_ppgtt *ppgtt) else BUG(); - if (!ret) + if (!ret) { + gen6_write_pdes(ppgtt); drm_mm_init(&ppgtt->base.mm, ppgtt->base.start, ppgtt->base.total); + } /* i915_init_vm(dev_priv, &ppgtt->base) */
We won't be calling enable() for all PPGTTs. We do need to write PDEs for all PPGTTs however. By moving the writing to init (which is called for all PPGTTs) we should accomplish this. TODO: Eventually, we should allocate the page tables on demand. Signed-off-by: Ben Widawsky <ben@bwidawsk.net> --- drivers/gpu/drm/i915/i915_gem_gtt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)