Re: [PATCH] drm/ttm: call driver move_notify() when doing system-tt bo moves

2011-02-02 Thread Thomas Hellström
Reviewed-by: Thomas Hellstrom tho...@shipmail.org Ben Skeggs wrote: From: Ben Skeggs bske...@redhat.com Nouveau doesn't have enough information at ttm_backend_func.bind() time to implement things like tiled GART, or to keep a buffer at a constant address in the GPU virtual address space no

Re: Memory eviction in ttm

2012-09-14 Thread Thomas Hellström
Hi Maarten! Broadening the audience a bit.. On 9/14/12 9:12 AM, Maarten Lankhorst wrote: Op 13-09-12 23:00, Thomas Hellstrom schreef: On 09/13/2012 07:13 PM, Maarten Lankhorst wrote: Hey Op 13-09-12 18:41, Thomas Hellstrom schreef: On 09/13/2012 05:19 PM, Maarten Lankhorst wrote: Hey, Op

Re: [PATCH 4/5] reservation: cross-device reservation support

2012-09-28 Thread Thomas Hellström
On 9/28/12 2:43 PM, Maarten Lankhorst wrote: This adds support for a generic reservations framework that can be hooked up to ttm and dma-buf and allows easy sharing of reservations across devices. The idea is that a dma-buf and ttm object both will get a pointer to a struct reservation_object,

Re: Breakage in track dev_mapping in more robust and flexible way

2012-10-25 Thread Thomas Hellström
On 10/25/12 4:41 PM, Jerome Glisse wrote: On Thu, Oct 25, 2012 at 04:02:25PM +0200, Thomas Hellstrom wrote: Hi, This commit From 949c4a34afacfe800fc442afac117aba15284962 Mon Sep 17 00:00:00 2001 From: Ilija Hadzic ihad...@research.bell-labs.com Date: Tue, 15 May 2012 16:40:10 -0400 Subject:

Re: Breakage in track dev_mapping in more robust and flexible way

2012-10-25 Thread Thomas Hellström
On 10/25/12 7:12 PM, Ilija Hadzic wrote: On Thu, Oct 25, 2012 at 11:10 AM, Thomas Hellström thellst...@vmware.com wrote: On 10/25/12 4:41 PM, Jerome Glisse wrote: On Thu, Oct 25, 2012 at 04:02:25PM +0200, Thomas Hellstrom wrote: Hi, This commit From

Re: [PATCH] drm/ttm: move ttm_lock.c to drm/vmwgfx

2012-12-14 Thread Thomas Hellström
Nack, I'm not against moving the TTM lock away, when a replacement strategy for the main use case is presented. but using wording like unholy, scares just because there is a lack of understanding or because it gets in the way of implementing cross-device reservation is a really really bad

Re: [PATCH] drm/ttm: move ttm_lock.c to drm/vmwgfx

2012-12-17 Thread Thomas Hellström
On Fri, Dec 14, 2012 at 4:51 PM, Thomas Hellström tho...@shipmail.org wrote: Nack, I'm not against moving the TTM lock away, when a replacement strategy for the main use case is presented. but using wording like unholy, scares just because there is a lack of understanding or because

drm/vmwgfx: Fix compat shader namespace

2014-07-10 Thread Thomas Hellström
On 2014-07-09 14:48, Dan Carpenter wrote: > Hello Thomas Hellstrom, > > The patch 18e4a4669c50: "drm/vmwgfx: Fix compat shader namespace" > from Jun 9, 2014, leads to the following static checker warning: > > drivers/gpu/drm/vmwgfx/vmwgfx_execbuf.c:477 vmw_cmd_res_reloc_add() > warn:

[PATCH 00/17] Convert TTM to the new fence interface.

2014-07-11 Thread Thomas Hellström
On 2014-07-09 14:29, Maarten Lankhorst wrote: > This series applies on top of the driver-core-next branch of > git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git > > Before converting ttm to the new fence interface I had to fix some > drivers to require a reservation before

drm/vmwgfx: Fix compat shader namespace

2014-07-11 Thread Thomas Hellström
On 2014-07-10 11:33, Dan Carpenter wrote: > On Wed, Jul 09, 2014 at 11:31:45PM +0200, Thomas Hellstr?m wrote: >>> Speaking of verbose, all the likely/unlikely annotations should be >>> removed. >> Is this your personal opinion or has there been some kind of kernel >> developer agreement not to

Breakage in "track dev_mapping in more robust and flexible way"

2012-10-25 Thread Thomas Hellström
On 10/25/12 4:41 PM, Jerome Glisse wrote: > On Thu, Oct 25, 2012 at 04:02:25PM +0200, Thomas Hellstrom wrote: >> Hi, >> >> This commit >> >> From 949c4a34afacfe800fc442afac117aba15284962 Mon Sep 17 00:00:00 2001 >> From: Ilija Hadzic >> Date: Tue, 15 May 2012 16:40:10 -0400 >> Subject: [PATCH]

Breakage in "track dev_mapping in more robust and flexible way"

2012-10-25 Thread Thomas Hellström
On 10/25/12 7:12 PM, Ilija Hadzic wrote: > On Thu, Oct 25, 2012 at 11:10 AM, Thomas Hellstr?m > wrote: >> On 10/25/12 4:41 PM, Jerome Glisse wrote: >>> On Thu, Oct 25, 2012 at 04:02:25PM +0200, Thomas Hellstrom wrote: Hi, This commit From

