Re: [Intel-gfx] [PATCH] drm/i915/userptr: Probe existence of backing struct pages upon creation

2021-07-26 Thread Maarten Lankhorst
gt; - Move the param next to all the other params which just return true. > > Testcase: igt/gem_userptr_blits/probe > Signed-off-by: Chris Wilson > Signed-off-by: Matthew Auld > Cc: Thomas Hellström > Cc: Maarten Lankhorst > Cc: Tvrtko Ursulin > Cc: Jordan Justen > Cc: Ke

Re: [PATCH] drm/i915/userptr: Probe existence of backing struct pages upon creation

2021-07-26 Thread Maarten Lankhorst
gt; - Move the param next to all the other params which just return true. > > Testcase: igt/gem_userptr_blits/probe > Signed-off-by: Chris Wilson > Signed-off-by: Matthew Auld > Cc: Thomas Hellström > Cc: Maarten Lankhorst > Cc: Tvrtko Ursulin > Cc: Jordan Justen > Cc: Ke

[Intel-gfx] [PULL] drm-misc-next

2021-07-22 Thread Maarten Lankhorst
drm-misc-next-2021-07-22: drm-misc-next for v5.15-rc1: UAPI Changes: - Remove sysfs stats for dma-buf attachments, as it causes a performance regression. Previous merge is not in a rc kernel yet, so no userspace regression possible. Cross-subsystem Changes: - Sanitize user input in kyro's

[PULL] drm-misc-next

2021-07-22 Thread Maarten Lankhorst
drm-misc-next-2021-07-22: drm-misc-next for v5.15-rc1: UAPI Changes: - Remove sysfs stats for dma-buf attachments, as it causes a performance regression. Previous merge is not in a rc kernel yet, so no userspace regression possible. Cross-subsystem Changes: - Sanitize user input in kyro's

[PULL] drm-misc-next

2021-07-22 Thread Maarten Lankhorst
drm-misc-next-2021-07-22: drm-misc-next for v5.15-rc1: UAPI Changes: - Remove sysfs stats for dma-buf attachments, as it causes a performance regression. Previous merge is not in a rc kernel yet, so no userspace regression possible. Cross-subsystem Changes: - Sanitize user input in kyro's

Re: [Intel-gfx] [PATCH v2] drm/i915: Add missing docbook chapters for i915 uapi.

2021-07-20 Thread Maarten Lankhorst
Op 16-07-2021 om 15:07 schreef Tvrtko Ursulin: > > On 15/07/2021 13:08, Maarten Lankhorst wrote: >> I noticed when grepping for DOC: that those were defined >> in the header, but not actually used. Fix it by removing >> all chapters and the internal annotation, so the docbo

[Intel-gfx] [PULL] drm-misc-next

2021-07-16 Thread Maarten Lankhorst
915/dpcd_bl: Return early in vesa_calc_max_backlight if we can't read PWMGEN_BIT_COUNT drm/i915/dpcd_bl: Print return codes for VESA backlight failures drm/dp: Extract i915's eDP backlight code into DRM helpers drm/nouveau/kms/nv50-: Add basic DPCD backlight support for nouveau Maarten

[PULL] drm-misc-next

2021-07-16 Thread Maarten Lankhorst
915/dpcd_bl: Return early in vesa_calc_max_backlight if we can't read PWMGEN_BIT_COUNT drm/i915/dpcd_bl: Print return codes for VESA backlight failures drm/dp: Extract i915's eDP backlight code into DRM helpers drm/nouveau/kms/nv50-: Add basic DPCD backlight support for nouveau Maarten

[PULL] drm-misc-next

2021-07-16 Thread Maarten Lankhorst
915/dpcd_bl: Return early in vesa_calc_max_backlight if we can't read PWMGEN_BIT_COUNT drm/i915/dpcd_bl: Print return codes for VESA backlight failures drm/dp: Extract i915's eDP backlight code into DRM helpers drm/nouveau/kms/nv50-: Add basic DPCD backlight support for nouveau Maarten

Re: [Intel-gfx] [PATCH v2] drm/i915: Add missing docbook chapters for i915 uapi.

2021-07-16 Thread Maarten Lankhorst
Op 15-07-2021 om 14:19 schreef Matthew Auld: > On Thu, 15 Jul 2021 at 13:08, Maarten Lankhorst > wrote: >> I noticed when grepping for DOC: that those were defined >> in the header, but not actually used. Fix it by removing >> all chapters and the internal annotation, so

Re: [PATCH 2/4] drm/i915/uapi: convert drm_i915_gem_userptr to kernel doc

2021-07-15 Thread Maarten Lankhorst
Op 15-07-2021 om 12:15 schreef Matthew Auld: > Add the missing kernel-doc. > > Signed-off-by: Matthew Auld > Cc: Thomas Hellström > Cc: Maarten Lankhorst > Cc: Tvrtko Ursulin > Cc: Jordan Justen > Cc: Kenneth Graunke > Cc: Jason Ekstrand > Cc: Dan

Re: [Intel-gfx] [PATCH 2/4] drm/i915/uapi: convert drm_i915_gem_userptr to kernel doc

2021-07-15 Thread Maarten Lankhorst
Op 15-07-2021 om 12:15 schreef Matthew Auld: > Add the missing kernel-doc. > > Signed-off-by: Matthew Auld > Cc: Thomas Hellström > Cc: Maarten Lankhorst > Cc: Tvrtko Ursulin > Cc: Jordan Justen > Cc: Kenneth Graunke > Cc: Jason Ekstrand > Cc: Dan

[Intel-gfx] [PATCH v2] drm/i915: Add missing docbook chapters for i915 uapi.

2021-07-15 Thread Maarten Lankhorst
I noticed when grepping for DOC: that those were defined in the header, but not actually used. Fix it by removing all chapters and the internal annotation, so the docbook generated chapters are used. Changes since v1: - Just remove the chapters, no need for those. Signed-off-by: Maarten

