[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 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 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

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 > --- >

[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

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

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

[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 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 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 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 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 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 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 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 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 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 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 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

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 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 ++-

[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 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 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-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 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 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

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 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

[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 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

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 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 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 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 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 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

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

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 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

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

[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

[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-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

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 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

[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

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

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 > ===

[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

[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 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

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 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 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 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] 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] 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 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 >

[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

[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

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) >>

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

[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 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] 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 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

Re: [Intel-gfx] [i-g-t PATCH 2/2] lib/tests: Add kmstest_edid_add_* selftests

2017-04-13 Thread Abdiel Janulgue
On 30.03.2017 11:09, Abdiel Janulgue wrote: > Sanity check the edid block generation capabilities. > > Cc: Petri Latvala Ping! > Signed-off-by: Abdiel Janulgue > --- > lib/tests/Makefile.sources | 1 + > lib/tests/i

[Intel-gfx] [i-g-t PATCH 1/4] lib/igt_core: Add igt_exec helpers

2017-04-20 Thread Abdiel Janulgue
Support executing external processes with the goal of capturing its standard streams to the igt logging infrastructure in addition to its exit status. Cc: Daniel Vetter Cc: Petri Latvala Signed-off-by: Abdiel Janulgue --- lib/igt_core.c | 151

[Intel-gfx] [i-g-t PATCH 4/4] Convert shell script tests to C version

2017-04-20 Thread Abdiel Janulgue
Vetter Cc: Petri Latvala Signed-off-by: Abdiel Janulgue --- tests/Makefile.sources | 9 +--- tests/ZZ_check_dmesg | 11 - tests/check_drm_clients | 6 --- tests/debugfs.c | 75 tests/debugfs_emon_crash | 16 --- tests/debugfs_wedged

[Intel-gfx] [i-g-t PATCH 2/4] igt/igt_core: Provide an option to check for the log buffer contents

2017-04-20 Thread Abdiel Janulgue
Signed-off-by: Abdiel Janulgue --- lib/igt_core.c | 24 lib/igt_core.h | 3 +++ 2 files changed, 27 insertions(+) diff --git a/lib/igt_core.c b/lib/igt_core.c index 8a7ba0d..e80a32a 100644 --- a/lib/igt_core.c +++ b/lib/igt_core.c @@ -329,6 +329,30 @@ static void

[Intel-gfx] [i-g-t PATCH 3/4] lib/igt_debugfs: Add helper to return path to device.

2017-04-20 Thread Abdiel Janulgue
Signed-off-by: Abdiel Janulgue --- lib/igt_debugfs.c | 26 ++ lib/igt_debugfs.h | 1 + 2 files changed, 27 insertions(+) diff --git a/lib/igt_debugfs.c b/lib/igt_debugfs.c index 7584be5..b019c3b 100644 --- a/lib/igt_debugfs.c +++ b/lib/igt_debugfs.c @@ -22,6 +22,9

Re: [Intel-gfx] [i-g-t PATCH v4 1/2] lib/igt_kms: Add support for 4K and audio HDMI EDID injection.

2017-04-20 Thread Abdiel Janulgue
On 19.04.2017 11:13, Petri Latvala wrote: > > The only Intel-specific part I can spot is that one chunk where you > check for at-least-hsw. Is that so you can properly report skip > instead of fail? It would be good to make this all suitable for > non-Intel hw. > That is meant to report skip

Re: [Intel-gfx] [PATCH i-g-t v2] tests/meta_test: Add a meta test for sanity checks of CI systems

2017-04-24 Thread Abdiel Janulgue
On 19.04.2017 13:13, Marta Lofstedt wrote: > + > +__attribute__((format(printf, 1, 2))) > +static void kmsg(const char *format, ...) > +#define KERN_EMER"<0>" > +#define KERN_ALERT "<1>" > +#define KERN_CRIT"<2>" > +#define KERN_ERR "<3>" > +#define KERN_WARNING "<4>" > +#define KERN_

[Intel-gfx] [i-g-t PATCH] Convert ddx_intel_after_fbdev to C.

2017-04-25 Thread Abdiel Janulgue
Signed-off-by: Abdiel Janulgue --- tests/Makefile.sources| 1 + tests/ddx_intel_after_fbdev | 73 - tests/ddx_intel_after_fbdev.c | 121 ++ 3 files changed, 122 insertions(+), 73 deletions(-) delete mode 100755 tests

Re: [Intel-gfx] [i-g-t PATCH 1/4] lib/igt_core: Add igt_exec helpers

2017-05-10 Thread Abdiel Janulgue
On 09.05.2017 13:18, Petri Latvala wrote: snip 8< - >> +memset(buf, 0, sizeof(buf)); >> +while (read(current->read_fd, buf, sizeof(buf)) > 0) { >> +if (current->redirected) { >> +if (!unredirect_output(current)) >> +

  1   2   3   >