Re: [PATCH v4 1/8] drm/i915/gt: Use XY_FASR_COLOR_BLT to clear obj on graphics ver 12+

2022-03-21 Thread Hellstrom, Thomas
On Sun, 2022-03-20 at 02:12 +0530, Ramalingam C wrote: > XY_FAST_COLOR_BLT cmd is faster than the older XY_COLOR_BLT. Hence > for > clearing (Zero out) the pages of the newly allocated object, faster > cmd > is used. NIT: Imperative wording > > Signed-off-by: Ramalingam C > Signed-off-by: Chris

Re: [PATCH v4 4/8] drm/i915/selftest_migrate: Check CCS meta data clear

2022-03-21 Thread Hellstrom, Thomas
On Sun, 2022-03-20 at 02:12 +0530, Ramalingam C wrote: > While clearing the Flat-CCS capable lmem object, we need to clear the > CCS > meta data corresponding to the memory. > > As part of live_migrate_clear add check for the ccs meta data clear > for > the Flat-CCS capable lmem object. > > Signe

Re: [PATCH v7 1/9] drm/i915/gt: use engine instance directly for offset

2022-03-28 Thread Hellstrom, Thomas
On Tue, 2022-03-29 at 00:37 +0530, Ramalingam C wrote: > To make it uniform across copy and clear, use the engine offset > directly > to calculate the offset in the cmd forming for emit_clear. > > Signed-off-by: Ramalingam C > --- >  drivers/gpu/drm/i915/gt/intel_migrate.c | 11 --- >  1 f

Re: [PATCH v2 1/4] drm/i915/gt: Clear compress metadata for Xe_HP platforms

2022-03-02 Thread Hellstrom, Thomas
On Wed, 2022-03-02 at 03:23 +0530, Ramalingam C wrote: > From: Ayaz A Siddiqui > > Xe-HP and latest devices support Flat CCS which reserved a portion of > the device memory to store compression metadata, during the clearing > of > device memory buffer object we also need to clear the associated >

Re: [PATCH v2 4/4] drm/i915/migrate: Evict and restore the flatccs capable lmem obj

2022-03-03 Thread Hellstrom, Thomas
On Wed, 2022-03-02 at 03:23 +0530, Ramalingam C wrote: > When we are swapping out the local memory obj on flat-ccs capable > platform, > we need to capture the ccs data too along with main meory and we need > to > restore it when we are swapping in the content. > > When lmem object is swapped into

Re: [PATCH] drm/i915/gt: Handle errors for i915_gem_object_trylock

2022-03-03 Thread Hellstrom, Thomas
On Wed, 2022-03-02 at 10:37 +, Tvrtko Ursulin wrote: > > + Thomas, Matt > > On 02/03/2022 06:19, Jiasheng Jiang wrote: > > As the potential failure of the i915_gem_object_trylock(), > > it should be better to check it and return error if fails. > > > > Fixes: 94ce0d65076c ("drm/i915/gt: Setu

Re: [PATCH v3 1/6] drm/i915/gt: Use XY_FASR_COLOR_BLT to clear obj on graphics ver 12+

2022-03-07 Thread Hellstrom, Thomas
Hi, Ram. Typo in patch title FASR/FAST On Mon, 2022-03-07 at 19:10 +0530, Ramalingam C wrote: > XY_FAST_COLOR_BLT cmd is faster than the older XY_COLOR_BLT. Hence > for > clearing (Zero out) the pages of the newly allocated object, faster > cmd > is used. > > Signed-off-by: Ramalingam C > Signe

Re: [PATCH v3 2/6] drm/i915/gt: Clear compress metadata for Flat-ccs objects

2022-03-07 Thread Hellstrom, Thomas
On Mon, 2022-03-07 at 19:10 +0530, Ramalingam C wrote: > Xe-HP and latest devices support Flat CCS which reserved a portion of > the device memory to store compression metadata, during the clearing > of > device memory buffer object we also need to clear the associated > CCS buffer. > > XY_FAST_CO

Re: [RFC 0/2] drm/i915/ttm: Evict and store of compressed object

2022-02-07 Thread Hellstrom, Thomas
Hi, Christian, On Mon, 2022-02-07 at 12:41 +0100, Christian König wrote: > Am 07.02.22 um 10:37 schrieb Ramalingam C: > > On flat-ccs capable platform we need to evict and resore the ccs data > > along with the corresponding main memory. > > > > This ccs data can only be access through BLT engine

Re: [RFC 2/2] drm/i915/migrate: Evict and restore the ccs data

2022-02-07 Thread Hellstrom, Thomas
Hi, Ram, A couple of quick questions before starting a more detailed review: 1) Does this also support migrating of compressed data LMEM->LMEM? What-about inter-tile? 2) Do we need to block faulting of compressed data in the fault handler as a follow-up patch? /Thomas On Mon, 2022-02-07 at 15

