[Intel-gfx] [PATCH v2 2/2] drm/i915/dgfx: Grab wakeref at i915_ttm_unmap_virtual
Matthew Auld
matthew.auld at intel.com
Mon Oct 24 14:03:49 UTC 2022
On 21/10/2022 10:55, Anshuman Gupta wrote:
> We had already grabbed the rpm wakeref at obj destruction path,
> but it also required to grab the wakeref when object moves.
> When i915_gem_object_release_mmap_offset() gets called by
> i915_ttm_move_notify(), it will release the mmap offset without
> grabbing the wakeref. We want to avoid that therefore,
> grab the wakeref at i915_ttm_unmap_virtual() accordingly.
>
> While doing that also changed the lmem_userfault_lock from
> mutex to spinlock, as spinlock widely used for list.
>
> Also changed if (obj->userfault_count) to
> GEM_BUG_ON(!obj->userfault_count).
>
> v2:
> - Removed lmem_userfault_{list,lock} from intel_gt. [Matt Auld]
>
> Fixes: ad74457a6b5a ("drm/i915/dgfx: Release mmap on rpm suspend")
> Suggested-by: Matthew Auld <matthew.auld at intel.com>
> Signed-off-by: Anshuman Gupta <anshuman.gupta at intel.com>
Reviewed-by: Matthew Auld <matthew.auld at intel.com>
More information about the Intel-gfx
mailing list