diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-08-06 09:04:53 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2014-08-13 08:23:33 -0400 |
commit | ae6c4806927b8b0781ecc187aa16b10c820fc430 (patch) | |
tree | 259b85793ed699d01048377180a1a596c0f30d26 /drivers/gpu/drm/i915/i915_gpu_error.c | |
parent | fa76da3499f1789f0e37d3bbcdc320bdf47c89ca (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_gpu_error.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gpu_error.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/i915_gpu_error.c b/drivers/gpu/drm/i915/i915_gpu_error.c index eab41f9390f8..fc11ac6b0373 100644 --- a/drivers/gpu/drm/i915/i915_gpu_error.c +++ b/drivers/gpu/drm/i915/i915_gpu_error.c | |||
@@ -967,6 +967,12 @@ static void i915_gem_record_rings(struct drm_device *dev, | |||
967 | 967 | ||
968 | request = i915_gem_find_active_request(ring); | 968 | request = i915_gem_find_active_request(ring); |
969 | if (request) { | 969 | if (request) { |
970 | struct i915_address_space *vm; | ||
971 | |||
972 | vm = request->ctx && request->ctx->ppgtt ? | ||
973 | &request->ctx->ppgtt->base : | ||
974 | &dev_priv->gtt.base; | ||
975 | |||
970 | /* We need to copy these to an anonymous buffer | 976 | /* We need to copy these to an anonymous buffer |
971 | * as the simplest method to avoid being overwritten | 977 | * as the simplest method to avoid being overwritten |
972 | * by userspace. | 978 | * by userspace. |
@@ -974,9 +980,7 @@ static void i915_gem_record_rings(struct drm_device *dev, | |||
974 | error->ring[i].batchbuffer = | 980 | error->ring[i].batchbuffer = |
975 | i915_error_object_create(dev_priv, | 981 | i915_error_object_create(dev_priv, |
976 | request->batch_obj, | 982 | request->batch_obj, |
977 | request->ctx ? | 983 | vm); |
978 | request->ctx->vm : | ||
979 | &dev_priv->gtt.base); | ||
980 | 984 | ||
981 | if (HAS_BROKEN_CS_TLB(dev_priv->dev) && | 985 | if (HAS_BROKEN_CS_TLB(dev_priv->dev) && |
982 | ring->scratch.obj) | 986 | ring->scratch.obj) |