Re: [RFC 2/2] drm/i915/migrate: Evict and restore the ccs data

2022-02-07 Thread Hellstrom, Thomas
On Mon, 2022-02-07 at 20:44 +0530, Ramalingam C wrote: > On 2022-02-07 at 20:25:42 +0530, Hellstrom, Thomas wrote: > > Hi, Ram, > > > > A couple of quick questions before starting a more detailed review: > > > > 1) Does this also support migrating of compresse

Re: [PATCH 1/4] drm/i915/gt: GEM_BUG_ON unexpected NULL at scatterlist walking

2022-04-21 Thread Hellstrom, Thomas
On Thu, 2022-04-21 at 17:08 +0530, Ramalingam C wrote: > While locating the start of ccs scatterlist in smem scatterlist, that > has > to be the size of lmem obj size + corresponding ccs data size. Report > bug > if scatterlist terminate before that length. > > Signed-off-by: Ramalingam C > --- >

Re: [PATCH 3/4] drm/i915/gt: Extend doc on Flat-CCS obj eviction

2022-04-21 Thread Hellstrom, Thomas
On Thu, 2022-04-21 at 17:08 +0530, Ramalingam C wrote: > Capture the eviction details for Flat-CCS capable lmem only objects > and > lmem objects with smem residency. This also captures the impact of > eviction on  object's memory residency and Flat-CCS compression > state. > > Signed-off-by: Rama

Re: [PATCH 4/4] uapi/drm/i915: Update the placement list impact on obj residency

2022-04-21 Thread Hellstrom, Thomas
On Thu, 2022-04-21 at 17:08 +0530, Ramalingam C wrote: > Object created with list of memory classes as placement preferences, > can > be backed with any memory class of the list as per kernel's migration > policy for the memory contrain situation. Userspace won't be notified > of > the memory resid

Re: [PATCH v5] drm/i915: stop using swiotlb

2022-08-08 Thread Hellstrom, Thomas
Hi, [back from vacation] On Tue, 2022-07-26 at 16:39 +0100, Robert Beckett wrote: > Calling swiotlb functions directly is nowadays considered harmful. > See > https://lore.kernel.org/intel-gfx/20220711082614.ga29...@lst.de/ > > Replace swiotlb_max_segment() calls with dma_max_mapping_size(). > In

Re: [RFC 01/10] drm/i915/vm_bind: Introduce VM_BIND ioctl

2022-07-05 Thread Hellstrom, Thomas
Hi, On Fri, 2022-07-01 at 15:50 -0700, Niranjana Vishwanathapura wrote: > Add VM_BIND and VM_UNBIND ioctls to bind/unbind a section of an > object at the specified GPU virtual addresses. > > Add I915_PARAM_VM_BIND_VERSION to indicate version of VM_BIND feature > supported and I915_VM_CREATE_FLAG

Re: [RFC 01/10] drm/i915/vm_bind: Introduce VM_BIND ioctl