Re: [Intel-gfx] [PATCH] drm/i915: Add TTM offset argument to mmap.

2021-07-14 Thread Maarten Lankhorst
Op 14-07-2021 om 18:17 schreef Jason Ekstrand: > On Wed, Jul 14, 2021 at 5:03 AM Maarten Lankhorst > wrote: >> The FIXED mapping is only used for ttm, and tells userspace that the >> mapping type is pre-defined. This disables the other type of mmap >> offsets when discret

[Intel-gfx] [PATCH v2 resent] drm/i915: Add TTM offset argument to mmap.

2021-07-14 Thread Maarten Lankhorst
-by: Daniel Vetter Signed-off-by: Maarten Lankhorst --- Resent, forgot to cc dri-devel drivers/gpu/drm/i915/gem/i915_gem_mman.c | 17 ++- .../gpu/drm/i915/gem/i915_gem_object_types.h | 1 + .../drm/i915/gem/selftests/i915_gem_mman.c| 27 ++- include/uapi/drm/i915_drm.h

[PATCH v2 resent] drm/i915: Add TTM offset argument to mmap.

2021-07-14 Thread Maarten Lankhorst
-by: Daniel Vetter Signed-off-by: Maarten Lankhorst --- Resent, forgot to cc dri-devel drivers/gpu/drm/i915/gem/i915_gem_mman.c | 17 ++- .../gpu/drm/i915/gem/i915_gem_object_types.h | 1 + .../drm/i915/gem/selftests/i915_gem_mman.c| 27 ++- include/uapi/drm/i915_drm.h

[Intel-gfx] [PATCH] drm/i915: Add TTM offset argument to mmap.

2021-07-14 Thread Maarten Lankhorst
-by: Daniel Vetter Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gem/i915_gem_mman.c | 17 ++- .../gpu/drm/i915/gem/i915_gem_object_types.h | 1 + .../drm/i915/gem/selftests/i915_gem_mman.c| 27 ++- include/uapi/drm/i915_drm.h | 46

Re: [Intel-gfx] [PATCH] drm/i915: Add TTM offset argument to mmap.

2021-07-09 Thread Maarten Lankhorst
Op 09-07-2021 om 11:30 schreef Matthew Auld: > On Mon, 5 Jul 2021 at 15:36, Matthew Auld > wrote: >> On Thu, 1 Jul 2021 at 12:50, Maarten Lankhorst >> wrote: >>> Op 01-07-2021 om 13:42 schreef Maarten Lankhorst: >>>> This is only used for ttm, an

[PATCH v2] drm/i915: Add TTM offset argument to mmap.

2021-07-09 Thread Maarten Lankhorst
. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gem/i915_gem_mman.c | 17 ++- .../gpu/drm/i915/gem/i915_gem_object_types.h | 1 + .../drm/i915/gem/selftests/i915_gem_mman.c| 27 +- include/uapi/drm/i915_drm.h | 51 +++ 4 files

[Intel-gfx] [PATCH v2] drm/i915: Add TTM offset argument to mmap.

2021-07-09 Thread Maarten Lankhorst
. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gem/i915_gem_mman.c | 17 ++- .../gpu/drm/i915/gem/i915_gem_object_types.h | 1 + .../drm/i915/gem/selftests/i915_gem_mman.c| 27 +- include/uapi/drm/i915_drm.h | 51 +++ 4 files

[Intel-gfx] [PATCH] drm/i915: Add missing docbook chapters for i915 uapi.

2021-07-09 Thread Maarten Lankhorst
I noticed when grepping for DOC: that those were defined in the header, but not actually used. Fix it. Signed-off-by: Maarten Lankhorst --- Documentation/gpu/driver-uapi.rst | 12 1 file changed, 12 insertions(+) diff --git a/Documentation/gpu/driver-uapi.rst b/Documentation/gpu

Re: [Intel-gfx] [PATCH] drm/i915: Add TTM offset argument to mmap.

2021-07-01 Thread Maarten Lankhorst
Op 01-07-2021 om 13:42 schreef Maarten Lankhorst: > This is only used for ttm, and tells userspace that the mapping type is > ignored. This disables the other type of mmap offsets when discrete > memory is used, so fix the selftests as well. > > Signed-off-by: Maarten Lankhorst &

[Intel-gfx] [PATCH] drm/i915: Add TTM offset argument to mmap.

2021-07-01 Thread Maarten Lankhorst
This is only used for ttm, and tells userspace that the mapping type is ignored. This disables the other type of mmap offsets when discrete memory is used, so fix the selftests as well. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gem/i915_gem_mman.c | 17 +++- .../gpu

Re: [Intel-gfx] [PATCH] drm/i915/gt: Fix -EDEADLK handling regression

2021-07-01 Thread Maarten Lankhorst
f we really cared about preserving this we could of course convert > back to -EDEADLK higher up, but doesn't seem like that's worth > the hassle here. > > Not quite sure which commit specifically broke this, but I'll > just attribute it to the general gem ww mutex work. > > Cc: s

Re: [Intel-gfx] [PATCH v2] drm/i915: Reinstate the mmap ioctl for some platforms

2021-06-25 Thread Maarten Lankhorst
Op 24-06-2021 om 14:04 schreef Daniel Vetter: > On Thu, Jun 24, 2021 at 1:29 PM Thomas Hellström > wrote: >> Reinstate the mmap ioctl for all current integrated platforms. >> The intention was really to have it disabled for discrete graphics >> where we enforce a single mmap mode. >> >> Fixes:

Re: [Intel-gfx] [PATCH v2] drm/i915: Reinstate the mmap ioctl for some platforms