Memory eviction in ttm

2012-09-14 Thread Thomas Hellström
Hi Maarten! Broadening the audience a bit.. On 9/14/12 9:12 AM, Maarten Lankhorst wrote: > Op 13-09-12 23:00, Thomas Hellstrom schreef: >> On 09/13/2012 07:13 PM, Maarten Lankhorst wrote: >>> Hey >>> >>> Op 13-09-12 18:41, Thomas Hellstrom schreef: On 09/13/2012 05:19 PM, Maarten Lankhorst

[PATCH 4/5] reservation: cross-device reservation support

2012-09-28 Thread Thomas Hellström
On 9/28/12 2:43 PM, Maarten Lankhorst wrote: > This adds support for a generic reservations framework that can be > hooked up to ttm and dma-buf and allows easy sharing of reservations > across devices. > > The idea is that a dma-buf and ttm object both will get a pointer > to a struct

[PATCH] drm/ttm: move ttm_lock.c to drm/vmwgfx

2012-12-14 Thread Thomas Hellström
Nack, I'm not against moving the TTM lock away, when a replacement strategy for the main use case is presented. but using wording like "unholy", "scares" just because there is a lack of understanding or because it gets in the way of implementing cross-device reservation is a really really bad

[PATCH] drm/ttm: move ttm_lock.c to drm/vmwgfx

2012-12-17 Thread Thomas Hellström
On 12/14/12 7:50 PM, Daniel Vetter wrote: > Dude, you're seriously overshooting here. This patch isn't required > _at_ _all_ to do cross device sharing/reservations/whatever. We've > simply discussed TTM documentation in the context of Maartens work, > and I've suggested to include all the TTM

[PATCH] drm/ttm: call driver move_notify() when doing system->tt bo moves

2011-02-02 Thread Thomas Hellström
Reviewed-by: Thomas Hellstrom Ben Skeggs wrote: > From: Ben Skeggs > > Nouveau doesn't have enough information at ttm_backend_func.bind() time > to implement things like tiled GART, or to keep a buffer at a constant > address in the GPU virtual address space no matter where in physical >

[PATCH 0/9] [RFC] fair-lru eviction

2010-05-19 Thread Thomas Hellström
Daniel, Daniel Vetter wrote: > Hi all, > > This patch series implements the fair-lru eviction Chris Wilson already > posted with a twist. It's essentially the same idea & algorithm. > Differnences versus his patch: > - Doesn't do any allocations while scanning. > - Implemented in drm_mm.c > > In

Re: [Intel-gfx] [PATCH] dma-buf/dma-resv: Respect num_fences when initializing the shared fence list.

2020-11-25 Thread Thomas Hellström
ation: update api and add some helpers") Cc: # v3.17+ Reported-by: Niranjana Vishwanathapura Signed-off-by: Maarten Lankhorst --- drivers/dma-buf/dma-resv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) Reviewed-by: Thomas Hellström _

Re: [PATCH v5 05/15] mm/frame-vector: Use FOLL_LONGTERM

2020-11-09 Thread Thomas Hellström
On Fri, 2020-11-06 at 08:55 -0400, Jason Gunthorpe wrote: > On Fri, Nov 06, 2020 at 11:27:59AM +0100, Daniel Vetter wrote: > > On Fri, Nov 6, 2020 at 11:01 AM Daniel Vetter > > wrote: > > > On Fri, Nov 6, 2020 at 5:08 AM John Hubbard > > > wrote: > > > > On 11/5/20 4:49 AM, Jason Gunthorpe

[PATCH v2 0/4] drm/i915: Move system memory to TTM for discrete

2021-06-11 Thread Thomas Hellström
the last patch (migration) It needs selftests and some additional work. - Unconditionally add VM_IO at mmap time. Thomas Hellström (4): drm/i915: Update object placement flags to be mutable drm/i915/ttm: Adjust gem flags and caching settings after a move drm/i915/ttm: Calculate the object placement

[PATCH v2 1/4] drm/i915: Update object placement flags to be mutable

2021-06-11 Thread Thomas Hellström
. The flags will change during migration under the object lock. Signed-off-by: Thomas Hellström v2: - Unconditionally set VM_IO on our VMAs in line with the rest core gem and TTM. Since the bo might be migrated while the VMA is still alive, there is no sense, whether or not it maps iomem might

[PATCH v2 3/4] drm/i915/ttm: Calculate the object placement at get_pages time

