Re: [Intel-gfx] [PATCH v2 1/2] drm/i915: Prepare for multiple GTs

2022-01-18 Thread Abdiel Janulgue
On 14.1.2022 19.59, Andi Shyti wrote: Hi Matt, [...] -int intel_uncore_setup_mmio(struct intel_uncore *uncore) +int intel_uncore_setup_mmio(struct intel_uncore *uncore, phys_addr_t phys_addr) { struct drm_i915_private *i915 = uncore->i915; - struct pci_dev *pdev = to_pci_dev(i9

Re: [Intel-gfx] [PATCH 3/5] drm/i915/gem: Store mmap_offsets in an rbtree rather than a plain list

2020-01-20 Thread Abdiel Janulgue
the drm_vma_node itself to manage the file > association (allow/revoke) dropping our need to keep an mmo per-file. > Then if we keep a small rbtree of per-type mmap_offsets, we can lookup > duplicate requests quickly. As discussed, rbtree does do away with the limitation of the linear list Re

Re: [Intel-gfx] [PATCH i-g-t] i915/gem_mmap_offset: Exercise many, many mmap_offset

2020-01-20 Thread Abdiel Janulgue
On 17/01/2020 23.11, Chris Wilson wrote: > Just keep on generating a new mmap_offset for the same old buffer, but > for different handles and so exercise the scaling of the obj->mmo lists. > Reviewed-by: Abdiel Janulgue > Signed-off-by: Chris Wilson > C

[Intel-gfx] [PATCH 3/3] drm/i915/selftests: Add selftest for memory region PF handling

2019-12-22 Thread Abdiel Janulgue
Instead of testing individually our new fault handlers, iterate over all memory regions and test all from one interface. Signed-off-by: Abdiel Janulgue Cc: Matthew Auld Cc: Chris Wilson Cc: Joonas Lahtinen --- .../drm/i915/gem/selftests/i915_gem_mman.c| 233 -- 1 file

[Intel-gfx] [PATCH 2/3] drm/i915: Add lmem fault handler

2019-12-22 Thread Abdiel Janulgue
Fault handler to handle missing pages for lmem objects. v6: Use new remap_io_sg interface for noncontiguous fault handling Signed-off-by: Abdiel Janulgue Signed-off-by: Matthew Auld Cc: Chris Wilson Cc: Joonas Lahtinen --- drivers/gpu/drm/i915/gem/i915_gem_lmem.c | 1 + drivers/gpu/drm

[Intel-gfx] [PATCH 1/3] drm/i915: Introduce remap_io_sg() to prefault discontiguous objects

2019-12-22 Thread Abdiel Janulgue
Provide a way to set the PTE within apply_page_range for discontiguous objects in addition to the existing method of just incrementing the pfn for a page range. Signed-off-by: Abdiel Janulgue Cc: Chris Wilson --- drivers/gpu/drm/i915/i915_drv.h | 3 ++ drivers/gpu/drm/i915/i915_mm.c | 67

[Intel-gfx] [PATCH 3/3] drm/i915/selftests: Add selftest for memory region PF handling

2019-12-19 Thread Abdiel Janulgue
Instead of testing individually our new fault handlers, iterate over all memory regions and test all from one interface. Signed-off-by: Abdiel Janulgue Cc: Matthew Auld Cc: Chris Wilson Cc: Joonas Lahtinen --- .../drm/i915/gem/selftests/i915_gem_mman.c| 233 -- 1 file

[Intel-gfx] [PATCH 2/3] drm/i915: Add lmem fault handler

2019-12-19 Thread Abdiel Janulgue
Fault handler to handle missing pages for lmem objects. v5: Use new remap_io_mapping interface for noncontiguous fault handling Signed-off-by: Abdiel Janulgue Signed-off-by: Matthew Auld Cc: Chris Wilson Cc: Joonas Lahtinen --- drivers/gpu/drm/i915/gem/i915_gem_lmem.c | 13 ++ drivers

[Intel-gfx] [PATCH 1/3] drm/i915: allow prefaulting discontiguous objects in remap_io_mapping()

2019-12-19 Thread Abdiel Janulgue
Provide a way to set the PTE of the physical address of kernel memory in addition to just incrementing the pfn for a page range. Signed-off-by: Abdiel Janulgue Cc: Chris Wilson --- drivers/gpu/drm/i915/gem/i915_gem_mman.c | 1 + drivers/gpu/drm/i915/i915_drv.h | 4 +++- drivers/gpu

Re: [Intel-gfx] ✗ Fi.CI.BAT: failure for series starting with [1/2] drm/i915: Add lmem fault handler

2019-12-17 Thread Abdiel Janulgue
On 17/12/2019 15.00, Patchwork wrote: > == Series Details == > > Series: series starting with [1/2] drm/i915: Add lmem fault handler > URL : https://patchwork.freedesktop.org/series/71051/ > State : failure > > == Summary == > > CI Bug Log - changes from CI_DRM_7580 -> Patchwork_15810 > ===

Re: [Intel-gfx] [PATCH 1/2] drm/i915: Add lmem fault handler

2019-12-17 Thread Abdiel Janulgue
On 17/12/2019 14.14, Chris Wilson wrote: > Quoting Abdiel Janulgue (2019-12-17 11:57:49) >> Fault handler to handle missing pages for lmem objects. >> >> v4: Restore non-contigous fault handling in addition to remap_io_mapping >> >> Signed-off-by: Abdiel Janulgu

[Intel-gfx] [PATCH 1/2] drm/i915: Add lmem fault handler

2019-12-17 Thread Abdiel Janulgue
Fault handler to handle missing pages for lmem objects. v4: Restore non-contigous fault handling in addition to remap_io_mapping Signed-off-by: Abdiel Janulgue Signed-off-by: Matthew Auld Cc: Chris Wilson Cc: Joonas Lahtinen --- drivers/gpu/drm/i915/gem/i915_gem_lmem.c | 13 + drivers

[Intel-gfx] [PATCH 2/2] drm/i915/selftests: Add selftest for memory region PF handling

2019-12-17 Thread Abdiel Janulgue
Instead of testing individually our new fault handlers, iterate over all memory regions and test all from one interface. Signed-off-by: Abdiel Janulgue Cc: Matthew Auld Cc: Chris Wilson Cc: Joonas Lahtinen --- .../drm/i915/gem/selftests/i915_gem_mman.c| 226 -- 1 file

Re: [Intel-gfx] [PATCH] drm/i915: Add lmem fault handler

2019-12-12 Thread Abdiel Janulgue
On 12/12/2019 17.19, Chris Wilson wrote: > Quoting Matthew Auld (2019-12-12 15:11:02) >> On Thu, 12 Dec 2019 at 14:20, Chris Wilson wrote: >>> >>> Quoting Abdiel Janulgue (2019-12-12 11:34:38) >>>> Fault handler to handle missing pages for lmem ob

[Intel-gfx] [PATCH] drm/i915: Add lmem fault handler

2019-12-12 Thread Abdiel Janulgue
Fault handler to handle missing pages for lmem objects. v3: Add get_vm_cpu_ops, iterate over all memory regions in the lmem selftest, use remap_io_mapping. Signed-off-by: Abdiel Janulgue Signed-off-by: Matthew Auld Cc: Chris Wilson Cc: Joonas Lahtinen --- drivers/gpu/drm/i915/gem

[Intel-gfx] [PATCH] drm/i915: Add lmem fault handler

2019-12-10 Thread Abdiel Janulgue
Fault handler to handle missing pages for lmem objects. v2: Handle ENXIO in fault error, account for offset in region start for fake lmem (Matt). Add selftest (Chris). Signed-off-by: Abdiel Janulgue Signed-off-by: Matthew Auld Cc: Chris Wilson Cc: Joonas Lahtinen --- drivers/gpu/drm

[Intel-gfx] [PATCH] drm/i915: Add lmem fault handler

2019-12-05 Thread Abdiel Janulgue
Fault handler to handle missing pages for lmem objects. Signed-off-by: Abdiel Janulgue Signed-off-by: Matthew Auld Cc: Chris Wilson Cc: Joonas Lahtinen --- drivers/gpu/drm/i915/gem/i915_gem_lmem.c | 43 drivers/gpu/drm/i915/gem/i915_gem_lmem.h | 6 drivers/gpu

Re: [Intel-gfx] [PATCH 2/4] drm/i915: Introduce DRM_I915_GEM_MMAP_OFFSET

2019-11-19 Thread Abdiel Janulgue
On 19/11/2019 13.37, Abdiel Janulgue wrote: > +struct drm_i915_gem_mmap_offset { > + /** Handle for the object being mapped. */ > + __u32 handle; > + __u32 pad; > + /** > + * Fake offset to use for subsequent mmap call > + * > + * This is

[Intel-gfx] [PATCH 1/4] drm/i915: Allow i915 to manage the vma offset nodes instead of drm core

2019-11-19 Thread Abdiel Janulgue
DONLY instead of obj->readonly. Signed-off-by: Abdiel Janulgue Cc: Matthew Auld Cc: Joonas Lahtinen Cc: Chris Wilson --- drivers/gpu/drm/i915/gem/i915_gem_domain.c| 3 +- drivers/gpu/drm/i915/gem/i915_gem_mman.c | 241 +++--- drivers/gpu/drm/i915/gem/i915_ge

[Intel-gfx] [PATCH 4/4] drm/i915: Add cpu fault handler for mmap_offset

2019-11-19 Thread Abdiel Janulgue
PTEs are revoked (Chris) Signed-off-by: Abdiel Janulgue Signed-off-by: Matthew Auld Cc: Joonas Lahtinen Reviewed-by: Chris Wilson --- drivers/gpu/drm/i915/gem/i915_gem_mman.c | 129 ++ .../drm/i915/gem/selftests/i915_gem_mman.c| 48 ++- 2 files changed, 145

[Intel-gfx] [PATCH 3/4] drm/i915: cpu-map based dumb buffers

2019-11-19 Thread Abdiel Janulgue
Prefer CPU WC mmaps via our new mmap offset plumbing otherwise fall- back to GTT mmaps when hw doesn't support PAT Signed-off-by: Abdiel Janulgue Cc: Matthew Auld Acked-by: Chris Wilson --- drivers/gpu/drm/i915/gem/i915_gem_mman.c | 18 ++ drivers/gpu/drm/i91

[Intel-gfx] [PATCH 2/4] drm/i915: Introduce DRM_I915_GEM_MMAP_OFFSET

2019-11-19 Thread Abdiel Janulgue
s) - Don't bail out on no PAT when doing WB mmaps - Prepare uAPI for further extensions v3: - drop MMAP_OFFSET_FLAGS v4: - Tweaks, header re-org Signed-off-by: Abdiel Janulgue Signed-off-by: Matthew Auld Cc: Joonas Lahtinen --- drivers/gpu/drm/i915/gem/i915_gem_ioctls.h| 4 +- driv

[Intel-gfx] [PATCH 4/4] drm/i915: Add cpu fault handler for mmap_offset

2019-11-15 Thread Abdiel Janulgue
Fault handler to handle missing pages for shmem-backed objects. v2: bail out of inserting PTEs when failing to insert the fault address v3: has struct page check v4: Add self-test for validating CPU fault handler to ensure PTEs are revoked when an object is unbound. Signed-off-by: Abdiel

[Intel-gfx] [PATCH 3/4] drm/i915: cpu-map based dumb buffers

2019-11-15 Thread Abdiel Janulgue
Prefer CPU WC mmaps via our new mmap offset plumbing otherwise fall- back to GTT mmaps when hw doesn't support PAT Signed-off-by: Abdiel Janulgue Cc: Matthew Auld --- drivers/gpu/drm/i915/gem/i915_gem_mman.c | 18 ++ drivers/gpu/drm/i915/gem/i915_gem_mman.h | 2 ++ driver

[Intel-gfx] [PATCH 2/4] drm/i915: Introduce DRM_I915_GEM_MMAP_OFFSET

2019-11-15 Thread Abdiel Janulgue
s) - Don't bail out on no PAT when doing WB mmaps - Prepare uAPI for further extensions v3: - drop MMAP_OFFSET_FLAGS v4: - Tweaks, header re-org Signed-off-by: Abdiel Janulgue Signed-off-by: Matthew Auld Cc: Joonas Lahtinen --- drivers/gpu/drm/i915/gem/i915_gem_ioctls.h| 4 +- driv

[Intel-gfx] [PATCH 1/4] drm/i915: Allow i915 to manage the vma offset nodes instead of drm core

2019-11-15 Thread Abdiel Janulgue
aps on i915_gem_object_unbind() since unlike GTT mmaps, they don't have bound i915_vmas objects. Rebase. v6: Minor tweaks, header re-org (Chris) Signed-off-by: Abdiel Janulgue Cc: Matthew Auld Cc: Joonas Lahtinen Cc: Chris Wilson --- drivers/gpu/drm/i915/gem/i915_gem_domain.c| 3 +- driv

[Intel-gfx] [PATCH 4/4] drm/i915: Add cpu fault handler for mmap_offset

2019-11-14 Thread Abdiel Janulgue
Fault handler to handle missing pages for shmem-backed objects. v2: bail out of inserting PTEs when failing to insert the fault address v3: has struct page check v4: Add self-test for validating CPU fault handler to ensure PTEs are revoked when an object is unbound. Signed-off-by: Abdiel

[Intel-gfx] [PATCH 3/4] drm/i915: cpu-map based dumb buffers

2019-11-14 Thread Abdiel Janulgue
Prefer CPU WC mmaps via our new mmap offset plumbing otherwise fall- back to GTT mmaps when hw doesn't support PAT Signed-off-by: Abdiel Janulgue Cc: Matthew Auld --- drivers/gpu/drm/i915/gem/i915_gem_mman.c | 13 + drivers/gpu/drm/i915/i915_drv.c | 1 + drivers/gp

[Intel-gfx] [PATCH 1/4] drm/i915: Allow i915 to manage the vma offset nodes instead of drm core

2019-11-14 Thread Abdiel Janulgue
aps on i915_gem_object_unbind() since unlike GTT mmaps, they don't have bound i915_vmas objects. Rebase. Signed-off-by: Abdiel Janulgue Cc: Matthew Auld Cc: Joonas Lahtinen Cc: Chris Wilson --- drivers/gpu/drm/i915/gem/i915_gem_domain.c| 2 +- drivers/gpu/drm/i915/gem/i915_gem_mman.c

[Intel-gfx] [PATCH 2/4] drm/i915: Introduce DRM_I915_GEM_MMAP_OFFSET

2019-11-14 Thread Abdiel Janulgue
s) - Don't bail out on no PAT when doing WB mmaps - Prepare uAPI for further extensions v3: - drop MMAP_OFFSET_FLAGS Signed-off-by: Abdiel Janulgue Signed-off-by: Matthew Auld Cc: Joonas Lahtinen --- drivers/gpu/drm/i915/gem/i915_gem_mman.c | 44 ++-

Re: [Intel-gfx] [PATCH] drm/i915/selftests: Wrap vm_mmap() around GEM objects

2019-11-07 Thread Abdiel Janulgue
On 06/11/2019 10.26, Chris Wilson wrote: > Provide a utility function to create a vma corresponding to an mmap() of > our device. And use it to exercise the equivalent of userspace > performing a GTT mmap of our objects. > > Signed-off-by: Chris Wilson > Cc: Abdiel Janu

Re: [Intel-gfx] [PATCH] drm/i915/gem: Early rejection of no-aperture map_ggtt

2019-11-05 Thread Abdiel Janulgue
d explicitly control the mmap type (viz > MMAP_OFFSET_IOCTL). Reviewed-by: Abdiel Janulgue > > Signed-off-by: Chris Wilson > Cc: Abdiel Janulgue > Cc: Matthew Auld > Cc: Joonas Lahtinen > --- > drivers/gpu/drm/i915/gem/i915_gem_mman.c | 3 +++ > 1 file changed, 3 inse

[Intel-gfx] [PATCH 4/5] drm/i915: cpu-map based dumb buffers

2019-10-23 Thread Abdiel Janulgue
Prefer CPU WC mmaps via our new mmap offset plumbing otherwise fall- back to GTT mmaps when hw doesn't support PAT Signed-off-by: Abdiel Janulgue Cc: Matthew Auld --- drivers/gpu/drm/i915/gem/i915_gem_mman.c | 13 + drivers/gpu/drm/i915/i915_drv.c | 1 + drivers/gp

[Intel-gfx] [PATCH 5/5] drm/i915: Add cpu fault handler for mmap_offset

2019-10-23 Thread Abdiel Janulgue
Fault handler to handle missing pages for shmem-backed objects. v2: bail out of inserting PTEs when failing to insert the fault address v3: has struct page check Signed-off-by: Abdiel Janulgue Signed-off-by: Matthew Auld Cc: Joonas Lahtinen --- drivers/gpu/drm/i915/gem/i915_gem_mman.c

[Intel-gfx] [PATCH 1/5] drm/i915: Allow i915 to manage the vma offset nodes instead of drm core

2019-10-23 Thread Abdiel Janulgue
cts be ensuring it is owned by the parent gem object instead of refcounting. - Track mmo used by fencing to Avoid locking when revoking mmaps during GPU reset. - Rebase. v3: - Simplify mmo tracking v4: - use vma->mmo in __i915_gem_object_release_mmap_gtt Signed-off-by: Abdiel Janulg

[Intel-gfx] [PATCH 2/5] drm/i915: define i915_ggtt_has_aperture

2019-10-23 Thread Abdiel Janulgue
From: Daniele Ceraolo Spurio The following patches in the series will use it to avoid certain operations when the mappable aperture is not available in HW. Signed-off-by: Daniele Ceraolo Spurio Signed-off-by: Matthew Auld --- drivers/gpu/drm/i915/i915_gem_gtt.h | 5 + 1 file changed, 5 in

[Intel-gfx] [PATCH 3/5] drm/i915: Introduce DRM_I915_GEM_MMAP_OFFSET

2019-10-23 Thread Abdiel Janulgue
s) - Don't bail out on no PAT when doing WB mmaps - Prepare uAPI for further extensions v3: - drop MMAP_OFFSET_FLAGS Signed-off-by: Abdiel Janulgue Signed-off-by: Matthew Auld Cc: Joonas Lahtinen --- drivers/gpu/drm/i915/gem/i915_gem_mman.c | 44 ++-

Re: [Intel-gfx] [PATCH 3/5] drm/i915: Introduce DRM_I915_GEM_MMAP_OFFSET

2019-10-23 Thread Abdiel Janulgue
> i915_gem_mmap_gtt_ioctl(struct drm_device *dev, void *data, > struct drm_file *file) > { > - struct drm_i915_gem_mmap_gtt *args = data; > + struct drm_i915_gem_mmap_offset *args = data; > + struct drm_i915_private *i915 = to_i915(dev); > + > + if (args->fl

[Intel-gfx] [PATCH 2/5] drm/i915: define i915_ggtt_has_aperture

2019-10-23 Thread Abdiel Janulgue
From: Daniele Ceraolo Spurio The following patches in the series will use it to avoid certain operations when the mappable aperture is not available in HW. Signed-off-by: Daniele Ceraolo Spurio Signed-off-by: Matthew Auld --- drivers/gpu/drm/i915/i915_gem_gtt.h | 5 + 1 file changed, 5 in

[Intel-gfx] [PATCH 1/5] drm/i915: Allow i915 to manage the vma offset nodes instead of drm core

2019-10-23 Thread Abdiel Janulgue
cts be ensuring it is owned by the parent gem object instead of refcounting. - Track mmo used by fencing to avoid locking when revoking mmaps during GPU reset. - Rebase. v3: - Simplify mmo tracking v4: - use vma->mmo in __i915_gem_object_release_mmap_gtt Signed-off-by: Abdiel Janulg

[Intel-gfx] [PATCH 5/5] drm/i915: Add cpu fault handler for mmap_offset

2019-10-23 Thread Abdiel Janulgue
Fault handler to handle missing pages for shmem-backed objects. v2: bail out of inserting PTEs when failing to insert the fault address v3: has struct page check Signed-off-by: Abdiel Janulgue Signed-off-by: Matthew Auld Cc: Joonas Lahtinen --- drivers/gpu/drm/i915/gem/i915_gem_mman.c

[Intel-gfx] [PATCH 3/5] drm/i915: Introduce DRM_I915_GEM_MMAP_OFFSET

2019-10-23 Thread Abdiel Janulgue
s) - Don't bail out on no PAT when doing WB mmaps - Prepare uAPI for further extensions v3: - drop MMAP_OFFSET_FLAGS Signed-off-by: Abdiel Janulgue Signed-off-by: Matthew Auld Cc: Joonas Lahtinen --- drivers/gpu/drm/i915/gem/i915_gem_mman.c | 44 ++-

[Intel-gfx] [PATCH 4/5] drm/i915: cpu-map based dumb buffers

2019-10-23 Thread Abdiel Janulgue
Prefer CPU WC mmaps via our new mmap offset plumbing otherwise fall- back to GTT mmaps when hw doesn't support PAT Signed-off-by: Abdiel Janulgue Cc: Matthew Auld --- drivers/gpu/drm/i915/gem/i915_gem_mman.c | 13 + drivers/gpu/drm/i915/i915_drv.c | 1 + drivers/gp

Re: [Intel-gfx] [PATCH 4/5] drm/i915: cpu-map based dumb buffers

2019-10-22 Thread Abdiel Janulgue
On 21/10/2019 16.35, Chris Wilson wrote: > Quoting Abdiel Janulgue (2019-10-21 11:48:10) >> +int >> +i915_gem_mmap_dumb(struct drm_file *file, >> + struct drm_device *dev, >> + u32 handle, >> + u64

[Intel-gfx] [PATCH 2/5] drm/i915: define HAS_MAPPABLE_APERTURE

2019-10-21 Thread Abdiel Janulgue
From: Daniele Ceraolo Spurio The following patches in the series will use it to avoid certain operations when aperture is not available in HW. Signed-off-by: Daniele Ceraolo Spurio Cc: Matthew Auld --- drivers/gpu/drm/i915/i915_drv.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drive

[Intel-gfx] [PATCH 5/5] drm/i915: Add cpu fault handler for mmap_offset

2019-10-21 Thread Abdiel Janulgue
Fault handler to handle missing pages for shmem-backed objects. v2: bail out of inserting PTEs when failing to insert the fault address v3: has struct page check Signed-off-by: Abdiel Janulgue Signed-off-by: Matthew Auld Cc: Joonas Lahtinen --- drivers/gpu/drm/i915/gem/i915_gem_mman.c

[Intel-gfx] [PATCH 4/5] drm/i915: cpu-map based dumb buffers

2019-10-21 Thread Abdiel Janulgue
No reason for sticking to GTT mmaps now we have CPU WC mmaps via our new mmap offset plumbing. Signed-off-by: Abdiel Janulgue Cc: Matthew Auld --- drivers/gpu/drm/i915/gem/i915_gem_mman.c | 10 ++ drivers/gpu/drm/i915/i915_drv.c | 1 + drivers/gpu/drm/i915/i915_drv.h

[Intel-gfx] [PATCH 3/5] drm/i915: Introduce DRM_I915_GEM_MMAP_OFFSET

2019-10-21 Thread Abdiel Janulgue
s) - Don't bail out on no PAT when doing WB mmaps - Prepare uAPI for further extensions v3: - drop MMAP_OFFSET_FLAGS Signed-off-by: Abdiel Janulgue Signed-off-by: Matthew Auld Cc: Joonas Lahtinen --- drivers/gpu/drm/i915/gem/i915_gem_mman.c | 44 ++-

[Intel-gfx] [PATCH 1/5] drm/i915: Allow i915 to manage the vma offset nodes instead of drm core

2019-10-21 Thread Abdiel Janulgue
cts be ensuring it is owned by the parent gem object instead of refcounting. - Track mmo used by fencing to Avoid locking when revoking mmaps during GPU reset. - Rebase. v3: - Simplify mmo tracking v4: - use vma->mmo in __i915_gem_object_release_mmap_gtt Signed-off-by: Abdiel Janulg

Re: [Intel-gfx] [PATCH v3 4/5] drm/i915: cpu-map based dumb buffers

2019-10-15 Thread Abdiel Janulgue
On 15/10/2019 14.15, Chris Wilson wrote: > Quoting Abdiel Janulgue (2019-10-15 09:37:23) >> +int >> +i915_gem_mmap_dumb(struct drm_file *file, >> + struct drm_device *dev, >> + u32 handle, >> + u64 *offset) >>

[Intel-gfx] [PATCH v3 3/5] drm/i915: Introduce DRM_I915_GEM_MMAP_OFFSET

2019-10-15 Thread Abdiel Janulgue
Don't bail out on no PAT when doing WB mmaps - Prepare uAPI for further extensions Signed-off-by: Abdiel Janulgue Signed-off-by: Matthew Auld Cc: Joonas Lahtinen --- drivers/gpu/drm/i915/gem/i915_gem_mman.c | 36 +-- .../gpu/drm/i915/gem/i915_gem_object_types.h | 3

[Intel-gfx] [PATCH v3 5/5] drm/i915: Add cpu fault handler for mmap_offset

2019-10-15 Thread Abdiel Janulgue
Fault handler to handle missing pages for shmem-backed objects. v2: bail out of inserting PTEs when failing to insert the fault address Signed-off-by: Abdiel Janulgue Signed-off-by: Matthew Auld Cc: Joonas Lahtinen --- drivers/gpu/drm/i915/gem/i915_gem_mman.c | 125

[Intel-gfx] [PATCH v3 4/5] drm/i915: cpu-map based dumb buffers

2019-10-15 Thread Abdiel Janulgue
If there is no aperture we can't use map_gtt to map dumb buffers, so we need a cpu-map based path to do it. We prefer map_gtt on platforms that do have aperture. Signed-off-by: Abdiel Janulgue Cc: Daniele Ceraolo Spurio Cc: Tvrtko Ursulin Cc: Matthew Auld --- drivers/gpu/drm/i91

[Intel-gfx] [PATCH v3 2/5] drm/i915: define HAS_MAPPABLE_APERTURE

2019-10-15 Thread Abdiel Janulgue
From: Daniele Ceraolo Spurio The following patches in the series will use it to avoid certain operations when aperture is not available in HW. Signed-off-by: Daniele Ceraolo Spurio Cc: Matthew Auld --- drivers/gpu/drm/i915/i915_drv.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drive

[Intel-gfx] [PATCH v3 1/5] drm/i915: Allow i915 to manage the vma offset nodes instead of drm core

2019-10-15 Thread Abdiel Janulgue
cts be ensuring it is owned by the parent gem object instead of refcounting. - Track mmo used by fencing to Avoid locking when revoking mmaps during GPU reset. - Rebase. v3: - Simplify mmo tracking Signed-off-by: Abdiel Janulgue Cc: Matthew Auld Cc: Joonas Lahtinen Cc: Chris Wil

[Intel-gfx] [PATCH v2 1/5] drm/i915: Allow i915 to manage the vma offset nodes instead of drm core

2019-10-07 Thread Abdiel Janulgue
cts be ensuring it is owned by the parent gem object instead of refcounting. - Track mmo used by fencing to Avoid locking when revoking mmaps during GPU reset. - Rebase Signed-off-by: Abdiel Janulgue Cc: Matthew Auld Cc: Joonas Lahtinen Cc: Chris Wilson --- drivers/gpu/drm/i915/

[Intel-gfx] [PATCH v2 4/5] drm/i915: cpu-map based dumb buffers

2019-10-07 Thread Abdiel Janulgue
If there is no aperture we can't use map_gtt to map dumb buffers, so we need a cpu-map based path to do it. We prefer map_gtt on platforms that do have aperture. Signed-off-by: Abdiel Janulgue Cc: Daniele Ceraolo Spurio Cc: Tvrtko Ursulin Cc: Matthew Auld --- drivers/gpu/drm/i91

[Intel-gfx] [PATCH v2 3/5] drm/i915: Introduce DRM_I915_GEM_MMAP_OFFSET

2019-10-07 Thread Abdiel Janulgue
tween them, when we inspect the flags. Signed-off-by: Abdiel Janulgue Signed-off-by: Matthew Auld Cc: Joonas Lahtinen --- drivers/gpu/drm/i915/gem/i915_gem_mman.c | 36 +-- .../gpu/drm/i915/gem/i915_gem_object_types.h | 3 ++ drivers/gpu/drm/i915/i915_drv.c

[Intel-gfx] [PATCH v2 2/5] drm/i915: define HAS_MAPPABLE_APERTURE

2019-10-07 Thread Abdiel Janulgue
From: Daniele Ceraolo Spurio The following patches in the series will use it to avoid certain operations when aperture is not available in HW. Signed-off-by: Daniele Ceraolo Spurio Cc: Matthew Auld --- drivers/gpu/drm/i915/i915_drv.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drive

[Intel-gfx] [PATCH v2 5/5] drm/i915: Add cpu fault handler for mmap_offset

2019-10-07 Thread Abdiel Janulgue
Fault handler to handle missing pages for shmem-backed objects. Signed-off-by: Abdiel Janulgue Signed-off-by: Matthew Auld Cc: Joonas Lahtinen --- drivers/gpu/drm/i915/gem/i915_gem_mman.c | 125 ++- 1 file changed, 100 insertions(+), 25 deletions(-) diff --git a/drivers

[Intel-gfx] [PATCH v2 4/5] drm/i915: cpu-map based dumb buffers

2019-10-07 Thread Abdiel Janulgue
If there is no aperture we can't use map_gtt to map dumb buffers, so we need a cpu-map based path to do it. We prefer map_gtt on platforms that do have aperture. Signed-off-by: Abdiel Janulgue Cc: Daniele Ceraolo Spurio Cc: Tvrtko Ursulin Cc: Matthew Auld --- drivers/gpu/drm/i91

[Intel-gfx] [PATCH v2 2/5] drm/i915: define HAS_MAPPABLE_APERTURE

2019-10-07 Thread Abdiel Janulgue
From: Daniele Ceraolo Spurio The following patches in the series will use it to avoid certain operations when aperture is not available in HW. Signed-off-by: Daniele Ceraolo Spurio Cc: Matthew Auld --- drivers/gpu/drm/i915/i915_drv.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drive

[Intel-gfx] [PATCH v2 1/5] drm/i915: Allow i915 to manage the vma offset nodes instead of drm core

2019-10-07 Thread Abdiel Janulgue
cts be ensuring it is owned by the parent gem object instead of refcounting. - Track mmo used by fencing to Avoid locking when revoking mmaps during GPU reset. - Rebase Signed-off-by: Abdiel Janulgue Cc: Matthew Auld Cc: Joonas Lahtinen Cc: Chris Wilson --- drivers/gpu/drm/i915/

[Intel-gfx] [PATCH v2 5/5] drm/i915: Add cpu fault handler for mmap_offset

2019-10-07 Thread Abdiel Janulgue
Fault handler to handle missing pages for shmem-backed objects. Signed-off-by: Abdiel Janulgue Signed-off-by: Matthew Auld Cc: Joonas Lahtinen --- drivers/gpu/drm/i915/gem/i915_gem_mman.c | 125 ++- 1 file changed, 100 insertions(+), 25 deletions(-) diff --git a/drivers

[Intel-gfx] [PATCH v2 3/5] drm/i915: Introduce DRM_I915_GEM_MMAP_OFFSET

2019-10-07 Thread Abdiel Janulgue
tween them, when we inspect the flags. Signed-off-by: Abdiel Janulgue Signed-off-by: Matthew Auld Cc: Joonas Lahtinen --- drivers/gpu/drm/i915/gem/i915_gem_mman.c | 36 +-- .../gpu/drm/i915/gem/i915_gem_object_types.h | 3 ++ drivers/gpu/drm/i915/i915_drv.c

Re: [Intel-gfx] [PATCH 04/21] drm/i915: Refresh the errno to vmf_fault translations

2019-09-03 Thread Abdiel Janulgue
On 02/09/2019 7.02, Chris Wilson wrote: > It's been a long time since we accidentally reported -EIO upon wedging, > it can now only be generated by failure to swap in a page. > Reviewed-by: Abdiel Janulgue > Signed-off-by: Chris Wilson > Cc: Abdiel Janulgue > --- >

Re: [Intel-gfx] [PATCH i-g-t] i915/gem_mmap_gtt: Race mmap offset generation against closure

2019-08-29 Thread Abdiel Janulgue
Yup, this is a valid issue. Reviewed-by: Abdiel Janulgue On 26/08/2019 18.20, Chris Wilson wrote: > Signed-off-by: Chris Wilson > Cc: Abdiel Janulgue > --- > tests/i915/gem_mmap_gtt.c | 98 +++ > 1 file changed, 98 insertions(+) > &g

Re: [Intel-gfx] [PATCH 5/5] drm/i915: cpu-map based dumb buffers

2019-08-27 Thread Abdiel Janulgue
On 26/08/2019 15.48, Chris Wilson wrote: > Quoting Abdiel Janulgue (2019-08-26 13:21:02) >> +int >> +i915_gem_mmap_dumb(struct drm_file *file, >> + struct drm_device *dev, >> + u32 handle, >> + u64 *offset) >>

[Intel-gfx] [PATCH 5/5] drm/i915: cpu-map based dumb buffers

2019-08-26 Thread Abdiel Janulgue
If there is no aperture we can't use map_gtt to map dumb buffers, so we need a cpu-map based path to do it. We prefer map_gtt on platforms that do have aperture. Signed-off-by: Abdiel Janulgue Cc: Daniele Ceraolo Spurio Cc: Tvrtko Ursulin Cc: Matthew Auld --- drivers/gpu/drm/i91

[Intel-gfx] [PATCH 2/5] drm/i915: Introduce DRM_I915_GEM_MMAP_OFFSET

2019-08-26 Thread Abdiel Janulgue
tween them, when we inspect the flags. Signed-off-by: Abdiel Janulgue Signed-off-by: Matthew Auld Cc: Joonas Lahtinen --- drivers/gpu/drm/i915/gem/i915_gem_mman.c | 34 ++- .../gpu/drm/i915/gem/i915_gem_object_types.h | 3 ++ drivers/gpu/drm/i915/i915_drv.c

[Intel-gfx] [PATCH 3/5] drm/i915: Add cpu fault handler for mmap_offset

2019-08-26 Thread Abdiel Janulgue
Fault handler to handle missing pages for shmem-backed objects. Handle also logic needed to refault pages depending on fault handler usage. Signed-off-by: Abdiel Janulgue Signed-off-by: Matthew Auld Cc: Joonas Lahtinen --- drivers/gpu/drm/i915/gem/i915_gem_domain.c | 2 +- drivers/gpu/drm

[Intel-gfx] [PATCH 4/5] drm/i915: define HAS_MAPPABLE_APERTURE

2019-08-26 Thread Abdiel Janulgue
From: Daniele Ceraolo Spurio The following patches in the series will use it to avoid certain operations when aperture is not available in HW. Signed-off-by: Daniele Ceraolo Spurio Cc: Matthew Auld --- drivers/gpu/drm/i915/i915_drv.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drive

[Intel-gfx] [PATCH 1/5] drm/i915: Allow i915 to manage the vma offset nodes instead of drm core

2019-08-26 Thread Abdiel Janulgue
store extra data within vma->vm_private_data and assign the pagefault ops for each mmap instance allowing objects to use multiple fault handlers depending on its backing storage. Signed-off-by: Abdiel Janulgue Cc: Joonas Lahtinen Cc: Chris Wilson --- drivers/gpu/drm/i915/gem/i915_gem_mma

Re: [Intel-gfx] [PATCH i-g-t] i915/gem_mmap_gtt: Test mmap_offset lifetime

2019-08-13 Thread Abdiel Janulgue
On 10/08/2019 15.38, Chris Wilson wrote: > Closing the object on another file should not affect the local > mmap_offset. > Thanks for this! It helped squeezed the bug out of mmap_offset. Reviewed-by: Abdiel Janulgue > Signed-off-by: Chris Wilson > Cc: Abdiel Janulgue >

Re: [Intel-gfx] [PATCH] drm/i915: Drop expectations of VM_IO from our GGTT mmappings

2019-08-07 Thread Abdiel Janulgue
the vma. Reviewed-by: Abdiel Janulgue > > Signed-off-by: Chris Wilson > Cc: Joonas Lahtinen > Cc: Abdiel Janulgue > --- > drivers/gpu/drm/i915/i915_mm.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/i915/i915_mm.c b/dr

Re: [Intel-gfx] [PATCH] drm/i915/gtt: Fix rounding for 36b

2019-07-22 Thread Abdiel Janulgue
On 19/07/2019 16.07, Chris Wilson wrote: > The top-level page directory for 36b is a single entry, not multiple > like 32b. Fix up the rounding on the calculation of the size of the top > level so that we populate the 4th level correctly for 36b. > Reviewed-by: Abdiel Janulgue &

Re: [Intel-gfx] [PATCH 4/4] drm/i915/gtt: Tidy up ppgtt insertion for gen8

2019-07-16 Thread Abdiel Janulgue
On 12/07/2019 14.27, Chris Wilson wrote: > Apply the new radix shift helpers to extract the multi-level indices > cleanly when inserting pte into the gtt tree. > Reviewed-by: Abdiel Janulgue > Signed-off-by: Chris Wilson > --- > drivers/gpu/drm/i915/i9

Re: [Intel-gfx] [PATCH 3/4] drm/i915/gtt: Recursive ppgtt alloc for gen8

2019-07-16 Thread Abdiel Janulgue
On 12/07/2019 14.27, Chris Wilson wrote: > Refactor the separate allocation routines into a single recursive > function. > Reviewed-by: Abdiel Janulgue > Signed-off-by: Chris Wilson > --- > drivers/gpu/drm/i915/i915_gem_gtt.c | 272 ++-- >

Re: [Intel-gfx] [PATCH 3/4] drm/i915/gtt: Recursive ppgtt alloc for gen8

2019-07-16 Thread Abdiel Janulgue
On 12/07/2019 14.27, Chris Wilson wrote: > Refactor the separate allocation routines into a single recursive > function. > Reviewed-by: Abdiel Janulgue > Signed-off-by: Chris Wilson > --- > drivers/gpu/drm/i915/i915_gem_gtt.c | 272 ++-- >

Re: [Intel-gfx] [PATCH 2/4] drm/i915/gtt: Recursive ppgtt clear for gen8

2019-07-12 Thread Abdiel Janulgue
y: Chris Wilson > --- Reviewed-by: Abdiel Janulgue > drivers/gpu/drm/i915/Kconfig.debug | 15 +++ > drivers/gpu/drm/i915/i915_gem_gtt.c | 154 > 2 files changed, 105 insertions(+), 64 deletions(-) > > diff --git a/drivers/gpu/drm/i915/Kconfig.debug >

Re: [Intel-gfx] [PATCH 1/4] drm/i915/gtt: Recursive cleanup for gen8

2019-07-12 Thread Abdiel Janulgue
r allocating for 32/36-bit vm. > > Signed-off-by: Chris Wilson > --- Reviewed-by: Abdiel Janulgue Regards, Abdiel > drivers/gpu/drm/i915/i915_gem_gtt.c | 93 ++--- > drivers/gpu/drm/i915/i915_gem_gtt.h | 2 +- > 2 files changed, 33 insertions(+), 62

Re: [Intel-gfx] [PATCH] drm/i915: Split out GTT fault handler to make it generic

2019-06-04 Thread Abdiel Janulgue
On 06/04/2019 02:00 PM, Chris Wilson wrote: >> + >> + /* Access to snoopable pages through the GTT is incoherent. */ >> + if (obj->cache_level != I915_CACHE_NONE && !HAS_LLC(dev_priv)) { > > And that is very, very specific to one path. > Oops, yep that should be gtt-fault specific

[Intel-gfx] [PATCH] drm/i915: Split out GTT fault handler to make it generic

2019-06-04 Thread Abdiel Janulgue
Allow reuse of the fault-handling code in preparation for having multiple fault handlers depending on the mmaping type and backing storage. Cc: Matthew Auld Cc: Chris Wilson Cc: Joonas Lahtinen Signed-off-by: Abdiel Janulgue --- drivers/gpu/drm/i915/gem/i915_gem_mman.c | 208

[Intel-gfx] [PATCH v3] drm/i915/query: Split out query item checks

2019-02-11 Thread Abdiel Janulgue
This simplifies adding new query item objects. v2: Use query_hdr (Tvrtko, Chris). int instead of u32 in return (Tvrtko) v3: More naming fixes (Tvrtko) Signed-off-by: Abdiel Janulgue Cc: Joonas Lahtinen --- drivers/gpu/drm/i915/i915_query.c | 39 --- 1 file

[Intel-gfx] [PATCH v2] drm/i915/query: Split out query item checks

2019-01-16 Thread Abdiel Janulgue
This simplifies adding new query item objects. v2: Use query_hdr (Tvrtko, Chris). int instead of u32 in return (Tvrtko) Signed-off-by: Abdiel Janulgue Cc: Joonas Lahtinen --- drivers/gpu/drm/i915/i915_query.c | 39 --- 1 file changed, 26 insertions(+), 13

[Intel-gfx] [PATCH] drm/i915/query: Split out query item checks

2019-01-09 Thread Abdiel Janulgue
This simplifies adding new query item objects. Signed-off-by: Abdiel Janulgue Cc: Joonas Lahtinen --- drivers/gpu/drm/i915/i915_query.c | 40 --- 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_query.c b/drivers/gpu/drm

[Intel-gfx] [PATCH 1/2] drm/i915/selftests: Extend partial vma coverage to check parallel creation

2018-04-09 Thread Abdiel Janulgue
From: Chris Wilson One important use of partial vma is to provide mappable access to the object while it is being used elsewhere (pinned entirely into the unmappable portion of the Global GTT, i.e. for use as a display scanout). Signed-off-by: Chris Wilson Cc: Joonas Lahtinen --- drivers/gpu/

[Intel-gfx] [PATCH 2/2] drm/i915/selftests: Compare mappable vma against instance in unmappable region

2018-04-09 Thread Abdiel Janulgue
Add an additional comparison to check the entire vma created in the mappable region of the global GTT against the one in the unmappable range. Further test with an assert_partial as well to ensure the VMA corresponds to the original object's backing store. Signed-off-by: Abdiel Janulgu

Re: [Intel-gfx] [PATCH v2 1/1] i915: additional GEM documentation

2018-03-27 Thread Abdiel Janulgue
quent series. Reviewed-by: Abdiel Janulgue ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Re: [Intel-gfx] [igt-dev] [PATCH igt 1/5] lib/dummyload: Avoid assertions in lowlevel spin constructor

2018-02-28 Thread Abdiel Janulgue
eset by another client writing to i915_wedged. > > Signed-off-by: Chris Wilson Reviewed-by: Abdiel Janulgue > --- > lib/igt_dummyload.c | 17 ++--- > tests/pm_rps.c | 4 +++- > 2 files changed, 17 insertions(+), 4 deletions(-) > > diff --git a/li

[Intel-gfx] [PATCH v2] drm/i915: Ignore TMDS clock limit for DP++ when EDID override is set

2017-12-15 Thread Abdiel Janulgue
or the override condition after respecting the value of drm_dp_dual_mode_detect (Jani Nikula). Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=101649 Cc: Ville Syrjälä Cc: Jani Nikula Cc: Daniel Vetter Signed-off-by: Abdiel Janulgue --- drivers/gpu/drm/i915/intel_hdmi.c | 5 - 1

[Intel-gfx] [PATCH] drm/i915: Ignore TMDS clock limit for DP++ when EDID override is set

2017-12-14 Thread Abdiel Janulgue
ow_bug.cgi?id=101649 Cc: Ville Syrjälä Cc: Jani Nikula Cc: Daniel Vetter Signed-off-by: Abdiel Janulgue --- drivers/gpu/drm/i915/intel_hdmi.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c index bced7b

[Intel-gfx] [PATCH i-g-t v2 1/3] tests/gem_hangcheck_forcewake: Drop gem_hangcheck_forcewake.c

2017-11-29 Thread Abdiel Janulgue
gem_hangcheck_forcewake has been superseded by drv_hangman, and a lot of other very extensive hangchecking that is not run by CI (Chris). v2: Split into multiple patches (Antonio Argenziano) Signed-off-by: Abdiel Janulgue Reviewed-by: Joonas Lahtinen --- tests/Makefile.sources | 1

[Intel-gfx] [PATCH i-g-t v2 2/3] tests/gem_pin: Drop gem_pin.c

2017-11-29 Thread Abdiel Janulgue
gem_pin ABI is going away (Chris). Signed-off-by: Abdiel Janulgue Reviewed-by: Joonas Lahtinen --- tests/Makefile.sources | 1 - tests/gem_pin.c| 248 - tests/meson.build | 1 - 3 files changed, 250 deletions(-) delete mode

[Intel-gfx] [PATCH i-g-t v2 3/3] tests/gem_seqno_wrap: Drop gem_seqno_wrap.c

2017-11-29 Thread Abdiel Janulgue
gem_seqno_wrap is defunct as the debug API withered away. The handling of wraparound under many different workloads is tested by gem_exec_whisper (Chris). Signed-off-by: Abdiel Janulgue Reviewed-by: Joonas Lahtinen --- tests/Makefile.sources | 1 - tests/gem_seqno_wrap.c | 483

[Intel-gfx] [PATCH] i-g-t/tests: Drop gem_seqno_wrap, gem_pin, gem_hangcheck_forcewake

2017-10-10 Thread Abdiel Janulgue
This improves the GEM tests section of I-G-T to make it more suitable for CI testing Cc: Joonas Lahtinen Signed-off-by: Abdiel Janulgue --- tests/Makefile.sources | 3 - tests/gem_hangcheck_forcewake.c | 123 -- tests/gem_pin.c | 248

Re: [Intel-gfx] [PATCH i-g-t 2/2] igt_core: Rework igt_system()

2017-09-25 Thread Abdiel Janulgue
of intel_l3_parity prepended by [cmd], but that ended up > being printed again prepended by [cmd] because output was redirected, > causing outputs to appear multiple times. This patch fixes that. > > CC: Abdiel Janulgue > Signed-off-by: Petri Latvala Thanks for fixing this. Serie

Re: [Intel-gfx] [PATCH i-g-t] tools_test: Clean up and fix sysfs_l3_parity

2017-09-19 Thread Abdiel Janulgue
lla: https://bugs.freedesktop.org/show_bug.cgi?id=101650 > CC: Abdiel Janulgue > Signed-off-by: Petri Latvala Reviewed-by: Abdiel Janulgue > --- > tests/tools_test.c | 83 > ++ > 1 file changed, 46 insertions(+), 37 dele

Re: [Intel-gfx] [PATCH i-g-t] tests/tools_test: Make sure l3_parity is supported

2017-09-13 Thread Abdiel Janulgue
On 09/13/2017 01:10 PM, Petri Latvala wrote: > On Wed, Sep 13, 2017 at 12:24:18PM +0300, Abdiel Janulgue wrote: >> v3: Don't pipe the output of intel_l3_parity, parse it's output >> directly. (Petri) >> >> v2: Check support before executing test. >>

[Intel-gfx] [PATCH i-g-t] tests/tools_test: Make sure l3_parity is supported

2017-09-13 Thread Abdiel Janulgue
ned-off-by: Abdiel Janulgue --- tests/tools_test.c | 64 ++ 1 file changed, 36 insertions(+), 28 deletions(-) diff --git a/tests/tools_test.c b/tests/tools_test.c index 1baf60b..572d5f4 100644 --- a/tests/tools_test.c +++ b/tests/tools_test.c @@ -27

  1   2   3   >