2021-06-25 Thread Maarten Lankhorst
Op 24-06-2021 om 14:04 schreef Daniel Vetter: > On Thu, Jun 24, 2021 at 1:29 PM Thomas Hellström > wrote: >> Reinstate the mmap ioctl for all current integrated platforms. >> The intention was really to have it disabled for discrete graphics >> where we enforce a single mmap mode. >> >> Fixes:

Re: [PATCH] drm/i915/eb: Fix pagefault disabling in the first slowpath

2021-06-21 Thread Maarten Lankhorst
ing calls. >> >> The entire slowpath was then furthermore ditched in >> >> commit 7dc8f1143778a35b190f9413f228b3cf28f67f8d >> Author: Chris Wilson >> Date:   Wed Mar 11 16:03:10 2020 + >> >> drm/i915/gem: Drop relocation slowpath >> >

Re: [Intel-gfx] [PATCH] drm/i915/eb: Fix pagefault disabling in the first slowpath

2021-06-21 Thread Maarten Lankhorst
ing calls. >> >> The entire slowpath was then furthermore ditched in >> >> commit 7dc8f1143778a35b190f9413f228b3cf28f67f8d >> Author: Chris Wilson >> Date:   Wed Mar 11 16:03:10 2020 + >> >> drm/i915/gem: Drop relocation slowpath >> >

Re: [Intel-gfx] [PATCH 1/3] drm/i915/gt: Do not allow setting ring size for legacy ring submission

2021-06-21 Thread Maarten Lankhorst
Op 21-06-2021 om 15:20 schreef Tvrtko Ursulin: > > On 21/06/2021 14:12, Tvrtko Ursulin wrote: >> >> On 21/06/2021 14:07, Maarten Lankhorst wrote: >>> Op 21-06-2021 om 14:52 schreef Tvrtko Ursulin: >>>> >>>> On 21/06/2021 13:08, Tvrtko Ursulin wr

Re: [Intel-gfx] [PATCH 1/3] drm/i915/gt: Do not allow setting ring size for legacy ring submission

2021-06-21 Thread Maarten Lankhorst
Op 21-06-2021 om 14:52 schreef Tvrtko Ursulin: > > On 21/06/2021 13:08, Tvrtko Ursulin wrote: >> >> I had some questions on the trybot mailing list, let me copy >> >> On 21/06/2021 12:41, Maarten Lankhorst wrote: >>> It doesn't work for legacy ring submissi

Re: [Intel-gfx] [PATCH 1/3] drm/i915/gt: Do not allow setting ring size for legacy ring submission

2021-06-21 Thread Maarten Lankhorst
Op 21-06-2021 om 14:08 schreef Tvrtko Ursulin: > > I had some questions on the trybot mailing list, let me copy > > On 21/06/2021 12:41, Maarten Lankhorst wrote: >> It doesn't work for legacy ring submission, and is in the best case >> ignored. > > Looks rejected inst

[Intel-gfx] [PATCH 1/3] drm/i915/gt: Do not allow setting ring size for legacy ring submission

2021-06-21 Thread Maarten Lankhorst
It doesn't work for legacy ring submission, and is in the best case ignored. In the worst case we end up freeing engine->legacy.ring for all other active engines, resulting in a use-after-free. Signed-off-by: Maarten Lankhorst Fixes: 88be76cdafc7 ("drm/i915: Allow userspace to specify

[Intel-gfx] [PATCH 3/3] drm/i915: Remove intel_context->ops->(pre_pin/post_unpin)

2021-06-21 Thread Maarten Lankhorst
Now that intel_context->pin_mutex is gone, the reason for splitting pre_pin/post_unpin ops is also gone. Remove those ops, and handle this detail inside guc/execlists submission only. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gt/intel_context.c | 19 ++- drivers/

[Intel-gfx] [PATCH 2/3] drm/i915: Use intel_context->pin_mutex only for context allocation

2021-06-21 Thread Maarten Lankhorst
Rename pin_mutex to alloc_mutex, and only use it for context allocation. This will allow us to simplify __intel_context_do_pin_ww, which no longer needs to run the pre_pin callback separately. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gt/intel_context.c | 40

Re: [PATCH] drm/i915: Perform execbuffer object locking as a separate step

2021-06-17 Thread Maarten Lankhorst
m_i915_gem_exec_object2 *entry = >exec[i]; > + struct eb_vma *ev = >vma[i]; > + struct i915_vma *vma = ev->vma; > > err = eb_pin_vma(eb, entry, ev); > if (err == -EDEADLK) Reviewed-by: Maarten Lankhorst

Re: [Intel-gfx] [PATCH] drm/i915: Perform execbuffer object locking as a separate step

2021-06-17 Thread Maarten Lankhorst
m_i915_gem_exec_object2 *entry = >exec[i]; > + struct eb_vma *ev = >vma[i]; > + struct i915_vma *vma = ev->vma; > > err = eb_pin_vma(eb, entry, ev); > if (err == -EDEADLK) Reviewed-by: Maarten Lankhorst ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Re: [Intel-gfx] [PATCH v4 03/12] drm/i915: Introduce a ww transaction helper

2021-06-16 Thread Maarten Lankhorst
Op 15-06-2021 om 15:14 schreef Thomas Hellström: > Introduce a for_i915_gem_ww(){} utility to help make the code > around a ww transaction more readable. > > Signed-off-by: Thomas Hellström > Reviewed-by: Matthew Auld > --- > drivers/gpu/drm/i915/i915_gem_ww.h | 31

Re: [Intel-gfx] [PATCH] drm/i915/ttm: Fix memory leaks