2021-06-11 Thread Thomas Hellström
Instead of relying on a static placement, calculate at get_pages() time. This should work for LMEM regions and system for now. For stolen we need to take preallocated range into account. That well be added later. Signed-off-by: Thomas Hellström --- v2: - Fixed a style issue (Reported by Matthew

[PATCH v2 2/4] drm/i915/ttm: Adjust gem flags and caching settings after a move

2021-06-11 Thread Thomas Hellström
and caching before anyone else gets hold of the object. Signed-off-by: Thomas Hellström --- v2: - Style fixes (Reported by Matthew Auld) --- drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 112 +++- 1 file changed, 90 insertions(+), 22 deletions(-) diff --git a/drivers/gpu/drm/i915/gem

[PATCH v2 4/4] drm/i915/ttm: Use TTM for system memory

2021-06-11 Thread Thomas Hellström
elaborate shrinker for that memory. Signed-off-by: Thomas Hellström --- v2: - Fix IS_ERR_OR_NULL() check to IS_ERR() (Reported by Matthew Auld) --- drivers/gpu/drm/i915/gem/i915_gem_ttm.c| 22 ++ drivers/gpu/drm/i915/i915_drv.h| 3 --- drivers/gpu/drm/i915

Re: [Intel-gfx] [PATCH v3 2/4] drm/i915/ttm: Adjust gem flags and caching settings after a move

2021-06-14 Thread Thomas Hellström
On 6/14/21 12:20 PM, Matthew Auld wrote: On Mon, 14 Jun 2021 at 10:53, Thomas Hellström wrote: After a TTM move or object init we need to update the i915 gem flags and caching settings to reflect the new placement. Currently caching settings are not changed during the lifetime of an object

[PATCH v3 1/4] drm/i915: Update object placement flags to be mutable

2021-06-14 Thread Thomas Hellström
. The flags will change during migration under the object lock. Signed-off-by: Thomas Hellström Reviewed-by: Matthew Auld --- v2: - Unconditionally set VM_IO on our VMAs in line with the rest core gem and TTM. Since the bo might be migrated while the VMA is still alive, there is no sense

[PATCH v3 4/4] drm/i915/ttm: Use TTM for system memory

2021-06-14 Thread Thomas Hellström
elaborate shrinker for that memory. Signed-off-by: Thomas Hellström Reviewed-by: Matthew Auld --- v2: - Fix IS_ERR_OR_NULL() check to IS_ERR() (Reported by Matthew Auld) v3: - Commit message typo fix --- drivers/gpu/drm/i915/gem/i915_gem_ttm.c| 22 ++ drivers/gpu/drm/i915

[PATCH v3 2/4] drm/i915/ttm: Adjust gem flags and caching settings after a move

2021-06-14 Thread Thomas Hellström
page allocations. Also introduce gpu_binds_iomem() and cpu_maps_iomem() to clean up the various ways we previously used to detect this. Finally, initialize the TTM object reserved to be able to update flags and caching before anyone else gets hold of the object. Signed-off-by: Thomas Hellström

[PATCH v3 3/4] drm/i915/ttm: Calculate the object placement at get_pages time

2021-06-14 Thread Thomas Hellström
Instead of relying on a static placement, calculate at get_pages() time. This should work for LMEM regions and system for now. For stolen we need to take preallocated range into account. That will if needed be added later. Signed-off-by: Thomas Hellström Reviewed-by: Matthew Auld --- v2

[PATCH v3 0/4] drm/i915: Move system memory to TTM for discrete

2021-06-14 Thread Thomas Hellström
the last patch (migration) It needs selftests and some additional work. - Unconditionally add VM_IO at mmap time. v3: - More style fixes (reported by Matthew Auld) - Don't overfill the busy placement vector (reported by Mattew Auld) Thomas Hellström (4): drm/i915: Update object placement flags

Re: [Intel-gfx] [PATCH v4 2/4] drm/i915/ttm: Adjust gem flags and caching settings after a move

2021-06-14 Thread Thomas Hellström
On 6/14/21 3:48 PM, Matthew Auld wrote: On Mon, 14 Jun 2021 at 12:54, Thomas Hellström wrote: After a TTM move or object init we need to update the i915 gem flags and caching settings to reflect the new placement. Currently caching settings are not changed during the lifetime of an object

Re: [Intel-gfx] [PATCH v3 2/4] drm/i915/ttm: Adjust gem flags and caching settings after a move

2021-06-14 Thread Thomas Hellström
On 6/14/21 12:49 PM, Matthew Auld wrote: On Mon, 14 Jun 2021 at 11:32, Thomas Hellström wrote: On 6/14/21 12:20 PM, Matthew Auld wrote: On Mon, 14 Jun 2021 at 10:53, Thomas Hellström wrote: After a TTM move or object init we need to update the i915 gem flags and caching settings

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

2021-06-14 Thread Thomas Hellström
CONFIG_BROKEN. Signed-off-by: Matthew Auld Cc: Thomas Hellström Cc: Daniel Vetter Cc: Dave Airlie Reviewed-by: Thomas Hellström + CC: Christian König, With this in place, I think The mock memory_region and hugepages selftests will be sensitive to changes in TTM on most intel platforms

[PATCH v4 0/4] drm/i915: Move system memory to TTM for discrete

2021-06-14 Thread Thomas Hellström
Auld) Thomas Hellström (4): drm/i915: Update object placement flags to be mutable drm/i915/ttm: Adjust gem flags and caching settings after a move drm/i915/ttm: Calculate the object placement at get_pages time drm/i915/ttm: Use TTM for system memory drivers/gpu/drm/i915/gem

[PATCH v4 1/4] drm/i915: Update object placement flags to be mutable

