On Thu, 16 Dec 2021 at 14:28, Maarten Lankhorst <[email protected]> wrote: > > Big delta, but boils down to moving set_pages to i915_vma.c, and removing > the special handling, all callers use the defaults anyway. We only remap > in ggtt, so default case will fall through. > > Because we still don't require locking in i915_vma_unpin(), handle this by > using xchg in get_pages(), as it's locked with obj->mutex, and cmpxchg in > unpin, which only fails if we race a against a new pin. > > Changes since v1: > - aliasing gtt sets ZERO_SIZE_PTR, not -ENODEV, remove special case > from __i915_vma_get_pages(). (Matt) > Changes since v2: > - Free correct old pages in __i915_vma_get_pages(). (Matt) > Remove race of clearing vma->pages accidentally from put, > free it but leave it set, as only get has the lock. > > Signed-off-by: Maarten Lankhorst <[email protected]> Reviewed-by: Matthew Auld <[email protected]>
- [Intel-gfx] [PATCH v3 00/17] drm/i915: Remove short term... Maarten Lankhorst
- [Intel-gfx] [PATCH v3 02/17] drm/i915: Change shrin... Maarten Lankhorst
- [Intel-gfx] [PATCH v3 05/17] drm/i915: Force ww loc... Maarten Lankhorst
- Re: [Intel-gfx] [PATCH v3 05/17] drm/i915: Forc... Matthew Auld
- [Intel-gfx] [PATCH v3 01/17] drm/i915: Remove unuse... Maarten Lankhorst
- [Intel-gfx] [PATCH v3 03/17] drm/i915: Remove pages... Maarten Lankhorst
- Re: [Intel-gfx] [PATCH v3 03/17] drm/i915: Remo... Matthew Auld
- [Intel-gfx] [PATCH v3 04/17] drm/i915: Take object ... Maarten Lankhorst
- Re: [Intel-gfx] [PATCH v3 04/17] drm/i915: Take... Matthew Auld
- [Intel-gfx] [PATCH v3 10/17] drm/i915: Require obje... Maarten Lankhorst
- [Intel-gfx] [PATCH v3 12/17] drm/i915: Add locking ... Maarten Lankhorst
- Re: [Intel-gfx] [PATCH v3 12/17] drm/i915: Add ... Matthew Auld
- [Intel-gfx] [PATCH v3 11/17] drm/i915: Add ww ctx t... Maarten Lankhorst
- Re: [Intel-gfx] [PATCH v3 11/17] drm/i915: Add ... Matthew Auld
- [Intel-gfx] [PATCH v3 15/17] drm/i915: Remove asser... Maarten Lankhorst
- [Intel-gfx] [PATCH v3 16/17] drm/i915: Remove suppo... Maarten Lankhorst
- [Intel-gfx] [PATCH v3 06/17] drm/i915: Ensure gem_c... Maarten Lankhorst