2021-06-15 Thread Maarten Lankhorst
> kfree(i915_tt); > } > > @@ -217,6 +218,7 @@ static void i915_ttm_delete_mem_notify(struct > ttm_buffer_object *bo) > > if (likely(obj)) { > /* This releases all gem object bindings to the backend. */ > + i915_ttm_free_cached_io_st(obj

Re: [PATCH] drm/i915/ttm: Fix memory leaks

2021-06-15 Thread Maarten Lankhorst
> kfree(i915_tt); > } > > @@ -217,6 +218,7 @@ static void i915_ttm_delete_mem_notify(struct > ttm_buffer_object *bo) > > if (likely(obj)) { > /* This releases all gem object bindings to the backend. */ > + i915_ttm_free_cached_io_st(obj); > __i915_gem_free_object(obj); > } > } Reviewed-by: Maarten Lankhorst

Re: [Intel-gfx] [PATCH] drm/i915: allow DG1 autoprobe for CONFIG_BROKEN

2021-06-14 Thread Maarten Lankhorst
_s_info), > INTEL_ADLP_IDS(_p_info), > +#if IS_ENABLED(CONFIG_DRM_I915_UNSTABLE_FAKE_LMEM) > + INTEL_DG1_IDS(_info), > +#endif > {0, 0, 0} > }; > MODULE_DEVICE_TABLE(pci, pciidlist); Reviewed-by: Maarten Lankhorst

Re: [Intel-gfx] [PATCH] drm/i915: allow DG1 autoprobe for CONFIG_BROKEN

2021-06-14 Thread Maarten Lankhorst
_s_info), > INTEL_ADLP_IDS(_p_info), > +#if IS_ENABLED(CONFIG_DRM_I915_UNSTABLE_FAKE_LMEM) > + INTEL_DG1_IDS(_info), > +#endif > {0, 0, 0} > }; > MODULE_DEVICE_TABLE(pci, pciidlist); Reviewed-by: Maarten Lankhorst ___ Int

[PULL] topic/i915-ttm

2021-06-11 Thread Maarten Lankhorst
request for topic/i915-ttm: - Convert i915 lmem handling to ttm. - Add a patch to temporarily add a driver_private member to vma_node. - Use this to allow mixed object mmap handling for i915. Maarten Lankhorst (2): drm/vma: Add

[Intel-gfx] [PULL] topic/i915-ttm

2021-06-11 Thread Maarten Lankhorst
request for topic/i915-ttm: - Convert i915 lmem handling to ttm. - Add a patch to temporarily add a driver_private member to vma_node. - Use this to allow mixed object mmap handling for i915. Maarten Lankhorst (2): drm/vma: Add

[PULL] topic/i915-ttm

2021-06-11 Thread Maarten Lankhorst
request for topic/i915-ttm: - Convert i915 lmem handling to ttm. - Add a patch to temporarily add a driver_private member to vma_node. - Use this to allow mixed object mmap handling for i915. Maarten Lankhorst (2): drm/vma: Add

Re: [Intel-gfx] [PATCH V3] x86/gpu: add JasperLake to gen11 early quirks

2021-06-08 Thread Maarten Lankhorst
Op 08-06-2021 om 07:34 schreef Tejas Upadhyay: > Let's reserve JSL stolen memory for graphics. > > JasperLake is a gen11 platform which is compatible with > ICL/EHL changes. > > Required due to below reference patch: > > commit 24ea098b7c0d80b56d62a200608e0b029056baf6 > drm/i915/jsl: Split EHL/JSL

[Intel-gfx] [PATCH] drm/i915: Only set bind_async_flags when concurrent access wa is not active, v3.

2021-06-01 Thread Maarten Lankhorst
eld. Changes since v1: - Fix null pointer dereference when we forget to pass the work stash, it's still required to prealloc all on affected platforms. Changes since v2: - Clear bind_async_flags correctly on ggtt w/a. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gt/gen6_ppgtt.c

[Intel-gfx] [PATCH] drm/i915: Only set bind_async_flags when concurrent access wa is not active, v2.

2021-05-31 Thread Maarten Lankhorst
eld. Changes since v1: - Fix null pointer dereference when we forget to pass the work stash, it's still required to prealloc all on affected platforms. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gt/gen6_ppgtt.c | 4 +++- drivers/gpu/drm/i915/gt/gen8_ppgtt.c | 4 +++- drivers/gpu/

Re: [Intel-gfx] [PATCH] drm/i915: Disable gpu relocations

2021-05-27 Thread Maarten Lankhorst
relocations only" > > This code just disables gpu relocations, leaving the garbage > collection for later patches and more importantly, much less confusing > diff. Also given how much headaches this code has caused in the past, > letting this soak for a bit seems justified. > >

Re: [PATCH] drm/i915: Disable gpu relocations

2021-05-27 Thread Maarten Lankhorst
relocations only" > > This code just disables gpu relocations, leaving the garbage > collection for later patches and more importantly, much less confusing > diff. Also given how much headaches this code has caused in the past, > letting this soak for a bit seems justified. > >

Re: [Intel-gfx] [PATCH v4 15/15] drm/i915: Use ttm mmap handling for ttm bo's.

2021-05-27 Thread Maarten Lankhorst
Op 2021-05-26 om 19:40 schreef Thomas Hellström: > > On 5/26/21 1:32 PM, Thomas Hellström wrote: >> From: Maarten Lankhorst >> >> Use the ttm handlers for servicing page faults, and vm_access. >> >> We do our own validation of read-only access, other

Re: [PATCH v4 15/15] drm/i915: Use ttm mmap handling for ttm bo's.

2021-05-27 Thread Maarten Lankhorst
Op 2021-05-26 om 19:40 schreef Thomas Hellström: > > On 5/26/21 1:32 PM, Thomas Hellström wrote: >> From: Maarten Lankhorst >> >> Use the ttm handlers for servicing page faults, and vm_access. >> >> We do our own validation of read-only access, other

[Intel-gfx] [PATCH] drm/i915: Only set bind_async_flags when concurrent access wa is not active.