2021-06-14 Thread Thomas Hellström
. The flags will change during migration under the object lock. Signed-off-by: Thomas Hellström Reviewed-by: Matthew Auld --- v2: - Unconditionally set VM_IO on our VMAs in line with the rest core gem and TTM. Since the bo might be migrated while the VMA is still alive, there is no sense

[PATCH v4 2/4] drm/i915/ttm: Adjust gem flags and caching settings after a move

2021-06-14 Thread Thomas Hellström
page allocations. Also introduce gpu_binds_iomem() and cpu_maps_iomem() to clean up the various ways we previously used to detect this. Finally, initialize the TTM object reserved to be able to update flags and caching before anyone else gets hold of the object. Signed-off-by: Thomas Hellström

[PATCH v4 3/4] drm/i915/ttm: Calculate the object placement at get_pages time

2021-06-14 Thread Thomas Hellström
Instead of relying on a static placement, calculate at get_pages() time. This should work for LMEM regions and system for now. For stolen we need to take preallocated range into account. That will if needed be added later. Signed-off-by: Thomas Hellström Reviewed-by: Matthew Auld --- v2

[PATCH v4 4/4] drm/i915/ttm: Use TTM for system memory

2021-06-14 Thread Thomas Hellström
elaborate shrinker for that memory. Signed-off-by: Thomas Hellström Reviewed-by: Matthew Auld --- v2: - Fix IS_ERR_OR_NULL() check to IS_ERR() (Reported by Matthew Auld) v3: - Commit message typo fix --- drivers/gpu/drm/i915/gem/i915_gem_ttm.c| 22 ++ drivers/gpu/drm/i915

[PATCH v3 00/12] i915 TTM sync accelerated migration and clear

2021-06-14 Thread Thomas Hellström
and destructor drm/i915/gt: Pipelined page migration drm/i915/gt: Pipelined clear drm/i915/gt: Setup a default migration context on the GT Ramalingam C (1): drm/i915/ttm: accelerated move implementation Thomas Hellström (5): drm/i915: Reference objects on the ww object list drm/i915: Break out

[PATCH v3 03/12] drm/i915: Introduce a ww transaction helper

2021-06-14 Thread 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 +- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git

[PATCH v3 02/12] drm/i915: Break out dma_resv ww locking utilities to separate files

2021-06-14 Thread Thomas Hellström
As we're about to add more ww-related functionality, break out the dma_resv ww locking utilities to their own files Signed-off-by: Thomas Hellström Reviewed-by: Matthew Auld --- v2: - Make sure filenames are sorted in include file lists and Makefile (Reported by Matthew Auld) --- drivers/gpu

[PATCH v3 09/12] drm/i915/gt: Setup a default migration context on the GT

2021-06-14 Thread Thomas Hellström
From: Chris Wilson Set up a default migration context on the GT and use it from the selftests. Add a perf selftest and make sure we exercise LMEM if available. Signed-off-by: Chris Wilson Co-developed-by: Thomas Hellström Signed-off-by: Thomas Hellström Reviewed-by: Matthew Auld --- v3

[PATCH v3 12/12] drm/i915/gem: Zap the i915_gem_object_blt code

2021-06-14 Thread Thomas Hellström
It's unused with the exception of selftest. Replace a call in the memory_region live selftest with a call into a corresponding function in the new migrate code. Signed-off-by: Thomas Hellström --- drivers/gpu/drm/i915/Makefile | 1 - .../gpu/drm/i915/gem/i915_gem_object_blt.c

[PATCH v3 11/12] drm/i915/gem: Zap the client blt code

2021-06-14 Thread Thomas Hellström
It's not used anywhere. Signed-off-by: Thomas Hellström --- drivers/gpu/drm/i915/Makefile | 1 - .../gpu/drm/i915/gem/i915_gem_client_blt.c| 355 - .../gpu/drm/i915/gem/i915_gem_client_blt.h| 21 - .../i915/gem/selftests/i915_gem_client_blt.c | 704

[PATCH v3 10/12] drm/i915/ttm: accelerated move implementation

2021-06-14 Thread Thomas Hellström
From: Ramalingam C Invokes the pipelined page migration through blt, for i915_ttm_move requests of eviction and also obj clear. Signed-off-by: Ramalingam C --- v2: - subfunction for accel_move (Thomas) - engine_pm_get/put around context_move/clear (Thomas) - Invalidation at accel_clear

[PATCH v3 08/12] drm/i915/gt: Pipelined clear

