On Thu, May 26, 2016 at 03:04:11PM +0300, Mika Kuoppala wrote: > > + if (ce->state) { > > + i915_gem_context_reference(kctx); > > + > > + /* We may need to do things with the shrinker which > > + * require us to immediately switch back to the default > > + * context. This can cause a problem as pinning the > > + * default context also requires GTT space which may not > > + * be available. To avoid this we always pin the default > > + * context. > > + */ > > + ret = i915_gem_obj_ggtt_pin(ce->state, > > + kctx->ggtt_alignment, > > + 0); > > + if (ret) > > + goto error; > > + > > If you fail here, you will unpin regardless. Is that a problem? To be here, ce->pin_count == 1 (because it is locked and we only init if ce->pin_count == 0 on entry). So on error we restore it back to 0. -Chris -- Chris Wilson, Intel Open Source Technology Centre _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx