[Intel-gfx] [PATCH 56/66] drm/i915: Write PDEs at init instead of enable
Ben Widawsky
ben at bwidawsk.net
Fri Jun 28 01:30:57 CEST 2013
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 at bwidawsk.net>
---
drivers/gpu/drm/i915/i915_gem_gtt.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
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) */
--
1.8.3.1
More information about the Intel-gfx
mailing list