2021-06-14 Thread Thomas Hellström
From: Chris Wilson Update the PTE and emit a clear within a single unpreemptible packet such that we can schedule and pipeline clears. Signed-off-by: Chris Wilson Co-developed-by: Thomas Hellström Signed-off-by: Thomas Hellström --- v3: - Handle engine instances correctly (Reported

[PATCH v3 04/12] drm/i915/gt: Add an insert_entry for gen8_ppgtt

2021-06-14 Thread Thomas Hellström
From: Chris Wilson In the next patch, we will want to write a PTE for an explicit dma address, outside of the usual vma. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld --- drivers/gpu/drm/i915/gt/gen8_ppgtt.c | 19 +++ 1 file changed, 19 insertions(+) diff --git

[PATCH v3 07/12] drm/i915/gt: Pipelined page migration

2021-06-14 Thread Thomas Hellström
reschedule individual operations however we see fit. And most importantly, we do not need to take a global lock on the shared vm, and wait until the operation is complete before releasing the lock for others to claim the PTE for themselves. Signed-off-by: Chris Wilson Co-developed-by: Thomas Hellström

[PATCH v3 06/12] drm/i915/gt: Export the pinned context constructor and destructor

2021-06-14 Thread Thomas Hellström
From: Chris Wilson Allow internal clients to create and destroy a pinned context. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld --- v2: - (Thomas) Export also the pinned context destructor --- drivers/gpu/drm/i915/gt/intel_engine.h| 11 +

[PATCH v3 01/12] drm/i915: Reference objects on the ww object list

2021-06-14 Thread Thomas Hellström
this is really needed. But I think this is motivated by the fact that locking is typically difficult to get right, and whatever we can do to make it simpler for developers moving forward should be done, unless the performance impact is far too high. Signed-off-by: Thomas Hellström Reviewed-by: Matthew

[PATCH v3 05/12] drm/i915/gt: Add a routine to iterate over the pagetables of a GTT

2021-06-14 Thread Thomas Hellström
From: Chris Wilson In the next patch, we will want to look at the dma addresses of individual page tables, so add a routine to iterate over them. Signed-off-by: Chris Wilson Reviewed-by: Matthew Auld --- drivers/gpu/drm/i915/gt/gen8_ppgtt.c | 49

Re: [PATCH v3 10/12] drm/i915/ttm: accelerated move implementation

2021-06-14 Thread Thomas Hellström
On 6/14/21 6:26 PM, Thomas Hellström wrote: From: Ramalingam C Invokes the pipelined page migration through blt, for i915_ttm_move requests of eviction and also obj clear. Signed-off-by: Ramalingam C --- v2: - subfunction for accel_move (Thomas) - engine_pm_get/put around context_move

Re: [PATCH v3 11/12] drm/i915/gem: Zap the client blt code

2021-06-14 Thread Thomas Hellström
On 6/14/21 6:33 PM, Matthew Auld wrote: On 14/06/2021 17:26, Thomas Hellström wrote: It's not used anywhere. Signed-off-by: Thomas Hellström We do have to keep igt_client_tiled_blits subtest, it's not related to the client blitting code and was added afterwards. Not completely sure why

[PATCH v5 4/4] drm/i915/ttm: Use TTM for system memory

2021-06-14 Thread Thomas Hellström
elaborate shrinker for that memory. Signed-off-by: Thomas Hellström Reviewed-by: Matthew Auld --- v2: - Fix IS_ERR_OR_NULL() check to IS_ERR() (Reported by Matthew Auld) v3: - Commit message typo fix --- drivers/gpu/drm/i915/gem/i915_gem_ttm.c| 22 ++ drivers/gpu/drm/i915

[PATCH v5 1/4] drm/i915: Update object placement flags to be mutable

2021-06-14 Thread Thomas Hellström
. The flags will change during migration under the object lock. Signed-off-by: Thomas Hellström Reviewed-by: Matthew Auld --- v2: - Unconditionally set VM_IO on our VMAs in line with the rest core gem and TTM. Since the bo might be migrated while the VMA is still alive, there is no sense

[PATCH v5 2/4] drm/i915/ttm: Adjust gem flags and caching settings after a move

2021-06-14 Thread Thomas Hellström
page allocations. Also introduce gpu_binds_iomem() and cpu_maps_iomem() to clean up the various ways we previously used to detect this. Finally, initialize the TTM object reserved to be able to update flags and caching before anyone else gets hold of the object. Signed-off-by: Thomas Hellström

[PATCH v5 0/4] drm/i915: Move system memory to TTM for discrete

2021-06-14 Thread Thomas Hellström
Auld) v5: - Remove confusion around shrinkable objects again, but this time in the correct patch. (reported by Matthew Auld) Thomas Hellström (4): drm/i915: Update object placement flags to be mutable drm/i915/ttm: Adjust gem flags and caching settings after a move drm/i915/ttm: Calculate

[PATCH v5 3/4] drm/i915/ttm: Calculate the object placement at get_pages time

2021-06-14 Thread Thomas Hellström
Instead of relying on a static placement, calculate at get_pages() time. This should work for LMEM regions and system for now. For stolen we need to take preallocated range into account. That will if needed be added later. Signed-off-by: Thomas Hellström Reviewed-by: Matthew Auld --- v2

Re: [Intel-gfx] [PATCH 7/9] drm/i915/gt: Pipelined page migration

2021-06-08 Thread Thomas Hellström
On Tue, 2021-06-08 at 17:18 +0100, Matthew Auld wrote: > On Tue, 8 Jun 2021 at 10:29, Thomas Hellström > wrote: > > > > From: Chris Wilson > > > > If we pipeline the PTE updates and then do the copy of those pages > > within a single unpreemptible command

Re: [PATCH 7/9] drm/i915/gt: Pipelined page migration

2021-06-08 Thread Thomas Hellström
On Tue, 2021-06-08 at 11:28 +0200, Thomas Hellström wrote: > From: Chris Wilson > > If we pipeline the PTE updates and then do the copy of those pages > within a single unpreemptible command packet, we can submit the > copies > and leave them to be scheduled without having to