2022-07-07 Thread Hellstrom, Thomas
On Wed, 2022-07-06 at 22:01 -0700, Niranjana Vishwanathapura wrote: > > > +   /** > > > +    * true: allow only vm_bind method of binding. > > > +    * false: allow only legacy execbuff method of binding. > > > +    */ > > > > Use proper kerneldoc. (Same holds for structure documen

Re: [RFC 03/10] drm/i915/vm_bind: Support private and shared BOs

2022-07-07 Thread Hellstrom, Thomas
On Fri, 2022-07-01 at 15:50 -0700, Niranjana Vishwanathapura wrote: > Add uapi allowing user to specify a BO as private to a specified VM > during the BO creation. > VM private BOs can only be mapped on the specified VM and can't be > dma_buf exported. VM private BOs share a single common dma_resv

Re: [RFC 05/10] drm/i915/vm_bind: Handle persistent vmas

2022-07-07 Thread Hellstrom, Thomas
On Fri, 2022-07-01 at 15:50 -0700, Niranjana Vishwanathapura wrote: > Treat VM_BIND vmas as persistent and handle them during the > request submission in the execbuff path. > > Support eviction by maintaining a list of evicted persistent vmas > for rebinding during next submission. > > Signed-off

Re: [RFC 08/10] drm/i915/vm_bind: userptr dma-resv changes

2022-07-07 Thread Hellstrom, Thomas
On Fri, 2022-07-01 at 15:50 -0700, Niranjana Vishwanathapura wrote: > For persistent (vm_bind) vmas of userptr BOs, handle the user > page pinning by using the i915_gem_object_userptr_submit_init() > /done() functions > > Signed-off-by: Niranjana Vishwanathapura > > --- >  .../gpu/drm/i915/gem/i9

Re: [RFC 06/10] drm/i915/vm_bind: Add I915_GEM_EXECBUFFER3 ioctl

2022-07-07 Thread Hellstrom, Thomas
On Fri, 2022-07-01 at 15:50 -0700, Niranjana Vishwanathapura wrote: > Add new execbuf3 ioctl (I915_GEM_EXECBUFFER3) which only > works in vm_bind mode. The vm_bind mode only works with > this new execbuf3 ioctl. > > The new execbuf3 ioctl will not have any execlist I understand this that you mean

Re: [RFC 07/10] drm/i915/vm_bind: Handle persistent vmas in execbuf3

2022-07-07 Thread Hellstrom, Thomas
On Fri, 2022-07-01 at 15:50 -0700, Niranjana Vishwanathapura wrote: > Handle persistent (VM_BIND) mappings during the request submission > in the execbuf3 path. > > Signed-off-by: Niranjana Vishwanathapura > > --- >  .../gpu/drm/i915/gem/i915_gem_execbuffer3.c   | 176 > +- >  1 fi

Re: [RFC 08/10] drm/i915/vm_bind: userptr dma-resv changes

2022-07-08 Thread Hellstrom, Thomas
On Fri, 2022-07-01 at 15:50 -0700, Niranjana Vishwanathapura wrote: > For persistent (vm_bind) vmas of userptr BOs, handle the user > page pinning by using the i915_gem_object_userptr_submit_init() > /done() functions > > Signed-off-by: Niranjana Vishwanathapura > > --- >  .../gpu/drm/i915/gem/i9

Re: [Intel-gfx] [RFC 06/10] drm/i915/vm_bind: Add I915_GEM_EXECBUFFER3 ioctl

2022-07-08 Thread Hellstrom, Thomas
On Thu, 2022-07-07 at 21:38 +0200, Andi Shyti wrote: > Hi, > > > It seems we are duplicating a lot of code from i915_execbuffer.c. > > Did > > you consider > > yeah... while reading the code I was thinking the same then I see > that you made the same comment. Perhaps we need to group > commonali

Re: [RFC 07/10] drm/i915/vm_bind: Handle persistent vmas in execbuf3

2022-07-08 Thread Hellstrom, Thomas
On Fri, 2022-07-08 at 05:44 -0700, Niranjana Vishwanathapura wrote: > On Thu, Jul 07, 2022 at 07:54:16AM -0700, Hellstrom, Thomas wrote: > > On Fri, 2022-07-01 at 15:50 -0700, Niranjana Vishwanathapura wrote: > > > Handle persistent (VM_BIND) mappings during the request > &g

Re: [RFC 03/10] drm/i915/vm_bind: Support private and shared BOs

2022-07-08 Thread Hellstrom, Thomas
On Fri, 2022-07-08 at 06:14 -0700, Niranjana Vishwanathapura wrote: > On Thu, Jul 07, 2022 at 03:31:42AM -0700, Hellstrom, Thomas wrote: > > On Fri, 2022-07-01 at 15:50 -0700, Niranjana Vishwanathapura wrote: > > > Add uapi allowing user to specify a BO as private to a

Re: [RFC 06/10] drm/i915/vm_bind: Add I915_GEM_EXECBUFFER3 ioctl

2022-07-08 Thread Hellstrom, Thomas
Hi, On Fri, 2022-07-08 at 06:47 -0700, Niranjana Vishwanathapura wrote: > On Thu, Jul 07, 2022 at 07:41:54AM -0700, Hellstrom, Thomas wrote: > > On Fri, 2022-07-01 at 15:50 -0700, Niranjana Vishwanathapura wrote: > > > Add new execbuf3 ioctl (I915_GEM_EXECBUFFER3) which o

Re: [RFC 03/10] drm/i915/vm_bind: Support private and shared BOs

2022-07-08 Thread Hellstrom, Thomas
On Fri, 2022-07-08 at 15:43 +0200, Thomas Hellström wrote: > > The vm_bind/bound_list and the non_priv_vm_bind_list are there for > > very different reasons. > > > > The reason for having separate vm_bind_list and vm_bound_list is > > that > > during the execbuf path, we can rebind the unbound map

Re: [RFC 08/10] drm/i915/vm_bind: userptr dma-resv changes

2022-07-08 Thread Hellstrom, Thomas
On Fri, 2022-07-08 at 07:51 -0700, Niranjana Vishwanathapura wrote: > > Since we don't loop over the vm_bound_list, there is a need to > > check > > whether the rebind_list is empty here under the notifier_lock in > > read > > mode, and in that case, restart from eb_lookup_vmas(). That might > > al

Re: [Intel-gfx] [PATCH 1/4] drm/i915: Allow error capture without a request

2023-01-13 Thread Hellstrom, Thomas
On Fri, 2023-01-13 at 09:51 +, Tvrtko Ursulin wrote: > > On 12/01/2023 20:40, John Harrison wrote: > > On 1/12/2023 02:01, Tvrtko Ursulin wrote: > > > On 12/01/2023 02:53, john.c.harri...@intel.com wrote: > > > > From: John Harrison > > > > > > > > There was a report of error captures occurr

Re: [PATCH 1/9] drm/ttm: initialize the system domain with defaults

2020-07-27 Thread Hellstrom, Thomas
On Mon, 2020-07-27 at 12:39 +0200, Christian König wrote: > Am 27.07.20 um 11:42 schrieb dan...@ffwll.ch: > > On Thu, Jul 23, 2020 at 05:16:13PM +0200, Christian König wrote: > > > Instead of repeating that in each driver. > > > > > > Signed-off-by: Christian König > > > --- > > > drivers/gpu/d

Re: [PATCH 1/9] drm/ttm: initialize the system domain with defaults

2020-07-27 Thread Hellstrom, Thomas
On Mon, 2020-07-27 at 14:23 +0200, Christian König wrote: > Am 27.07.20 um 12:50 schrieb Hellstrom, Thomas: > > On Mon, 2020-07-27 at 12:39 +0200, Christian König wrote: > > > Am 27.07.20 um 11:42 schrieb dan...@ffwll.ch: > > > > On Thu, Jul 23, 2020 at 05:

Re: Why can't ttm_tt_swapout() handle uncached or WC BOs?

2020-09-23 Thread Hellstrom, Thomas
On Wed, 2020-09-23 at 13:17 +1000, Dave Airlie wrote: > On Fri, 18 Sep 2020 at 00:49, Christian König < > christian.koe...@amd.com> wrote: > > Am 17.09.20 um 16:44 schrieb Michel Dänzer: > > > On 2020-09-17 2:20 p.m., Christian König wrote: > > > > Hi guys, > > > > > > > > Michel once submitted a

Re: Why can't ttm_tt_swapout() handle uncached or WC BOs?

2020-09-23 Thread Hellstrom, Thomas
On Wed, 2020-09-23 at 16:03 +0200, Christian König wrote: > Am 23.09.20 um 11:24 schrieb Hellstrom, Thomas: > > On Wed, 2020-09-23 at 13:17 +1000, Dave Airlie wrote: > > > On Fri, 18 Sep 2020 at 00:49, Christian König < > > > christian.koe...@amd.com> wrote: >

Re: [v2,2/2] drm/buddy: Add a testcase to verify the multiroot fini

2025-01-15 Thread Hellstrom, Thomas
Hi! On Thu, 2024-12-26 at 12:31 +0530, Arunpravin Paneer Selvam wrote: > - Added a testcase to verify the multiroot force merge fini. > - Added a new field in_use to track the mm freed status. > > v2:(Matthew) >   - Add kunit_fail_current_test() when WARN_ON is true. > > Signed-off-by: Arunpravi

TTM evicting same-vm bos

2025-05-13 Thread Hellstrom, Thomas
Hi, Christian During eviction we want to be able to evict bos that share the VM's reservation object but that are currently not bound to the VM since they are not part of the current working set. TTM can't handle this situation since it's not aware of whether a bo is bound to a VM or not. Do you