aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_gem_execbuffer.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2014-08-06 09:04:53 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-08-13 08:23:33 -0400
commitae6c4806927b8b0781ecc187aa16b10c820fc430 (patch)
tree259b85793ed699d01048377180a1a596c0f30d26 /drivers/gpu/drm/i915/i915_gem_execbuffer.c
parentfa76da3499f1789f0e37d3bbcdc320bdf47c89ca (diff)
drm/i915: Only track real ppgtt for a context
There's a bit a confusion since we track the global gtt, the aliasing and real ppgtt in the ctx->vm pointer. And not all callers really bother to check for the different cases and just presume that it points to a real ppgtt. Now looking closely we don't actually need ->vm to always point at an address space - the only place that cares actually has fixup code already to decide whether to look at the per-proces or the global address space. So switch to just tracking the ppgtt directly and ditch all the extraneous code. v2: Fixup the ppgtt debugfs file to not oops on a NULL ctx->ppgtt. Also drop the early exit - without aliasing ppgtt we want to dump all the ppgtts of the contexts if we have full ppgtt. v3: Actually git add the compile fix. Reviewed-by: Michel Thierry <michel.thierry@intel.com> Cc: "Thierry, Michel" <michel.thierry@intel.com> Cc: Ville Syrjälä <ville.syrjala@linux.intel.com> OTC-Jira: VIZ-3724 [danvet: Resolve conflicts with execlist patches while applying.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem_execbuffer.c')
-rw-r--r--drivers/gpu/drm/i915/i915_gem_execbuffer.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem_execbuffer.c b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
index 7e04a4825ed0..1a0611bb576b 100644
--- a/drivers/gpu/drm/i915/i915_gem_execbuffer.c
+++ b/drivers/gpu/drm/i915/i915_gem_execbuffer.c
@@ -1315,8 +1315,9 @@ i915_gem_do_execbuffer(struct drm_device *dev, void *data,
1315 1315
1316 i915_gem_context_reference(ctx); 1316 i915_gem_context_reference(ctx);
1317 1317
1318 vm = ctx->vm; 1318 if (ctx->ppgtt)
1319 if (!USES_FULL_PPGTT(dev)) 1319 vm = &ctx->ppgtt->base;
1320 else
1320 vm = &dev_priv->gtt.base; 1321 vm = &dev_priv->gtt.base;
1321 1322
1322 eb = eb_create(args); 1323 eb = eb_create(args);