Re: [Intel-gfx] [PATCH 3/9] drm/i915: Introduce a ww transaction helper

2021-06-08 Thread Thomas Hellström
On Tue, 2021-06-08 at 18:17 +0100, Matthew Auld wrote: > On Tue, 8 Jun 2021 at 10:29, Thomas Hellström > wrote: > > > > Introduce a for_i915_gem_ww(){} utility to help make the code > > around a ww transaction more readable. > > > > Signed-off-by: Thomas Hel

[PATCH v2 0/9] Prereqs for TTM accelerated migration

2021-06-09 Thread Thomas Hellström
a default migration context on the GT Thomas Hellström (3): drm/i915: Reference objects on the ww object list drm/i915: Break out dma_resv ww locking utilities to separate files drm/i915: Introduce a ww transaction helper drivers/gpu/drm/i915/Makefile | 2 + drivers/gpu/drm

[PATCH v2 2/9] drm/i915: Break out dma_resv ww locking utilities to separate files

2021-06-09 Thread Thomas Hellström
As we're about to add more ww-related functionality, break out the dma_resv ww locking utilities to their own files Signed-off-by: Thomas Hellström Reviewed-by: Matthew Auld --- v2: - Make sure filenames are sorted in include file lists and Makefile (Reported by Matthew Auld) --- drivers/gpu

[PATCH v2 7/9] drm/i915/gt: Pipelined page migration

2021-06-09 Thread Thomas Hellström
reschedule individual operations however we see fit. And most importantly, we do not need to take a global lock on the shared vm, and wait until the operation is complete before releasing the lock for others to claim the PTE for themselves. Signed-off-by: Chris Wilson Co-developed-by: Thomas Hellström

[PATCH v2 8/9] drm/i915/gt: Pipelined clear

2021-06-09 Thread Thomas Hellström
From: Chris Wilson Update the PTE and emit a clear within a single unpreemptible packet such that we can schedule and pipeline clears. Signed-off-by: Chris Wilson Co-developed-by: Thomas Hellström Signed-off-by: Thomas Hellström --- drivers/gpu/drm/i915/gt/intel_migrate.c| 141

[PATCH v2 9/9] drm/i915/gt: Setup a default migration context on the GT

2021-06-09 Thread Thomas Hellström
From: Chris Wilson Set up a default migration context on the GT and use it from the selftests. Add a perf selftest and make sure we exercise LMEM if available. Signed-off-by: Chris Wilson Co-developed-by: Thomas Hellström Signed-off-by: Thomas Hellström --- drivers/gpu/drm/i915/gt

[PATCH v2 3/9] drm/i915: Introduce a ww transaction helper

2021-06-09 Thread 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 +- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git

[PATCH v2 1/9] drm/i915: Reference objects on the ww object list

2021-06-09 Thread Thomas Hellström
this is really needed. But I think this is motivated by the fact that locking is typically difficult to get right, and whatever we can do to make it simpler for developers moving forward should be done, unless the performance impact is far too high. Signed-off-by: Thomas Hellström Reviewed-by: Matthew

[PATCH v2 5/9] drm/i915/gt: Add a routine to iterate over the pagetables of a GTT

2021-06-09 Thread Thomas Hellström
From: Chris Wilson In the next patch, we will want to look at the dma addresses of individual page tables, so add a routine to iterate over them. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/gt/gen8_ppgtt.c | 49 drivers/gpu/drm/i915/gt/intel_gtt.h | 7

[PATCH v2 4/9] drm/i915/gt: Add an insert_entry for gen8_ppgtt

2021-06-09 Thread Thomas Hellström
From: Chris Wilson In the next patch, we will want to write a PTE for an explicit dma address, outside of the usual vma. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/gt/gen8_ppgtt.c | 19 +++ 1 file changed, 19 insertions(+) diff --git

[PATCH v2 6/9] drm/i915/gt: Export the pinned context constructor and destructor

2021-06-09 Thread Thomas Hellström
From: Chris Wilson Allow internal clients to create and destroy a pinned context. Signed-off-by: Chris Wilson --- v2: - (Thomas) Export also the pinned context destructor --- drivers/gpu/drm/i915/gt/intel_engine.h| 11 + drivers/gpu/drm/i915/gt/intel_engine_cs.c | 27

Re: [Intel-gfx] [PATCH v2 0/9] Prereqs for TTM accelerated migration

2021-06-09 Thread Thomas Hellström
On 6/9/21 1:48 PM, Daniel Vetter wrote: On Wed, Jun 09, 2021 at 08:34:27AM +0200, Thomas Hellström wrote: A couple of patches from Chris which implement pipelined migration and clears by atomically writing the PTEs in place before performing the actual blit. Some ww utilities mainly

Re: [Intel-gfx] [PATCH v2 0/9] Prereqs for TTM accelerated migration

2021-06-09 Thread Thomas Hellström
On 6/9/21 2:20 PM, Matthew Auld wrote: On 09/06/2021 13:16, Thomas Hellström wrote: On 6/9/21 1:48 PM, Daniel Vetter wrote: On Wed, Jun 09, 2021 at 08:34:27AM +0200, Thomas Hellström wrote: A couple of patches from Chris which implement pipelined migration and clears by atomically writing

