mirror of
https://github.com/edk2-porting/linux-next.git
synced 2025-01-01 18:24:23 +08:00
drm/i915: Unlock the shared hwsp_gtt object after pinning
The hwsp_gtt object is used for sub-allocation and could therefore be shared by many contexts causing unnecessary contention during concurrent context pinning. However since we're currently locking it only for pinning, it remains resident until we unpin it, and therefore it's safe to drop the lock early, allowing for concurrent thread access. Signed-off-by: Thomas Hellström <thomas.hellstrom@intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Joonas Lahtinen <joonas.lahtinen@linux.intel.com>
This commit is contained in:
parent
f4b3c39554
commit
e0ee152fce
@ -271,6 +271,15 @@ err_release:
|
||||
i915_active_release(&ce->active);
|
||||
err_ctx_unpin:
|
||||
intel_context_post_unpin(ce);
|
||||
|
||||
/*
|
||||
* Unlock the hwsp_ggtt object since it's shared.
|
||||
* In principle we can unlock all the global state locked above
|
||||
* since it's pinned and doesn't need fencing, and will
|
||||
* thus remain resident until it is explicitly unpinned.
|
||||
*/
|
||||
i915_gem_ww_unlock_single(ce->timeline->hwsp_ggtt->obj);
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user