[PULL] drm-misc-fixes

2021-09-30 Thread Maarten Lankhorst
Maarten Lankhorst (1): Merge drm/drm-fixes into drm-misc-fixes Maxime Ripard (7): drm/vc4: select PM drm/vc4: hdmi: Make sure the controller is powered up during bind drm/vc4: hdmi: Rework the pre_crtc_configure error handling drm/vc4: hdmi: Split the CEC disable / enable

[PATCH] drm/i915: Add ww context to intel_dpt_pin, v2.

2021-09-29 Thread Maarten Lankhorst
off-by: Maarten Lankhorst Reported-by: kernel test robot Reported-by: Julia Lawall --- drivers/gpu/drm/i915/display/intel_dpt.c | 40 +++- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_dpt.c b/drivers/gpu/drm/i915/display/intel_dp

[Intel-gfx] [PATCH] drm/i915: Add ww context to intel_dpt_pin, v2.

2021-09-29 Thread Maarten Lankhorst
off-by: Maarten Lankhorst Reported-by: kernel test robot Reported-by: Julia Lawall --- drivers/gpu/drm/i915/display/intel_dpt.c | 40 +++- 1 file changed, 25 insertions(+), 15 deletions(-) diff --git a/drivers/gpu/drm/i915/display/intel_dpt.c b/drivers/gpu/drm/i915/display/intel_dp

Re: [Intel-gfx] [PATCH 08/19] drm/i915: Fix runtime pm handling in i915_gem_shrink

