Message ID | 1396399386-3825-1-git-send-email-benjamin.widawsky@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Tue, Apr 01, 2014 at 05:43:06PM -0700, Ben Widawsky wrote: > So let's not do it every time we switch. > > v2: v1 skipped the switch for all gens. We still need it pre-gen8. > > Signed-off-by: Ben Widawsky <ben@bwidawsk.net> Please ignore this patch. I actually need to rework some stuff. 1 and 3 are still good though. > --- > drivers/gpu/drm/i915/i915_gem_context.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c > index 0e8fd1e..3b5b8ab 100644 > --- a/drivers/gpu/drm/i915/i915_gem_context.c > +++ b/drivers/gpu/drm/i915/i915_gem_context.c > @@ -710,7 +710,8 @@ static int do_switch(struct intel_ring_buffer *ring, > if (ret) > goto unpin_out; > > - if (USES_FULL_PPGTT(ring->dev)) { > + if (USES_FULL_PPGTT(ring->dev) && > + (!IS_GEN8(ring->dev) || !to->is_initialized)) { > ret = ppgtt->switch_mm(ppgtt, ring, false); > /* The hardware context switch is emitted, but we haven't > * actually changed the state - so it's probably safe to bail > -- > 1.9.1 > > _______________________________________________ > Intel-gfx mailing list > Intel-gfx@lists.freedesktop.org > http://lists.freedesktop.org/mailman/listinfo/intel-gfx
diff --git a/drivers/gpu/drm/i915/i915_gem_context.c b/drivers/gpu/drm/i915/i915_gem_context.c index 0e8fd1e..3b5b8ab 100644 --- a/drivers/gpu/drm/i915/i915_gem_context.c +++ b/drivers/gpu/drm/i915/i915_gem_context.c @@ -710,7 +710,8 @@ static int do_switch(struct intel_ring_buffer *ring, if (ret) goto unpin_out; - if (USES_FULL_PPGTT(ring->dev)) { + if (USES_FULL_PPGTT(ring->dev) && + (!IS_GEN8(ring->dev) || !to->is_initialized)) { ret = ppgtt->switch_mm(ppgtt, ring, false); /* The hardware context switch is emitted, but we haven't * actually changed the state - so it's probably safe to bail
So let's not do it every time we switch. v2: v1 skipped the switch for all gens. We still need it pre-gen8. Signed-off-by: Ben Widawsky <ben@bwidawsk.net> --- drivers/gpu/drm/i915/i915_gem_context.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)