Re: [Intel-gfx] [PATCH v2 0/9] Prereqs for TTM accelerated migration

2021-06-09 Thread Thomas Hellström
On 6/9/21 3:08 PM, Thomas Hellström wrote: On 6/9/21 2:20 PM, Matthew Auld wrote: On 09/06/2021 13:16, Thomas Hellström wrote: On 6/9/21 1:48 PM, Daniel Vetter wrote: On Wed, Jun 09, 2021 at 08:34:27AM +0200, Thomas Hellström wrote: A couple of patches from Chris which implement pipelined

Re: [PATCH 2/6] drm/i915/ttm: add i915_sg_from_buddy_resource

2021-06-08 Thread Thomas Hellström
On Mon, 2021-06-07 at 19:22 +0100, Matthew Auld wrote: > We need to be able to build an sg table from our list of buddy > blocks, > so that we can later plug this into our ttm backend, and replace our > use > of the range manager. > > Signed-off-by: Matthew Auld > Cc: Tho

Re: [PATCH 4/6] drm/i915/ttm: pass along the I915_BO_ALLOC_CONTIGUOUS

2021-06-08 Thread Thomas Hellström
manager, where allocations are by default not contiguous. > > Signed-off-by: Matthew Auld > Cc: Thomas Hellström > --- >  drivers/gpu/drm/i915/gem/i915_gem_ttm.c | 15 --- >  1 file changed, 12 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/i915/gem/

Re: [PATCH 1/6] drm/i915/ttm: add ttm_buddy_man

2021-06-08 Thread Thomas Hellström
On 6/8/21 10:11 AM, Matthew Auld wrote: On 08/06/2021 08:11, Thomas Hellström wrote: On Mon, 2021-06-07 at 19:22 +0100, Matthew Auld wrote: Add back our standalone i915_buddy allocator and integrate it into a ttm_resource_manager. This will plug into our ttm backend for managing device local

Re: [PATCH] drm/ttm: fix pipelined gutting v2

2021-06-08 Thread Thomas Hellström
On 6/8/21 10:19 AM, Christian König wrote: We need to make sure to allocate the sys_mem resource before the point of no return. v2: add missing return value checking, also handle idle case Signed-off-by: Christian König lgtm. Reviewed-by: Thomas Hellström

[PATCH 8/9] drm/i915/gt: Pipelined clear

2021-06-08 Thread Thomas Hellström
From: Chris Wilson Update the PTE and emit a clear within a single unpreemptible packet such that we can schedule and pipeline clears. Signed-off-by: Chris Wilson Co-developed-by: Thomas Hellström Signed-off-by: Thomas Hellström --- drivers/gpu/drm/i915/gt/intel_migrate.c| 141

[PATCH 9/9] drm/i915/gt: Setup a default migration context on the GT

2021-06-08 Thread Thomas Hellström
From: Chris Wilson Set up a default migration context on the GT and use it from the selftests. Add a perf selftest and make sure we exercise LMEM if available. Signed-off-by: Chris Wilson Co-developed-by: Thomas Hellström Signed-off-by: Thomas Hellström --- drivers/gpu/drm/i915/gt

Re: [PATCH 01/10] drm/ttm: allocate resource object instead of embedding it v2

2021-06-08 Thread Thomas Hellström
Hi, On 6/2/21 12:09 PM, Christian König wrote: To improve the handling we want the establish the resource object as base class for the backend allocations. v2: add missing error handling Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 4 +-

Re: [PATCH 6/6] drm/i915/ttm: restore min_page_size behaviour

2021-06-08 Thread Thomas Hellström
; Signed-off-by: Matthew Auld > Cc: Thomas Hellström > --- >  drivers/gpu/drm/i915/gem/i915_gem_ttm.c  | 3 +-- >  drivers/gpu/drm/i915/intel_memory_region.h   | 3 +-- >  drivers/gpu/drm/i915/intel_region_ttm.c  | 2 +- >  drivers/gpu/drm/i915/selftests/mock_region.c | 2

Re: [PATCH 5/6] drm/i915/ttm: switch over to ttm_buddy_man

2021-06-08 Thread Thomas Hellström
r > stolen we also don't need to reserve anything so no need to support a > generic reserve interface. > > Signed-off-by: Matthew Auld > Cc: Thomas Hellström > --- >  drivers/gpu/drm/i915/gem/i915_gem_ttm.c   |  26 +-- >  drivers/gpu/drm/i915/intel_memory_region

[PATCH 5/9] drm/i915/gt: Add a routine to iterate over the pagetables of a GTT

2021-06-08 Thread Thomas Hellström
From: Chris Wilson In the next patch, we will want to look at the dma addresses of individual page tables, so add a routine to iterate over them. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/gt/gen8_ppgtt.c | 49 drivers/gpu/drm/i915/gt/intel_gtt.h | 7

[PATCH 6/9] drm/i915/gt: Export the pinned context constructor

2021-06-08 Thread Thomas Hellström
From: Chris Wilson Allow internal clients to create a pinned context. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/gt/intel_engine.h| 9 + drivers/gpu/drm/i915/gt/intel_engine_cs.c | 21 ++--- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git

[PATCH 4/9] drm/i915/gt: Add an insert_entry for gen8_ppgtt