2021-09-29 Thread Maarten Lankhorst
Op 29-09-2021 om 10:37 schreef Matthew Auld: > On Mon, 30 Aug 2021 at 13:10, Maarten Lankhorst > wrote: >> We forgot to call intel_runtime_pm_put on error, fix it! >> >> Signed-off-by: Maarten Lankhorst >> Fixes: cf41a8f1dc1e ("drm/i915: Finally remove obj-

Re: [Intel-gfx] [PATCH 13/19] drm/i915: Take object lock in i915_ggtt_pin if ww is not set

2021-09-16 Thread Maarten Lankhorst
Op 08-09-2021 om 05:11 schreef Niranjana Vishwanathapura: > On Mon, Aug 30, 2021 at 02:10:00PM +0200, Maarten Lankhorst wrote: >> i915_vma_wait_for_bind needs the vma lock held, fix the caller. >> > > Need an lock assert in i915_vma_wait_for_bind()? > > Niranjana Y

Re: [Intel-gfx] [PATCH 17/19] drm/i915: Add functions to set/get moving fence

2021-09-16 Thread Maarten Lankhorst
Op 08-09-2021 om 06:08 schreef Niranjana Vishwanathapura: > On Mon, Aug 30, 2021 at 02:10:04PM +0200, Maarten Lankhorst wrote: >> We want to get rid of i915_vma tracking to simplify the code and >> lifetimes. Add a way to set/put the moving fence, in preparation for >>

Re: [Intel-gfx] [PATCH 07/19] drm/i915: vma is always backed by an object.

2021-09-16 Thread Maarten Lankhorst
Op 03-09-2021 om 12:48 schreef Tvrtko Ursulin: > > On 03/09/2021 10:31, Maarten Lankhorst wrote: >> Op 31-08-2021 om 12:29 schreef Tvrtko Ursulin: >>> >>> On 31/08/2021 10:34, Maarten Lankhorst wrote: >>>> Op 31-08-2021 om 11:18 schreef Tvrtko Ursulin

Re: [Intel-gfx] [PATCH 01/19] drm/i915: Move __i915_gem_free_object to ttm_bo_destroy

2021-09-16 Thread Maarten Lankhorst
Op 16-09-2021 om 11:43 schreef Thomas Hellström (Intel): > > On 8/30/21 2:09 PM, Maarten Lankhorst wrote: >> When we implement delayed destroy, we may have a second >> call to the delete_mem_notify() handler, while free_object() >> only should be called once. >

Re: [PATCH v2] kernel/locking: Add context to ww_mutex_trylock.

2021-09-16 Thread Maarten Lankhorst
Op 14-09-2021 om 15:54 schreef Daniel Vetter: > On Tue, Sep 14, 2021 at 02:43:02PM +0200, Maarten Lankhorst wrote: >> Op 14-09-2021 om 08:50 schreef Peter Zijlstra: >>> On Mon, Sep 13, 2021 at 10:42:36AM +0200, Maarten Lankhorst wrote: >>> >>>>> +/** >

Re: [Intel-gfx] [PATCH v2] kernel/locking: Add context to ww_mutex_trylock.

2021-09-16 Thread Maarten Lankhorst
Op 14-09-2021 om 15:54 schreef Daniel Vetter: > On Tue, Sep 14, 2021 at 02:43:02PM +0200, Maarten Lankhorst wrote: >> Op 14-09-2021 om 08:50 schreef Peter Zijlstra: >>> On Mon, Sep 13, 2021 at 10:42:36AM +0200, Maarten Lankhorst wrote: >>> >>>>> +/** >

Re: [Intel-gfx] [PATCH 00/19] drm/i915: Short-term pinning and async eviction.

2021-09-16 Thread Maarten Lankhorst
Op 16-09-2021 om 11:40 schreef Thomas Hellström (Intel): > > On 8/30/21 2:09 PM, Maarten Lankhorst wrote: >> Remove some parts of the i915_vma api, ensure obj->vma always exists, >> and finally force the object lock to be taken when calling i915_vma_unbind >> is called.

Re: [Intel-gfx] [RFC PATCH 2/2] drm/i915/gt: Use spin_lock_irq() instead of local_irq_disable() + spin_lock()

2021-09-16 Thread Maarten Lankhorst
t; - > static void clear_ports(struct i915_request **ports, int count) > { > memset_p((void **)ports, NULL, count); > @@ -2377,7 +2370,7 @@ static void execlists_submission_tasklet(struct > tasklet_struct *t) > } > > if (!engine->execlists.pending[0]) { > -

Re: [Intel-gfx] [RFC PATCH 2/2] drm/i915/gt: Use spin_lock_irq() instead of local_irq_disable() + spin_lock()

2021-09-16 Thread Maarten Lankhorst
t; - > static void clear_ports(struct i915_request **ports, int count) > { > memset_p((void **)ports, NULL, count); > @@ -2377,7 +2370,7 @@ static void execlists_submission_tasklet(struct > tasklet_struct *t) > } > > if (!engine->execlists.pending[0]) { > -

Re: [Intel-gfx] [PATCH] drm/i915: Add mmap lock around vma_lookup() to prevent lockdep splats

2021-09-15 Thread Maarten Lankhorst
Op 15-09-2021 om 15:19 schreef Matthew Auld: > On Wed, 15 Sept 2021 at 12:00, Maarten Lankhorst > wrote: >> Fixes the following splat: >> >> i915: Running i915_gem_mman_live_selftests/igt_mmap >> [ cut here ] >> WARNING: CPU: 3 PID: 5

Re: [Intel-gfx] [PATCH] drm/i915: Add mmap lock around vma_lookup() to prevent lockdep splats

2021-09-15 Thread Maarten Lankhorst
Op 15-09-2021 om 15:19 schreef Matthew Auld: > On Wed, 15 Sept 2021 at 12:00, Maarten Lankhorst > wrote: >> Fixes the following splat: >> >> i915: Running i915_gem_mman_live_selftests/igt_mmap >> [ cut here ] >> WARNING: CPU: 3 PID: 5

[Intel-gfx] [PATCH] drm/i915: Add mmap lock around vma_lookup() to prevent lockdep splats

2021-09-15 Thread Maarten Lankhorst
e/0x80 __i915_subtests.cold.7+0x42/0x92 [i915] ? i915_perf_selftests+0x20/0x20 [i915] ? __i915_nop_setup+0x10/0x10 [i915] __run_selftests.part.3+0x10d/0x172 [i915] i915_live_selftests.cold.5+0x1f/0x47 [i915] i915_pci_probe+0x93/0x1d0 [i915] Signed-off-by: Maarten Lankhorst Closes: https://gitlab.freedeskt

[PATCH] drm/i915: Add mmap lock around vma_lookup() to prevent lockdep splats

2021-09-15 Thread Maarten Lankhorst
e/0x80 __i915_subtests.cold.7+0x42/0x92 [i915] ? i915_perf_selftests+0x20/0x20 [i915] ? __i915_nop_setup+0x10/0x10 [i915] __run_selftests.part.3+0x10d/0x172 [i915] i915_live_selftests.cold.5+0x1f/0x47 [i915] i915_pci_probe+0x93/0x1d0 [i915] Signed-off-by: Maarten Lankhorst Closes: https://gitlab.freedeskt

Re: [Intel-gfx] [PATCH v2] kernel/locking: Add context to ww_mutex_trylock.

2021-09-14 Thread Maarten Lankhorst
Op 14-09-2021 om 08:50 schreef Peter Zijlstra: > On Mon, Sep 13, 2021 at 10:42:36AM +0200, Maarten Lankhorst wrote: > >>> +/** >>> + * ww_mutex_trylock - tries to acquire the w/w mutex with optional acquire >>> context >>> + * @ww: mutex to lock >

Re: [PATCH v2] kernel/locking: Add context to ww_mutex_trylock.

2021-09-14 Thread Maarten Lankhorst
Op 14-09-2021 om 08:50 schreef Peter Zijlstra: > On Mon, Sep 13, 2021 at 10:42:36AM +0200, Maarten Lankhorst wrote: > >>> +/** >>> + * ww_mutex_trylock - tries to acquire the w/w mutex with optional acquire >>> context >>> + * @ww: mutex to lock >

Re: [PATCH v2] kernel/locking: Add context to ww_mutex_trylock.

2021-09-13 Thread Maarten Lankhorst
Op 10-09-2021 om 17:02 schreef Peter Zijlstra: > On Thu, Sep 09, 2021 at 11:32:18AM +0200, Maarten Lankhorst wrote: >> diff --git a/kernel/locking/mutex.c b/kernel/locking/mutex.c >> index d456579d0952..791c28005eef 100644 >> --- a/kernel/locking/mutex.c >> +

Re: [Intel-gfx] [PATCH v2] kernel/locking: Add context to ww_mutex_trylock.

2021-09-13 Thread Maarten Lankhorst
Op 10-09-2021 om 17:02 schreef Peter Zijlstra: > On Thu, Sep 09, 2021 at 11:32:18AM +0200, Maarten Lankhorst wrote: >> diff --git a/kernel/locking/mutex.c b/kernel/locking/mutex.c >> index d456579d0952..791c28005eef 100644 >> --- a/kernel/locking/mutex.c >> +

[Intel-gfx] [PATCH] drm/i915: Add ww context to intel_dpt_pin

2021-09-10 Thread Maarten Lankhorst
Ensure i915_vma_pin_iomap and vma_unpin are done with dpt->obj lock held. I don't think there's much of a point in merging intel_dpt_pin() with intel_pin_fb_obj_dpt(), they touch different objects. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/display/intel_dpt.c |

[PATCH] drm/i915: Add ww context to intel_dpt_pin

2021-09-10 Thread Maarten Lankhorst
Ensure i915_vma_pin_iomap and vma_unpin are done with dpt->obj lock held. I don't think there's much of a point in merging intel_dpt_pin() with intel_pin_fb_obj_dpt(), they touch different objects. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/display/intel_dpt.c |

[PATCH v2] kernel/locking: Add context to ww_mutex_trylock.

2021-09-09 Thread Maarten Lankhorst
Op 09-09-2021 om 10:22 schreef Peter Zijlstra: > On Thu, Sep 09, 2021 at 07:38:06AM +0200, Maarten Lankhorst wrote: > >>> You'll need a similar hunk in ww_rt_mutex.c >> What tree has that file? > Linus' tree should have it. Per commit: > > f8635d509d80 ("lockin

[Intel-gfx] [PATCH v2] kernel/locking: Add context to ww_mutex_trylock.

2021-09-09 Thread Maarten Lankhorst
Op 09-09-2021 om 10:22 schreef Peter Zijlstra: > On Thu, Sep 09, 2021 at 07:38:06AM +0200, Maarten Lankhorst wrote: > >>> You'll need a similar hunk in ww_rt_mutex.c >> What tree has that file? > Linus' tree should have it. Per commit: > > f8635d509d80 ("lockin

[PULL] drm-misc-next-fixes

2021-09-09 Thread Maarten Lankhorst
drm-misc-next-fixes-2021-09-09: drm-misc-next-fixes for v5.15: - Make some dma-buf config options depend on DMA_SHARED_BUFFER. - Handle multiplication overflow of fbdev xres/yres in the core. The following changes since commit efcefc7127290e7e9fa98dea029163ad8eda8fb3: drm/ttm: Fix

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

2021-09-09 Thread Maarten Lankhorst
drm-misc-next-fixes-2021-09-09: drm-misc-next-fixes for v5.15: - Make some dma-buf config options depend on DMA_SHARED_BUFFER. - Handle multiplication overflow of fbdev xres/yres in the core. The following changes since commit efcefc7127290e7e9fa98dea029163ad8eda8fb3: drm/ttm: Fix

[PULL] drm-misc-next-fixes

2021-09-09 Thread Maarten Lankhorst
drm-misc-next-fixes-2021-09-09: drm-misc-next-fixes for v5.15: - Make some dma-buf config options depend on DMA_SHARED_BUFFER. - Handle multiplication overflow of fbdev xres/yres in the core. The following changes since commit efcefc7127290e7e9fa98dea029163ad8eda8fb3: drm/ttm: Fix

Re: [PATCH] kernel/locking: Add context to ww_mutex_trylock.

2021-09-08 Thread Maarten Lankhorst
Op 08-09-2021 om 12:14 schreef Peter Zijlstra: > On Tue, Sep 07, 2021 at 03:20:44PM +0200, Maarten Lankhorst wrote: >> i915 will soon gain an eviction path that trylock a whole lot of locks >> for eviction, getting dmesg failures like below: >> >> BUG: MAX_LOCK_DE

Re: [Intel-gfx] [PATCH] kernel/locking: Add context to ww_mutex_trylock.

2021-09-08 Thread Maarten Lankhorst
Op 08-09-2021 om 12:14 schreef Peter Zijlstra: > On Tue, Sep 07, 2021 at 03:20:44PM +0200, Maarten Lankhorst wrote: >> i915 will soon gain an eviction path that trylock a whole lot of locks >> for eviction, getting dmesg failures like below: >> >> BUG: MAX_LOCK_DE

[Intel-gfx] [PATCH] kernel/locking: Add context to ww_mutex_trylock.

2021-09-07 Thread Maarten Lankhorst
useful in regulator_lock_nested, which may avoid dropping regulator_nesting_mutex in the uncontended path, so use it there. Signed-off-by: Maarten Lankhorst Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Will Deacon Cc: Waiman Long Cc: Boqun Feng Cc: Liam Girdwood Cc: Mark Brown Cc: linux-ker...@vger.kern

[PATCH] kernel/locking: Add context to ww_mutex_trylock.

2021-09-07 Thread Maarten Lankhorst
useful in regulator_lock_nested, which may avoid dropping regulator_nesting_mutex in the uncontended path, so use it there. Signed-off-by: Maarten Lankhorst Cc: Peter Zijlstra Cc: Ingo Molnar Cc: Will Deacon Cc: Waiman Long Cc: Boqun Feng Cc: Liam Girdwood Cc: Mark Brown Cc: linux-ker...@vger.kern

[PULL] drm-misc-next-fixes

2021-09-03 Thread Maarten Lankhorst
drm-misc-next-fixes-2021-09-03: drm-misc-next-fixes for v5.15: - Fix ttm_bo_move_memcpy() when ttm_resource is subclassed. - Small fixes to panfrost, mgag200, vc4. - Small ttm compilation fixes. The following changes since commit 2819cf0e7dbe45a2bccf2f6c60fe6a27b299cc3e: Merge tag

[PULL] drm-misc-next-fixes

2021-09-03 Thread Maarten Lankhorst
drm-misc-next-fixes-2021-09-03: drm-misc-next-fixes for v5.15: - Fix ttm_bo_move_memcpy() when ttm_resource is subclassed. - Small fixes to panfrost, mgag200, vc4. - Small ttm compilation fixes. The following changes since commit 2819cf0e7dbe45a2bccf2f6c60fe6a27b299cc3e: Merge tag

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

2021-09-03 Thread Maarten Lankhorst
drm-misc-next-fixes-2021-09-03: drm-misc-next-fixes for v5.15: - Fix ttm_bo_move_memcpy() when ttm_resource is subclassed. - Small fixes to panfrost, mgag200, vc4. - Small ttm compilation fixes. The following changes since commit 2819cf0e7dbe45a2bccf2f6c60fe6a27b299cc3e: Merge tag

Re: [Intel-gfx] [PATCH 14/19] drm/i915: Add i915_vma_unbind_unlocked, and take obj lock for i915_vma_unbind

2021-09-03 Thread Maarten Lankhorst
Op 30-08-2021 om 14:10 schreef Maarten Lankhorst: > We want to remove more members of i915_vma, which requires the locking to be > held more often. > > Start requiring gem object lock for i915_vma_unbind, as it's one of the > callers that may unpin pages. > > Some specia

Re: [Intel-gfx] [PATCH 07/19] drm/i915: vma is always backed by an object.

2021-09-03 Thread Maarten Lankhorst
Op 31-08-2021 om 12:29 schreef Tvrtko Ursulin: > > On 31/08/2021 10:34, Maarten Lankhorst wrote: >> Op 31-08-2021 om 11:18 schreef Tvrtko Ursulin: >>> >>> On 30/08/2021 13:09, Maarten Lankhorst wrote: >>>> vma->obj and vma->resv ar

Re: [PATCH] drm/i915: Release i915_gem_context from a worker

2021-09-02 Thread Maarten Lankhorst
Op 31-08-2021 om 17:14 schreef Daniel Vetter: > On Tue, Aug 31, 2021 at 02:16:56PM +0200, Daniel Vetter wrote: >> On Tue, Aug 31, 2021 at 11:38:27AM +0200, Maarten Lankhorst wrote: >>> Op 14-08-2021 om 12:43 schreef Daniel Vetter: >>>> The only reason for this really

Re: [Intel-gfx] [PATCH] drm/i915: Release i915_gem_context from a worker

2021-09-02 Thread Maarten Lankhorst
Op 31-08-2021 om 17:14 schreef Daniel Vetter: > On Tue, Aug 31, 2021 at 02:16:56PM +0200, Daniel Vetter wrote: >> On Tue, Aug 31, 2021 at 11:38:27AM +0200, Maarten Lankhorst wrote: >>> Op 14-08-2021 om 12:43 schreef Daniel Vetter: >>>> The only reason for this really

Re: [PATCH] drm/i915/gem: Fix the mman selftest

2021-08-31 Thread Maarten Lankhorst
able devices. For stolen LMEM, we still take the > same path as for integrated, as that haven't been moved over to TTM yet, > and user-space should not be able to create out of stolen LMEM anyway. > > Fixes: 7961c5b60f23 ("drm/i915: Add TTM offset argument to mmap.") >

Re: [Intel-gfx] [PATCH] drm/i915/gem: Fix the mman selftest

2021-08-31 Thread Maarten Lankhorst
able devices. For stolen LMEM, we still take the > same path as for integrated, as that haven't been moved over to TTM yet, > and user-space should not be able to create out of stolen LMEM anyway. > > Fixes: 7961c5b60f23 ("drm/i915: Add TTM offset argument to mmap.") >

Re: [PATCH] drm/i915: Release i915_gem_context from a worker

2021-08-31 Thread Maarten Lankhorst
a FIXME comment in when this should be removable again. > > v2: Fix mock_context(), noticed by intel-gfx-ci. > > Signed-off-by: Daniel Vetter > Cc: Jon Bloomfield > Cc: Chris Wilson > Cc: Maarten Lankhorst > Cc: Joonas Lahtinen > Cc: Daniel Vetter > Cc: "Thomas Hel

Re: [Intel-gfx] [PATCH] drm/i915: Release i915_gem_context from a worker

2021-08-31 Thread Maarten Lankhorst
a FIXME comment in when this should be removable again. > > v2: Fix mock_context(), noticed by intel-gfx-ci. > > Signed-off-by: Daniel Vetter > Cc: Jon Bloomfield > Cc: Chris Wilson > Cc: Maarten Lankhorst > Cc: Joonas Lahtinen > Cc: Daniel Vetter > Cc: "Thomas Hel

Re: [Intel-gfx] [PATCH 07/19] drm/i915: vma is always backed by an object.

2021-08-31 Thread Maarten Lankhorst
Op 31-08-2021 om 11:18 schreef Tvrtko Ursulin: > > On 30/08/2021 13:09, Maarten Lankhorst wrote: >> vma->obj and vma->resv are now never NULL, and some checks can be removed. > > Is the direction here compatible with SVM / VM_BIND? Yeah, it should be. The changes here

Re: [PATCH 10/11] drm/i915: use xa_lock/unlock for fpriv->vm_xa lookups

2021-08-31 Thread Maarten Lankhorst
gt; Cc: Jon Bloomfield > Cc: Chris Wilson > Cc: Maarten Lankhorst > Cc: Joonas Lahtinen > Cc: Daniel Vetter > Cc: "Thomas Hellström" > Cc: Matthew Auld > Cc: Lionel Landwerlin > Cc: Dave Airlie > Cc: Jason Ekstrand > --- > drivers/gpu/drm/i915/i915

Re: [Intel-gfx] [PATCH 10/11] drm/i915: use xa_lock/unlock for fpriv->vm_xa lookups

2021-08-31 Thread Maarten Lankhorst
gt; Cc: Jon Bloomfield > Cc: Chris Wilson > Cc: Maarten Lankhorst > Cc: Joonas Lahtinen > Cc: Daniel Vetter > Cc: "Thomas Hellström" > Cc: Matthew Auld > Cc: Lionel Landwerlin > Cc: Dave Airlie > Cc: Jason Ekstrand > --- > drivers/gpu/drm/i915/i915

[Intel-gfx] [PATCH 02/19] drm/i915: Remove unused bits of i915_vma/active api

2021-08-30 Thread Maarten Lankhorst
When reworking the code to move the eviction fence to the object, the best code is removed code. Remove some functions that are unused, and change the function definition if it's only used in 1 place. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/i915_active.c | 28

[Intel-gfx] [PATCH 01/19] drm/i915: Move __i915_gem_free_object to ttm_bo_destroy

2021-08-30 Thread Maarten Lankhorst
ion is used. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/i915/gem/i915_gem_ttm.c b/drivers/gpu/drm/i915/gem/i915_gem_ttm.c index 59ca53a3ef6a..eaf2ff29dd4a 100644 --- a/driv

[Intel-gfx] [PATCH 09/19] drm/i915: Change shrink ordering to use locking around unbinding.

2021-08-30 Thread Maarten Lankhorst
Call drop_pages with the gem object lock held, instead of the other way around. This will allow us to drop the vma bindings with the gem object lock held. We plan to require the object lock for unpinning in the future, and this is an easy target. Signed-off-by: Maarten Lankhorst --- drivers

[Intel-gfx] [PATCH 18/19] drm/i915: Add support for asynchronous moving fence waiting

2021-08-30 Thread Maarten Lankhorst
ork after the moving fence signals. This should close all holes where userspace can read a buffer before it's fully migrated. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gem/i915_gem_pages.c | 10 ++ drivers/gpu/drm/i915/i915_vma.c | 10 -- 2 files changed,

[Intel-gfx] [PATCH 12/19] drm/i915: Remove pages_mutex and intel_gtt->vma_ops.set/clear_pages members

2021-08-30 Thread Maarten Lankhorst
(), as it's locked with obj->mutex, and cmpxchg in unpin, which only fails if we race a against a new pin. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/display/intel_dpt.c | 2 - drivers/gpu/drm/i915/gt/gen6_ppgtt.c | 15 - drivers/gpu/drm/i915/gt/intel_ggtt.c |

[Intel-gfx] [PATCH 07/19] drm/i915: vma is always backed by an object.

2021-08-30 Thread Maarten Lankhorst
vma->obj and vma->resv are now never NULL, and some checks can be removed. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gt/intel_context.c | 2 +- .../gpu/drm/i915/gt/intel_ring_submission.c | 2 +- drivers/gpu/drm/i915/i915_vma.c

[Intel-gfx] [PATCH 11/19] drm/i915: Remove resv from i915_vma

2021-08-30 Thread Maarten Lankhorst
It's just an alias to vma->obj->base.resv, no need to duplicate it. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gem/i915_gem_execbuffer.c | 4 ++-- drivers/gpu/drm/i915/i915_vma.c| 9 - drivers/gpu/drm/i915/i915_vma.h| 6 +++--- drive

[Intel-gfx] [PATCH 15/19] drm/i915: Remove support for unlocked i915_vma unbind

2021-08-30 Thread Maarten Lankhorst
Now that we require the object lock for all ops, some code handling race conditions can be removed. This is required to not take short-term pins inside execbuf. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/i915_vma.c | 40 + 1 file changed, 5

[Intel-gfx] [PATCH 08/19] drm/i915: Fix runtime pm handling in i915_gem_shrink

2021-08-30 Thread Maarten Lankhorst
We forgot to call intel_runtime_pm_put on error, fix it! Signed-off-by: Maarten Lankhorst Fixes: cf41a8f1dc1e ("drm/i915: Finally remove obj->mm.lock.") Cc: Thomas Hellström Cc: Daniel Vetter Cc: # v5.13+ --- drivers/gpu/drm/i915/gem/i915_gem_shrinker.c | 7 +-- 1 fi

[Intel-gfx] [PATCH 19/19] drm/i915: Add accelerated migration to ttm

2021-08-30 Thread Maarten Lankhorst
Expose the fence to ttm_bo->moving, which will get picked up by i915 through the i915_gem_object_get_moving_fence call. Should be sufficient for the needs we have. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 104 1 file changed,

[Intel-gfx] [PATCH 16/19] drm/i915: Remove short-term pins from execbuf

2021-08-30 Thread Maarten Lankhorst
Add a flag PIN_VALIDATE, to indicate we don't need to pin and only protected by the object lock. This removes the need to unpin, which is done by just releasing the lock. Signed-off-by: Maarten Lankhorst --- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 64 ++- drivers/gpu

[Intel-gfx] [PATCH 05/19] drm/i915: Create a dummy object for gen6 ppgtt

2021-08-30 Thread Maarten Lankhorst
ook real enough. Also kill pin_mutex, it's not compatible with ww locking, and we can use the vm lock instead. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gem/i915_gem_internal.c | 44 --- drivers/gpu/drm/i915/gt/gen6_ppgtt.c | 122 +++ drivers/gpu/drm/i915

[Intel-gfx] [PATCH 10/19] Move CONTEXT_VALID_BIT check

2021-08-30 Thread Maarten Lankhorst
Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gt/intel_engine_pm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/intel_engine_pm.c b/drivers/gpu/drm/i915/gt/intel_engine_pm.c index 1f07ac4e0672..df81a0dc481e 100644 --- a/drivers/gpu

[Intel-gfx] [PATCH 14/19] drm/i915: Add i915_vma_unbind_unlocked, and take obj lock for i915_vma_unbind

2021-08-30 Thread Maarten Lankhorst
by the VMA, so after __i915_vma_unbind, vma may be garbage, and we need to cache vma->obj before unlocking. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/display/intel_display.c | 2 +- drivers/gpu/drm/i915/gem/i915_gem_shrinker.c | 14 +++- .../gpu/drm/i915/gem/selftests/huge_page

[Intel-gfx] [PATCH 17/19] drm/i915: Add functions to set/get moving fence

2021-08-30 Thread Maarten Lankhorst
We want to get rid of i915_vma tracking to simplify the code and lifetimes. Add a way to set/put the moving fence, in preparation for removing the tracking. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gem/i915_gem_object.c | 15 +++ drivers/gpu/drm/i915/gem

[Intel-gfx] [PATCH 13/19] drm/i915: Take object lock in i915_ggtt_pin if ww is not set

2021-08-30 Thread Maarten Lankhorst
i915_vma_wait_for_bind needs the vma lock held, fix the caller. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/i915_vma.c | 40 +++-- 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_vma.c b/drivers/gpu/drm/i915

[Intel-gfx] [PATCH 06/19] drm/i915: Create a full object for mock_ring

2021-08-30 Thread Maarten Lankhorst
This allows us to finally get rid of all the assumptions that vma->obj is NULL. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gt/mock_engine.c | 35 --- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/mock_engine.c

[Intel-gfx] [PATCH 03/19] drm/i915: Slightly rework EXEC_OBJECT_CAPTURE handling

2021-08-30 Thread Maarten Lankhorst
it yet through annotations. Signed-off-by: Maarten Lankhorst --- .../gpu/drm/i915/gem/i915_gem_execbuffer.c| 26 --- drivers/gpu/drm/i915/i915_gpu_error.c | 9 --- drivers/gpu/drm/i915/i915_request.c | 9 ++- drivers/gpu/drm/i915/i915_request.h

[Intel-gfx] [PATCH 04/19] drm/i915: Remove gen6_ppgtt_unpin_all

2021-08-30 Thread Maarten Lankhorst
gen6_ppgtt_unpin_all is unused, kill it. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/gt/gen6_ppgtt.c | 11 --- drivers/gpu/drm/i915/gt/gen6_ppgtt.h | 1 - 2 files changed, 12 deletions(-) diff --git a/drivers/gpu/drm/i915/gt/gen6_ppgtt.c b/drivers/gpu/drm/i915/gt

[Intel-gfx] [PATCH 00/19] drm/i915: Short-term pinning and async eviction.

2021-08-30 Thread Maarten Lankhorst
t;set/get pages, and kill off the short-term pinning/unpinning in execbuf. After this, we go 1 step further, populate obj->moving where required, and add support for async eviction/clearing. Maarten Lankhorst (19): drm/i915: Move __i915_gem_free_object to ttm_bo_destroy drm/i915: Remove

Re: [Intel-gfx] [PATCH] drm/i915/dg1: remove __maybe_unused leftover

2021-08-20 Thread Maarten Lankhorst
x = 1 > > -static const struct intel_device_info dg1_info __maybe_unused = { > +static const struct intel_device_info dg1_info = { > GEN12_FEATURES, > DGFX_FEATURES, > .graphics_rel = 10, Reviewed-by: Maarten Lankhorst

Re: [Intel-gfx] [PATCH] drm/i915: Ditch the i915_gem_ww_ctx loop member

2021-08-16 Thread Maarten Lankhorst
variable in its place. >>> >>> While initially setting the _err variable to -EDEADLK to enter the >>> loop, we clear it before actually entering using fetch_and_zero() to >>> avoid empty loops or code not setting the _err variable running forever. >

Re: [PATCH] drm/i915: Ditch the i915_gem_ww_ctx loop member

2021-08-16 Thread Maarten Lankhorst
variable in its place. >>> >>> While initially setting the _err variable to -EDEADLK to enter the >>> loop, we clear it before actually entering using fetch_and_zero() to >>> avoid empty loops or code not setting the _err variable running forever. >

Re: [Intel-gfx] [PATCH 2/2] drm/i915: Add pci ids and uapi for DG1

2021-08-13 Thread Maarten Lankhorst
Op 12-08-2021 om 23:10 schreef Jason Ekstrand: > On Thu, Aug 12, 2021 at 9:49 AM Daniel Vetter wrote: >> On Thu, Aug 12, 2021 at 2:44 PM Maarten Lankhorst >> wrote: >>> DG1 has support for local memory, which requires the usage of the >>> lmem placement extension

Re: [PATCH 2/2] drm/i915: Add pci ids and uapi for DG1

2021-08-13 Thread Maarten Lankhorst
Op 12-08-2021 om 23:10 schreef Jason Ekstrand: > On Thu, Aug 12, 2021 at 9:49 AM Daniel Vetter wrote: >> On Thu, Aug 12, 2021 at 2:44 PM Maarten Lankhorst >> wrote: >>> DG1 has support for local memory, which requires the usage of the >>> lmem placement extension

[PULL] drm-misc-next

2021-08-12 Thread Maarten Lankhorst
Last drm-misc-next for next kernel release! drm-misc-next-2021-08-12: drm-misc-next for v5.15: UAPI Changes: Cross-subsystem Changes: - Add lockdep_assert(once) helpers. Core Changes: - Add lockdep assert to drm_is_current_master_locked. - Fix typos in dma-buf documentation. - Mark drm irq

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

2021-08-12 Thread Maarten Lankhorst
Last drm-misc-next for next kernel release! drm-misc-next-2021-08-12: drm-misc-next for v5.15: UAPI Changes: Cross-subsystem Changes: - Add lockdep_assert(once) helpers. Core Changes: - Add lockdep assert to drm_is_current_master_locked. - Fix typos in dma-buf documentation. - Mark drm irq

[PULL] drm-misc-next

2021-08-12 Thread Maarten Lankhorst
Last drm-misc-next for next kernel release! drm-misc-next-2021-08-12: drm-misc-next for v5.15: UAPI Changes: Cross-subsystem Changes: - Add lockdep_assert(once) helpers. Core Changes: - Add lockdep assert to drm_is_current_master_locked. - Fix typos in dma-buf documentation. - Mark drm irq

[Intel-gfx] [PATCH 2/2] drm/i915: Add pci ids and uapi for DG1

2021-08-12 Thread Maarten Lankhorst
be mostly ready for DG1. VK_EXT_memory_budget is not hooked up yet, but we should definitely just enable the uapi parts by default. Signed-off-by: Maarten Lankhorst References: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11584 Cc: Jordan Justen jordan.l.jus...@intel.com Cc: Jason

[PATCH 2/2] drm/i915: Add pci ids and uapi for DG1

2021-08-12 Thread Maarten Lankhorst
be mostly ready for DG1. VK_EXT_memory_budget is not hooked up yet, but we should definitely just enable the uapi parts by default. Signed-off-by: Maarten Lankhorst References: https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11584 Cc: Jordan Justen jordan.l.jus...@intel.com Cc: Jason

[Intel-gfx] [PATCH 1/2] Revert "drm/i915: allow DG1 autoprobe for CONFIG_BROKEN"

2021-08-12 Thread Maarten Lankhorst
This reverts commit fae352efb12196e7110f98bc1297ce533472764d. Inside core-for-CI, reverting to make next patch apply cleanly. --- drivers/gpu/drm/i915/i915_pci.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c index

[PATCH 1/2] Revert "drm/i915: allow DG1 autoprobe for CONFIG_BROKEN"

2021-08-12 Thread Maarten Lankhorst
This reverts commit fae352efb12196e7110f98bc1297ce533472764d. Inside core-for-CI, reverting to make next patch apply cleanly. --- drivers/gpu/drm/i915/i915_pci.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c index

[PATCH 1/3] Revert "drm/i915: allow DG1 autoprobe for CONFIG_BROKEN"

2021-08-12 Thread Maarten Lankhorst
This reverts commit fae352efb12196e7110f98bc1297ce533472764d. Inside core-for-CI, reverting to make next patch apply cleanly. --- drivers/gpu/drm/i915/i915_pci.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c index

[Intel-gfx] [PATCH 1/3] Revert "drm/i915: allow DG1 autoprobe for CONFIG_BROKEN"

2021-08-12 Thread Maarten Lankhorst
This reverts commit fae352efb12196e7110f98bc1297ce533472764d. Inside core-for-CI, reverting to make next patch apply cleanly. --- drivers/gpu/drm/i915/i915_pci.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c index

[PATCH 3/3] drm/i915/topic/for-CI: Disable fake LMEM implementation

2021-08-12 Thread Maarten Lankhorst
see if anything breaks. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/Kconfig.debug | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/i915/Kconfig.debug b/drivers/gpu/drm/i915/Kconfig.debug index e7fd3e76f8a2..f27c0b5873f7 100644 --- a/drivers/gpu/drm/i915

[Intel-gfx] [PATCH 2/3] drm/i915: Add pci ids for DG1

2021-08-12 Thread Maarten Lankhorst
Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/i915_pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c index 1bbd09ad5287..93ccdc6bbd03 100644 --- a/drivers/gpu/drm/i915/i915_pci.c +++ b/drivers/gpu/drm/i915

[PATCH 2/3] drm/i915: Add pci ids for DG1

2021-08-12 Thread Maarten Lankhorst
Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/i915_pci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/i915/i915_pci.c b/drivers/gpu/drm/i915/i915_pci.c index 1bbd09ad5287..93ccdc6bbd03 100644 --- a/drivers/gpu/drm/i915/i915_pci.c +++ b/drivers/gpu/drm/i915

[Intel-gfx] [PATCH 3/3] drm/i915/topic/for-CI: Disable fake LMEM implementation

2021-08-12 Thread Maarten Lankhorst
see if anything breaks. Signed-off-by: Maarten Lankhorst --- drivers/gpu/drm/i915/Kconfig.debug | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/i915/Kconfig.debug b/drivers/gpu/drm/i915/Kconfig.debug index e7fd3e76f8a2..f27c0b5873f7 100644 --- a/drivers/gpu/drm/i915

Re: [PATCH] drm/doc/rfc: drop lmem uapi section

2021-08-11 Thread Maarten Lankhorst
gt; Cc: Stephen Rothwell > Fixes: 727ecd99a4c9 ("drm/doc/rfc: drop the i915_gem_lmem.h header") > Cc: Matthew Auld > Signed-off-by: Daniel Vetter > --- > Documentation/gpu/rfc/i915_gem_lmem.rst | 109 > 1 file changed, 109 deletions(-) Acked-by: Maarte

Re: [Intel-gfx] [PATCH i-g-t v3 03/11] lib/i915/gem_mman: add fixed mode to gem_mmap_offset__cpu

2021-08-06 Thread Maarten Lankhorst
Op 02-08-2021 om 08:29 schreef Dixit, Ashutosh: > On Fri, 30 Jul 2021 01:53:40 -0700, Matthew Auld wrote: >> On discrete we only support the new fixed mode. >> >> Signed-off-by: Matthew Auld >> Cc: Maarten Lankhorst >> Cc: Ashutosh Dixit >> Cc: Daniel Vett

Re: [Intel-gfx] [PATCH i-g-t v3 03/11] lib/i915/gem_mman: add fixed mode to gem_mmap_offset__cpu

2021-08-06 Thread Maarten Lankhorst
Op 02-08-2021 om 08:29 schreef Dixit, Ashutosh: > On Fri, 30 Jul 2021 01:53:40 -0700, Matthew Auld wrote: >> On discrete we only support the new fixed mode. >> >> Signed-off-by: Matthew Auld >> Cc: Maarten Lankhorst >> Cc: Ashutosh Dixit >> Cc: Daniel Vett

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

2021-08-05 Thread Maarten Lankhorst
drm-misc-next-2021-08-05: drm-misc-next for v5.15: UAPI Changes: Cross-subsystem Changes: Core Changes: - Assorted docbook updates. - Unbreak damage selftests. - Define DRM_FORMAT_MAX_PLANES, maximum planes for a planar format. - Add gem fb vmap/vunmap helpers, use them in gud and vkms drivers.

[PULL] drm-misc-next

2021-08-05 Thread Maarten Lankhorst
drm-misc-next-2021-08-05: drm-misc-next for v5.15: UAPI Changes: Cross-subsystem Changes: Core Changes: - Assorted docbook updates. - Unbreak damage selftests. - Define DRM_FORMAT_MAX_PLANES, maximum planes for a planar format. - Add gem fb vmap/vunmap helpers, use them in gud and vkms drivers.

[PULL] drm-misc-next

2021-08-05 Thread Maarten Lankhorst
drm-misc-next-2021-08-05: drm-misc-next for v5.15: UAPI Changes: Cross-subsystem Changes: Core Changes: - Assorted docbook updates. - Unbreak damage selftests. - Define DRM_FORMAT_MAX_PLANES, maximum planes for a planar format. - Add gem fb vmap/vunmap helpers, use them in gud and vkms drivers.

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

2021-08-05 Thread Maarten Lankhorst
Op 03-08-2021 om 17:57 schreef Maarten Lankhorst: > Op 2021-08-03 om 17:45 schreef Jason Ekstrand: >> On Tue, Aug 3, 2021 at 10:09 AM Daniel Vetter wrote: >>> On Wed, Jul 28, 2021 at 4:22 PM Matthew Auld >>> wrote: >>>> On Mon, 26 Jul 2021 at 17:10, Tvr

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

2021-08-05 Thread Maarten Lankhorst
Op 03-08-2021 om 17:57 schreef Maarten Lankhorst: > Op 2021-08-03 om 17:45 schreef Jason Ekstrand: >> On Tue, Aug 3, 2021 at 10:09 AM Daniel Vetter wrote: >>> On Wed, Jul 28, 2021 at 4:22 PM Matthew Auld >>> wrote: >>>> On Mon, 26 Jul 2021 at 17:10, Tvr

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

2021-08-03 Thread Maarten Lankhorst
07/2021 16:14, Jason Ekstrand wrote: >>>>> On Mon, Jul 26, 2021 at 3:31 AM Maarten Lankhorst >>>>> wrote: >>>>>> Op 23-07-2021 om 13:34 schreef Matthew Auld: >>>>>>> From: Chris Wilson >>>>>>> >>>&g

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

2021-08-03 Thread Maarten Lankhorst
07/2021 16:14, Jason Ekstrand wrote: >>>>> On Mon, Jul 26, 2021 at 3:31 AM Maarten Lankhorst >>>>> wrote: >>>>>> Op 23-07-2021 om 13:34 schreef Matthew Auld: >>>>>>> From: Chris Wilson >>>>>>> >>>&g

Re: [PATCH v2 1/2] locking/lockdep: Provide lockdep_assert{, _once}() helpers

2021-08-02 Thread Maarten Lankhorst
Op 31-07-2021 om 10:24 schreef Desmond Cheong Zhi Xi: > From: Peter Zijlstra > > Extract lockdep_assert{,_once}() helpers to more easily write composite > assertions like, for example: > > lockdep_assert(lockdep_is_held(_device.master_mutex) || >

Re: [Intel-gfx] [PATCH] drm: Fix oops in damage self-tests by mocking damage property

2021-08-02 Thread Maarten Lankhorst
xes: c7fcbf251397 ("drm/plane: check that fb_damage is set up when used") > Cc: José Roberto de Souza (v1) > Cc: Ville Syrjälä > Cc: Gwan-gyeong Mun > Cc: José Roberto de Souza > Cc: Hans de Goede > Cc: Daniel Vetter > Cc: Maarten Lankhorst > Cc: Maxime Ripard > C

Re: [PATCH] drm: Fix oops in damage self-tests by mocking damage property

2021-08-02 Thread Maarten Lankhorst
xes: c7fcbf251397 ("drm/plane: check that fb_damage is set up when used") > Cc: José Roberto de Souza (v1) > Cc: Ville Syrjälä > Cc: Gwan-gyeong Mun > Cc: José Roberto de Souza > Cc: Hans de Goede > Cc: Daniel Vetter > Cc: Maarten Lankhorst > Cc: Maxime Ripard > C

[PULL] drm-misc-next

2021-07-29 Thread Maarten Lankhorst
-dsi: Find the possible DSI devices Jose Maria Casanova Crespo (1): drm/prime: fix comment on PRIME Helpers Linus Walleij (1): drm/panel-sony-acx424akp: Modernize backlight handling Maarten Lankhorst (1): Backmerge remote-tracking branch 'drm/drm-next' into drm-misc-next Mare

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

2021-07-29 Thread Maarten Lankhorst
-dsi: Find the possible DSI devices Jose Maria Casanova Crespo (1): drm/prime: fix comment on PRIME Helpers Linus Walleij (1): drm/panel-sony-acx424akp: Modernize backlight handling Maarten Lankhorst (1): Backmerge remote-tracking branch 'drm/drm-next' into drm-misc-next Mare

[PULL] drm-misc-next

2021-07-29 Thread Maarten Lankhorst
-dsi: Find the possible DSI devices Jose Maria Casanova Crespo (1): drm/prime: fix comment on PRIME Helpers Linus Walleij (1): drm/panel-sony-acx424akp: Modernize backlight handling Maarten Lankhorst (1): Backmerge remote-tracking branch 'drm/drm-next' into drm-misc-next Mare

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