2021-05-25 Thread Maarten Lankhorst
Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gt/gen6_ppgtt.c | 4 +++- drivers/gpu/drm/i915/gt/gen8_ppgtt.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/gen6_ppgtt.c b/drivers/gpu/drm/i915/gt/gen6_ppgtt.c index 1aee5e6b1b23

Re: [PATCH v2 13/15] drm/ttm: Add BO and offset arguments for vm_access and vm_fault ttm handlers.

2021-05-18 Thread Maarten Lankhorst
Op 18-05-2021 om 17:07 schreef Christian König: > Am 18.05.21 um 16:55 schrieb Thomas Hellström: >> From: Maarten Lankhorst >> >> This allows other drivers that may not setup the vma in the same way >> to use the ttm bo helpers. > > Uff can you pl

Re: [Intel-gfx] [PATCH v2 09/15] drm/ttm, drm/amdgpu: Allow the driver some control over swapping

2021-05-18 Thread Maarten Lankhorst
wable(struct > ttm_buffer_object *bo, > *busy = !ret; > } > > + if (ret && place && !bo->bdev->funcs->eviction_valuable(bo, place)) { > + ret = false; > + if (locked) > + dma_resv_unlock(bo->base.

Re: [Intel-gfx] [PATCH v2 09/15] drm/ttm, drm/amdgpu: Allow the driver some control over swapping

2021-05-18 Thread Maarten Lankhorst
wable(struct > ttm_buffer_object *bo, > *busy = !ret; > } > > + if (ret && place && !bo->bdev->funcs->eviction_valuable(bo, place)) { > + ret = false; > + if (locked) > + dma_resv_unlock(bo->base.

Re: [PATCH v2 07/15] drm/ttm: Export ttm_bo_tt_destroy()

2021-05-18 Thread Maarten Lankhorst
/ttm/ttm_bo.c > @@ -1221,3 +1221,4 @@ void ttm_bo_tt_destroy(struct ttm_buffer_object *bo) > ttm_tt_destroy(bo->bdev, bo->ttm); > bo->ttm = NULL; > } > +EXPORT_SYMBOL(ttm_bo_tt_destroy); Looks sane, could we reorder the patches to put all ttm changes first? Reviewed-by: Maarten Lankhorst

Re: [Intel-gfx] [PATCH v2 07/15] drm/ttm: Export ttm_bo_tt_destroy()

2021-05-18 Thread Maarten Lankhorst
/ttm/ttm_bo.c > @@ -1221,3 +1221,4 @@ void ttm_bo_tt_destroy(struct ttm_buffer_object *bo) > ttm_tt_destroy(bo->bdev, bo->ttm); > bo->ttm = NULL; > } > +EXPORT_SYMBOL(ttm_bo_tt_destroy); Looks sane, could we reorder the pat

Re: [Intel-gfx] [PATCH v2 06/15] drm/i915/ttm: Embed a ttm buffer object in the i915 gem object

2021-05-18 Thread Maarten Lankhorst
m_buffer_object __do_not_access; > + }; > > const struct drm_i915_gem_object_ops *ops; > Considering Dave did roughly the same in his patches, I don't think there's a better way to do this. Although he just wrapped base.base using sizes. This works too. It probably needs someone els

Re: [PATCH v2 06/15] drm/i915/ttm: Embed a ttm buffer object in the i915 gem object

2021-05-18 Thread Maarten Lankhorst
m_buffer_object __do_not_access; > + }; > > const struct drm_i915_gem_object_ops *ops; > Considering Dave did roughly the same in his patches, I don't think there's a better way to do this. Although he just wrapped base.base using sizes. This works too. It probably needs someone else's r-b too, to ensure this is allowed. Acked-by: Maarten Lankhorst

Re: [Intel-gfx] [PATCH v2 02/15] drm/i915: Don't free shared locks while shared

2021-05-18 Thread Maarten Lankhorst
type and name makes it look generic, but if you try to use it with anything but an address space, it will blow up. Otherwise looks good. I guess we cannot force all bo's to be deleted before the vm is freed. :-) So with that fixed Reviewed-by: Maarten Lankhorst ~Maarten > union {

Re: [PATCH v2 02/15] drm/i915: Don't free shared locks while shared

2021-05-18 Thread Maarten Lankhorst
type and name makes it look generic, but if you try to use it with anything but an address space, it will blow up. Otherwise looks good. I guess we cannot force all bo's to be deleted before the vm is freed. :-) So with that fixed Reviewed-by: Maarten Lankhorst ~Maarten > union {

Re: [PATCH v2 01/15] drm/i915: Untangle the vma pages_mutex

2021-05-18 Thread Maarten Lankhorst
; - if (vma->obj) > - i915_gem_object_unpin_pages(vma->obj); > } > mutex_unlock(>pages_mutex); > + if (vma->obj) > + i915_gem_object_unpin_pages(vma->obj); You're unconditionally unpinning pages here, if pages_count wasn't dropped to 0, we will go negative. With that fixed: Reviewed-by: Maarten Lankhorst

Re: [Intel-gfx] [PATCH v2 01/15] drm/i915: Untangle the vma pages_mutex

2021-05-18 Thread Maarten Lankhorst
; - if (vma->obj) > - i915_gem_object_unpin_pages(vma->obj); > } > mutex_unlock(>pages_mutex); > + if (vma->obj) > + i915_gem_object_unpin_pages(vma->obj); You're unconditionally unpinning pages here, if pages_count wasn't dropped to 0, we will go negative. With that fixed: Reviewed-by: Maarten Lankhorst ___ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/intel-gfx

[Intel-gfx] [PATCH] drm/i915: Only set bind_async_flags when concurrent access wa is not active.

2021-05-10 Thread Maarten Lankhorst
Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gt/gen6_ppgtt.c | 4 +++- drivers/gpu/drm/i915/gt/gen8_ppgtt.c | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/gen6_ppgtt.c b/drivers/gpu/drm/i915/gt/gen6_ppgtt.c index 1aee5e6b1b23

