Rev 6084 | Rev 6937 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 6084 | Rev 6320 | ||
---|---|---|---|
Line 338... | Line 338... | ||
338 | i915_gem_object_ggtt_unpin(lctx->legacy_hw_ctx.rcs_state); |
338 | i915_gem_object_ggtt_unpin(lctx->legacy_hw_ctx.rcs_state); |
Line 339... | Line 339... | ||
339 | 339 | ||
340 | i915_gem_context_unreference(lctx); |
340 | i915_gem_context_unreference(lctx); |
341 | ring->last_context = NULL; |
341 | ring->last_context = NULL; |
- | 342 | } |
|
- | 343 | ||
- | 344 | /* Force the GPU state to be reinitialised on enabling */ |
|
- | 345 | if (ring->default_context) |
|
342 | } |
346 | ring->default_context->legacy_hw_ctx.initialized = false; |
343 | } |
347 | } |
Line 344... | Line 348... | ||
344 | } |
348 | } |
345 | 349 | ||
Line 706... | Line 710... | ||
706 | */ |
710 | */ |
707 | ret = i915_gem_object_set_to_gtt_domain(to->legacy_hw_ctx.rcs_state, false); |
711 | ret = i915_gem_object_set_to_gtt_domain(to->legacy_hw_ctx.rcs_state, false); |
708 | if (ret) |
712 | if (ret) |
709 | goto unpin_out; |
713 | goto unpin_out; |
Line 710... | Line 714... | ||
710 | 714 | ||
711 | if (!to->legacy_hw_ctx.initialized) { |
715 | if (!to->legacy_hw_ctx.initialized || i915_gem_context_is_default(to)) { |
712 | hw_flags |= MI_RESTORE_INHIBIT; |
716 | hw_flags |= MI_RESTORE_INHIBIT; |
713 | /* NB: If we inhibit the restore, the context is not allowed to |
717 | /* NB: If we inhibit the restore, the context is not allowed to |
714 | * die because future work may end up depending on valid address |
718 | * die because future work may end up depending on valid address |
715 | * space. This means we must enforce that a page table load |
719 | * space. This means we must enforce that a page table load |