2021-06-08 Thread Thomas Hellström
From: Chris Wilson In the next patch, we will want to write a PTE for an explicit dma address, outside of the usual vma. Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/gt/gen8_ppgtt.c | 19 +++ 1 file changed, 19 insertions(+) diff --git

[PATCH 7/9] drm/i915/gt: Pipelined page migration

2021-06-08 Thread Thomas Hellström
reschedule individual operations however we see fit. And most importantly, we do not need to take a global lock on the shared vm, and wait until the operation is complete before releasing the lock for others to claim the PTE for themselves. Signed-off-by: Chris Wilson Co-developed-by: Thomas Hellström

[PATCH 0/9] Prereqs for TTM accelerated migration

2021-06-08 Thread Thomas Hellström
: Export the pinned context constructor drm/i915/gt: Pipelined page migration drm/i915/gt: Pipelined clear drm/i915/gt: Setup a default migration context on the GT Thomas Hellström (3): drm/i915: Reference objects on the ww object list drm/i915: Break out dma_resv ww locking utilities

[PATCH 1/9] drm/i915: Reference objects on the ww object list

2021-06-08 Thread Thomas Hellström
this is really needed. But I think this is motivated by the fact that locking is typically difficult to get right, and whatever we can do to make it simpler for developers moving forward should be done, unless the performance impact is far too high. Signed-off-by: Thomas Hellström --- drivers/gpu/drm

[PATCH 2/9] drm/i915: Break out dma_resv ww locking utilities to separate files

2021-06-08 Thread Thomas Hellström
As we're about to add more ww-related functionality, break out the dma_resv ww locking utilities to their own files Signed-off-by: Thomas Hellström --- drivers/gpu/drm/i915/Makefile | 1 + drivers/gpu/drm/i915/gem/i915_gem_object.h | 1 + drivers/gpu/drm/i915/gt

[PATCH 3/9] drm/i915: Introduce a ww transaction helper

2021-06-08 Thread 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 --- drivers/gpu/drm/i915/i915_gem_ww.h | 31 +- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/i915

Re: [PATCH 1/6] drm/i915/ttm: add ttm_buddy_man

2021-06-08 Thread Thomas Hellström
Matthew Auld > Cc: Thomas Hellström > --- > Since the buddy + selftests have been part of the driver before, I didn't review them separately, but for the TTM interface, some minor comments below. With those fixed, Acked-by: Thomas Hellström > diff --git a/drivers/gpu/drm/i915/i915_t

Re: [PATCH] drm/ttm: fix pipelined gutting

2021-06-08 Thread Thomas Hellström
On 6/8/21 9:50 AM, Christian König wrote: We need to make sure to allocate the sys_mem resource before the point of no return. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo_util.c | 22 -- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git

Re: [PATCH 5/6] drm/i915/ttm: switch over to ttm_buddy_man

2021-06-08 Thread Thomas Hellström
r > stolen we also don't need to reserve anything so no need to support a > generic reserve interface. > > Signed-off-by: Matthew Auld > Cc: Thomas Hellström lgtm. Reviewed-by: Thomas Hellström

[PATCH v11 4/4] drm/i915: Use ttm mmap handling for ttm bo's.

2021-06-10 Thread Thomas Hellström
ers to look at vma_node->driver_private to fetch the bo, if it's NULL, we assume i915's normal mmap_offset uapi is used. This is the easiest way to achieve compatibility without changing ttm's semantics. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas Hellström --- - Fixed some minor style

[PATCH v11 1/4] drm/i915/ttm: Introduce a TTM i915 gem object backend

2021-06-10 Thread Thomas Hellström
porting of GGTT bindings to TTM. Remove the old lmem backend. Signed-off-by: Thomas Hellström Reviewed-by: Matthew Auld --- v2: - Break out needed TTM functionality to a separate patch (Reported by Christian König). - Fix an unhandled error (Reported by Matthew Auld and Maarten Lankhorst

[PATCH v11 3/4] drm/vma: Add a driver_private member to vma_node.

2021-06-10 Thread Thomas Hellström
From: Maarten Lankhorst This allows drivers to distinguish between different types of vma_node's. The readonly flag was unused and is thus removed. This is a temporary solution, until i915 is converted completely to use ttm for bo's. Signed-off-by: Maarten Lankhorst Reviewed-by: Thomas

[PATCH v11 0/4] Move LMEM (VRAM) management over to TTM

2021-06-10 Thread Thomas Hellström
Remaining patches rebased on latest TTM changes posted for reference and CI. Maarten Lankhorst (2): drm/vma: Add a driver_private member to vma_node. drm/i915: Use ttm mmap handling for ttm bo's. Thomas Hellström (2): drm/i915/ttm: Introduce a TTM i915 gem object backend drm/i915/lmem

[PATCH v11 2/4] drm/i915/lmem: Verify checks for lmem residency

2021-06-10 Thread Thomas Hellström
Since objects can be migrated or evicted when not pinned or locked, update the checks for lmem residency or future residency so that the value returned is not immediately stale. Signed-off-by: Thomas Hellström Reviewed-by: Matthew Auld --- v2: Simplify i915_gem_object_migratable() (Reported

  1   2   3   4   5   6   7   8   9   10   >