Re: [Intel-gfx] Lockdep splat on drm-tip

2021-05-03 Thread Maarten Lankhorst
Op 03-05-2021 om 13:57 schreef Thomas Hellström: > Hi, Maarten, > > I saw this the other day while working on the TTM conversion: > > 5925.509765] BUG: sleeping function called from invalid context at > kernel/locking/mutex.c:928 > [ 5925.509769] in_atomic(): 1, irqs_disabled(): 1, non_block: 0,

Re: [Intel-gfx] [PATCH] drm/i915: Remove erroneous i915_is_ggtt check for I915_GEM_OBJECT_UNBIND_VM_TRYLOCK

2021-04-30 Thread Maarten Lankhorst
Op 29-04-2021 om 14:01 schreef Maarten Lankhorst: > We changed the locking hierarchy for both ppgtt and ggtt, so both locks > should be trylocked inside i915_gem_object_unbind(). > > Signed-off-by: Maarten Lankhorst > Fixes: bc6f80cce9ae ("drm/i915: Use trylock in shrinker

Re: [Intel-gfx] [PATCH 3/4] drm/i915: Pass ww ctx to pin_map, v2.

2021-04-29 Thread Maarten Lankhorst
Op 29-04-2021 om 16:55 schreef Matthew Auld: > On Thu, 29 Apr 2021 at 11:10, Maarten Lankhorst > wrote: >> This will allow us to explicitly pass the ww to pin_pages, >> when it starts taking it. >> >> This allows us to finally kill off the explicit passing of ww &g

Re: [Intel-gfx] [PATCH 3/4] drm/i915: Pass ww ctx to pin_map, v2.

2021-04-29 Thread Maarten Lankhorst
Op 29-04-2021 om 15:28 schreef Matthew Auld: > On Thu, 29 Apr 2021 at 11:10, Maarten Lankhorst > wrote: >> This will allow us to explicitly pass the ww to pin_pages, >> when it starts taking it. >> >> This allows us to finally kill off the explicit passing of ww &g

Re: [Intel-gfx] [PATCH 3/4] drm/i915: Pass ww ctx to pin_map, v2.

2021-04-29 Thread Maarten Lankhorst
Op 29-04-2021 om 15:28 schreef Matthew Auld: > On Thu, 29 Apr 2021 at 11:10, Maarten Lankhorst > wrote: >> This will allow us to explicitly pass the ww to pin_pages, >> when it starts taking it. >> >> This allows us to finally kill off the explicit passing of ww &g

[Intel-gfx] [PATCH] drm/i915: Remove erroneous i915_is_ggtt check for I915_GEM_OBJECT_UNBIND_VM_TRYLOCK

2021-04-29 Thread Maarten Lankhorst
We changed the locking hierarchy for both ppgtt and ggtt, so both locks should be trylocked inside i915_gem_object_unbind(). Signed-off-by: Maarten Lankhorst Fixes: bc6f80cce9ae ("drm/i915: Use trylock in shrinker for ggtt on bsw vt-d and bxt, v2.") Cc: Thomas Hellström --- drive

[Intel-gfx] [PATCH 4/4] drm/i915: Pass ww ctx to i915_gem_object_pin_pages, v2.

2021-04-29 Thread Maarten Lankhorst
This is the final part of passing ww ctx to the get_pages() callbacks. Now we no longer have to implicitly get ww ctx by using get_ww_ctx. Changes since v1: - Fix error handling in pin_map_unlocked(). Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/display/intel_display.c | 2

[Intel-gfx] [PATCH 3/4] drm/i915: Pass ww ctx to pin_map, v2.

2021-04-29 Thread Maarten Lankhorst
This will allow us to explicitly pass the ww to pin_pages, when it starts taking it. This allows us to finally kill off the explicit passing of ww by retrieving it from the obj. Changes since v1: - Rename 'ret' to ptr, fix error handling of return ptr. Signed-off-by: Maarten Lankhorst

[Intel-gfx] [PATCH 1/4] drm/i915: Add ww parameter to get_pages() callback

2021-04-29 Thread Maarten Lankhorst
We will need this to support eviction with lmem, so explicitly pass ww as a parameter. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gem/i915_gem_dmabuf.c | 3 ++- drivers/gpu/drm/i915/gem/i915_gem_internal.c | 3 ++- drivers/gpu/drm/i915/gem

[Intel-gfx] [PATCH 2/4] drm/i915: Add ww context to prepare_(read/write)

2021-04-29 Thread Maarten Lankhorst
This will allow us to explicitly pass the ww to pin_pages, when it starts taking it. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gem/i915_gem_domain.c | 2 ++ drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 7 --- drivers/gpu/drm/i915/gem

[Intel-gfx] [PATCH 0/4] drm/i915: Propagate ww parameter to get_pages().

2021-04-29 Thread Maarten Lankhorst
For TTM eviction we may need to retrieve the ww parameter, to ensure we can lock extra objects while evicting. Pass along the struct i915_gem_ww_ctx, so this can be done. Maarten Lankhorst (4): drm/i915: Add ww parameter to get_pages() callback drm/i915: Add ww context to prepare_(read/write

[Intel-gfx] [PATCH] drm/i915: Use trylock in shrinker for ggtt on bsw vt-d and bxt, v2.

2021-04-26 Thread Maarten Lankhorst
e_driver_attach+0x50/0x50 <4>[ 462.602099] ? device_driver_attach+0x50/0x50 <4>[ 462.602107] bus_for_each_dev+0x75/0xc0 <4>[ 462.602116] bus_add_driver+0x14b/0x1f0 <4>[ 462.602124] driver_register+0x66/0xb0 <4>[ 462.602133] i915_init+0x70/0x87 [i915] &

Re: [Intel-gfx] [PATCH] drm/i915: Fix docbook descriptions for i915_cmd_parser

2021-04-23 Thread Maarten Lankhorst
Op 22-04-2021 om 10:18 schreef Daniel Vetter: > On Wed, Apr 21, 2021 at 04:39:10PM +0200, Maarten Lankhorst wrote: >> Op 21-04-2021 om 16:32 schreef Daniel Vetter: >>> On Wed, Apr 21, 2021 at 2:03 PM Maarten Lankhorst >>> wrote: >>>> Fixes the following

Re: [PATCH] drm/i915: Fix docbook descriptions for i915_cmd_parser

2021-04-23 Thread Maarten Lankhorst
Op 22-04-2021 om 10:18 schreef Daniel Vetter: > On Wed, Apr 21, 2021 at 04:39:10PM +0200, Maarten Lankhorst wrote: >> Op 21-04-2021 om 16:32 schreef Daniel Vetter: >>> On Wed, Apr 21, 2021 at 2:03 PM Maarten Lankhorst >>> wrote: >>>> Fixes the following

Re: [Intel-gfx] [PATCH 1/2] drm: Rename DP_PSR_SELECTIVE_UPDATE to better mach eDP spec

2021-04-23 Thread Maarten Lankhorst
Op 22-04-2021 om 13:00 schreef Mun, Gwan-gyeong: > The changed name looks more accurate to the edp 1.4b spec. > Looks good to me. > > Reviewed-by: Gwan-gyeong Mun > > On Wed, 2021-04-21 at 15:02 -0700, José Roberto de Souza wrote: >> DP_PSR_EN_CFG bit 5 aka "Selective Update Region Scan Line

Re: [Intel-gfx] [PATCH 1/2] drm: Rename DP_PSR_SELECTIVE_UPDATE to better mach eDP spec

2021-04-23 Thread Maarten Lankhorst
Op 22-04-2021 om 13:00 schreef Mun, Gwan-gyeong: > The changed name looks more accurate to the edp 1.4b spec. > Looks good to me. > > Reviewed-by: Gwan-gyeong Mun > > On Wed, 2021-04-21 at 15:02 -0700, José Roberto de Souza wrote: >> DP_PSR_EN_CFG bit 5 aka "Selective Update Region Scan Line

Re: [PATCH] drm/i915: Fix docbook descriptions for i915_cmd_parser

2021-04-21 Thread Maarten Lankhorst
Op 21-04-2021 om 16:32 schreef Daniel Vetter: > On Wed, Apr 21, 2021 at 2:03 PM Maarten Lankhorst > wrote: >> Fixes the following htmldocs warnings: >> drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Excess function >> parameter 'trampoline' description in

Re: [Intel-gfx] [PATCH] drm/i915: Fix docbook descriptions for i915_cmd_parser

2021-04-21 Thread Maarten Lankhorst
Op 21-04-2021 om 16:32 schreef Daniel Vetter: > On Wed, Apr 21, 2021 at 2:03 PM Maarten Lankhorst > wrote: >> Fixes the following htmldocs warnings: >> drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Excess function >> parameter 'trampoline' description in

[PATCH] drm/i915: Fix docbook descriptions for i915_gem_shrinker

2021-04-21 Thread Maarten Lankhorst
Fixes the following htmldocs warning: drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:102: warning: Function parameter or member 'ww' not described in 'i915_gem_shrink' Fixes: cf41a8f1dc1e ("drm/i915: Finally remove obj->mm.lock.") Reported-by: Stephen Rothwell Signed-off-by: Maar

[Intel-gfx] [PATCH] drm/i915: Fix docbook descriptions for i915_gem_shrinker

2021-04-21 Thread Maarten Lankhorst
Fixes the following htmldocs warning: drivers/gpu/drm/i915/gem/i915_gem_shrinker.c:102: warning: Function parameter or member 'ww' not described in 'i915_gem_shrink' Fixes: cf41a8f1dc1e ("drm/i915: Finally remove obj->mm.lock.") Reported-by: Stephen Rothwell Signed-off-by: Maar

[PATCH] drm/i915: Fix docbook descriptions for i915_cmd_parser

2021-04-21 Thread Maarten Lankhorst
' drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Excess function parameter 'trampoline' description in 'intel_engine_cmd_parser' Reported-by: Stephen Rothwell Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/i915_cmd_parser.c | 16 +++- 1 file changed, 15 insertions

[Intel-gfx] [PATCH] drm/i915: Fix docbook descriptions for i915_cmd_parser

2021-04-21 Thread Maarten Lankhorst
' drivers/gpu/drm/i915/i915_cmd_parser.c:1420: warning: Excess function parameter 'trampoline' description in 'intel_engine_cmd_parser' Reported-by: Stephen Rothwell Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/i915_cmd_parser.c | 16 +++- 1 file changed, 15 insertions

[PATCH 2/2] drm/i915: Use trylock in shrinker for ggtt on bsw vt-d and bxt, v2.

2021-04-20 Thread Maarten Lankhorst
e_driver_attach+0x50/0x50 <4>[ 462.602099] ? device_driver_attach+0x50/0x50 <4>[ 462.602107] bus_for_each_dev+0x75/0xc0 <4>[ 462.602116] bus_add_driver+0x14b/0x1f0 <4>[ 462.602124] driver_register+0x66/0xb0 <4>[ 462.602133] i915_init+0x70/0x87 [i915] &

[Intel-gfx] [PATCH 1/2] drm/i915: Remove asynchronous vma binding

2021-04-20 Thread Maarten Lankhorst
ry allocation inside stop_machine is allowed. This patch does not fix that lockdep splat yet, but will allow the next patch to remove it. Signed-off-by: Maarten Lankhorst Acked-by: Daniel Vetter --- drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 3 - drivers/gpu/drm/i915/gt/gen6_ppgtt.c | 1 -

[Intel-gfx] [PATCH 2/2] drm/i915: Use trylock in shrinker for ggtt on bsw vt-d and bxt, v2.

2021-04-20 Thread Maarten Lankhorst
e_driver_attach+0x50/0x50 <4>[ 462.602099] ? device_driver_attach+0x50/0x50 <4>[ 462.602107] bus_for_each_dev+0x75/0xc0 <4>[ 462.602116] bus_add_driver+0x14b/0x1f0 <4>[ 462.602124] driver_register+0x66/0xb0 <4>[ 462.602133] i915_init+0x70/0x87 [i915] &

[PATCH 1/2] drm/i915: Remove asynchronous vma binding

2021-04-20 Thread Maarten Lankhorst
ry allocation inside stop_machine is allowed. This patch does not fix that lockdep splat yet, but will allow the next patch to remove it. Signed-off-by: Maarten Lankhorst Acked-by: Daniel Vetter --- drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 3 - drivers/gpu/drm/i915/gt/gen6_ppgtt.c | 1 -

[Intel-gfx] [PATCH 1/2] drm/i915: Remove asynchronous vma binding

2021-04-12 Thread Maarten Lankhorst
ry allocation inside stop_machine is allowed. This patch does not fix that lockdep splat yet, but will allow the next patch to remove it. Signed-off-by: Maarten Lankhorst Acked-by: Daniel Vetter --- drivers/gpu/drm/i915/gem/i915_gem_stolen.c | 3 - drivers/gpu/drm/i915/gt/gen6_ppgtt.c | 1 -

[Intel-gfx] [PATCH 2/2] drm/i915: Use trylock in shrinker for ggtt on bsw vt-d and bxt.

2021-04-12 Thread Maarten Lankhorst
restore+0x3d/0x60 <4>[ 462.602047] pci_device_probe+0x9e/0x110 <4>[ 462.602057] really_probe+0xea/0x410 <4>[ 462.602067] driver_probe_device+0xd9/0x140 <4>[ 462.602075] device_driver_attach+0x4a/0x50 <4>[ 462.602084] __driver_attach+0x83/0x140 <4>[ 462.

[Intel-gfx] [PATCH 0/2] drm/i915: Fix for BSW and BXT vt-d.

2021-04-12 Thread Maarten Lankhorst
There's a lockdep splat that currently prevents booting on CI, fix it. Maarten Lankhorst (2): drm/i915: Remove asynchronous vma binding drm/i915: Use trylock in shrinker for ggtt on bsw vt-d and bxt. drivers/gpu/drm/i915/gem/i915_gem_shrinker.c | 13 +- drivers/gpu/drm/i915/gem

[PULL] drm-misc-fixes

2021-04-09 Thread Maarten Lankhorst
drm-misc-fixes-2021-04-09: drm-misc-fixes for v5.12-rc7: - Fix use-after-free in xen. - Reduce fifo threshold on hvs4 to fix a fifo full error. - Disable TE support for Droid4 and N950. - Small compiler fixes. The following changes since commit 50891bead80bc79871528c2962d65c781c02330b:

[Intel-gfx] [PULL] drm-misc-fixes

2021-04-09 Thread Maarten Lankhorst
drm-misc-fixes-2021-04-09: drm-misc-fixes for v5.12-rc7: - Fix use-after-free in xen. - Reduce fifo threshold on hvs4 to fix a fifo full error. - Disable TE support for Droid4 and N950. - Small compiler fixes. The following changes since commit 50891bead80bc79871528c2962d65c781c02330b:

[PULL] drm-misc-fixes

2021-04-09 Thread Maarten Lankhorst
drm-misc-fixes-2021-04-09: drm-misc-fixes for v5.12-rc7: - Fix use-after-free in xen. - Reduce fifo threshold on hvs4 to fix a fifo full error. - Disable TE support for Droid4 and N950. - Small compiler fixes. The following changes since commit 50891bead80bc79871528c2962d65c781c02330b:

[Intel-gfx] [PULL] drm-misc-fixes

2021-03-25 Thread Maarten Lankhorst
drm-misc-fixes-2021-03-25: drm-misc-fixes for v5.12: - Use FOLL_FORCE and FOLL_LONGTERM in etnaviv The following changes since commit 6909115442759efef3d4bc5d9c54d7943f1afc14: drm/omap: dsi: fix unsigned expression compared with zero (2021-03-17 13:59:23 +0200) are available in the Git

[PULL] drm-misc-fixes

2021-03-25 Thread Maarten Lankhorst
drm-misc-fixes-2021-03-25: drm-misc-fixes for v5.12: - Use FOLL_FORCE and FOLL_LONGTERM in etnaviv The following changes since commit 6909115442759efef3d4bc5d9c54d7943f1afc14: drm/omap: dsi: fix unsigned expression compared with zero (2021-03-17 13:59:23 +0200) are available in the Git

[PULL] drm-misc-fixes

2021-03-25 Thread Maarten Lankhorst
drm-misc-fixes-2021-03-25: drm-misc-fixes for v5.12: - Use FOLL_FORCE and FOLL_LONGTERM in etnaviv The following changes since commit 6909115442759efef3d4bc5d9c54d7943f1afc14: drm/omap: dsi: fix unsigned expression compared with zero (2021-03-17 13:59:23 +0200) are available in the Git

[PATCH] drm/i915: Fix userptr so we do not have to worry about obj->mm.lock, v8.

2021-03-25 Thread Maarten Lankhorst
s checked in set_domain through a special path. Changes since v7: - Chane kvfree to kvfree(). Signed-off-by: Maarten Lankhorst Acked-by: Dave Airlie Reviewed-by: Thomas Hellström --- drivers/gpu/drm/i915/gem/i915_gem_domain.c| 18 +- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 101 ++- dr

<    4   5   6   7   8   9   10   11   12   13   >