Re: [Intel-gfx] [RFC v2 03/12] drm/i915/svm: Implicitly migrate BOs upon CPU access

2019-12-15 Thread Niranjan Vishwanathapura
On Sat, Dec 14, 2019 at 10:58:35AM +, Chris Wilson wrote: Quoting Niranjana Vishwanathapura (2019-12-13 21:56:05) +int i915_gem_object_migrate_region(struct drm_i915_gem_object *obj, + u32 *regions, int size) +{ + struct drm_i915_private *dev_priv = to_

Re: [Intel-gfx] [RFC v2 02/12] drm/i915/svm: Runtime (RT) allocator support

2019-12-15 Thread Niranjan Vishwanathapura
On Sat, Dec 14, 2019 at 10:56:54AM +, Chris Wilson wrote: Quoting Niranjana Vishwanathapura (2019-12-13 21:56:04) Shared Virtual Memory (SVM) runtime allocator support allows binding a shared virtual address to a buffer object (BO) in the device page table through an ioctl call. Cc: Joonas

Re: [Intel-gfx] [RFC v2 02/12] drm/i915/svm: Runtime (RT) allocator support

2019-12-15 Thread Niranjan Vishwanathapura
On Sat, Dec 14, 2019 at 10:31:37AM +, Chris Wilson wrote: Quoting Jason Ekstrand (2019-12-14 00:36:19) On Fri, Dec 13, 2019 at 5:24 PM Niranjan Vishwanathapura < niranjana.vishwanathap...@intel.com> wrote: On Fri, Dec 13, 2019 at 04:58:42PM -0600, Jason Ekstrand

Re: [Intel-gfx] [RFC v2 02/12] drm/i915/svm: Runtime (RT) allocator support

2019-12-13 Thread Niranjan Vishwanathapura
On Fri, Dec 13, 2019 at 04:58:42PM -0600, Jason Ekstrand wrote: +/** + * struct drm_i915_gem_vm_bind + * + * Bind an object in a vm's page table. First off, this is something I've wanted for a while for Vulkan, it's just never made its way high enough up the priority list.

Re: [RFC 06/13] drm/i915/svm: Page table mirroring support

2019-12-03 Thread Niranjan Vishwanathapura
On Tue, Nov 26, 2019 at 06:32:52PM +, Jason Gunthorpe wrote: On Mon, Nov 25, 2019 at 11:33:27AM -0500, Jerome Glisse wrote: On Fri, Nov 22, 2019 at 11:33:12PM +, Jason Gunthorpe wrote: > On Fri, Nov 22, 2019 at 12:57:27PM -0800, Niranjana Vishwanathapura wrote: [...] > > +static int >

Re: [RFC 06/13] drm/i915/svm: Page table mirroring support

2019-12-03 Thread Niranjan Vishwanathapura
On Tue, Nov 26, 2019 at 06:45:14PM +, Jason Gunthorpe wrote: On Mon, Nov 25, 2019 at 08:32:58AM -0800, Niranjan Vishwanathapura wrote: > And putting the cpu PFN of a ZONE_DEVICE device page into > sg_dma_address still looks very wrong to me The below call in patch 7 does convert a

Re: [Intel-gfx] [RFC 03/13] drm/i915/svm: Runtime (RT) allocator support

2019-12-02 Thread Niranjan Vishwanathapura
On Thu, Nov 28, 2019 at 02:12:30PM +0200, Joonas Lahtinen wrote: Quoting Niranjan Vishwanathapura (2019-11-27 21:23:56) >We should try to have the uAPI as final as early as possible. The >change process is harder the later it is done, even for RFC :) > >On the same note, I'm

Re: [RFC 00/13] drm/i915/svm: Add SVM support

2019-12-02 Thread Niranjan Vishwanathapura
On Tue, Nov 26, 2019 at 04:03:21PM +0200, Joonas Lahtinen wrote: Quoting Niranjana Vishwanathapura (2019-11-22 22:57:21) Shared Virtual Memory (SVM) allows the programmer to use a single virtual address space which will be shared between threads executing on CPUs and GPUs. It abstracts away from

Re: [RFC 02/13] drm/i915/svm: Define SVM UAPI

2019-11-27 Thread Niranjan Vishwanathapura
On Tue, Nov 26, 2019 at 03:44:26PM +0200, Joonas Lahtinen wrote: Quoting Niranjana Vishwanathapura (2019-11-22 22:57:23) Define UAPI for Shared Virtual Memory (SVM) fucntionality including SVM capability and configurability. When there is no GPU page fault support available, add ioctls to explic

Re: [Intel-gfx] [RFC 03/13] drm/i915/svm: Runtime (RT) allocator support

2019-11-27 Thread Niranjan Vishwanathapura
On Tue, Nov 26, 2019 at 03:59:31PM +0200, Joonas Lahtinen wrote: Quoting Niranjan Vishwanathapura (2019-11-25 18:40:57) On Mon, Nov 25, 2019 at 09:59:37AM +, Chris Wilson wrote: >Quoting Niranjana Vishwanathapura (2019-11-22 20:57:24) >> Shared Virtual Memory (SVM) runtime allocato

Re: [RFC 06/13] drm/i915/svm: Page table mirroring support

2019-11-25 Thread Niranjan Vishwanathapura
On Mon, Nov 25, 2019 at 11:33:27AM -0500, Jerome Glisse wrote: On Fri, Nov 22, 2019 at 11:33:12PM +, Jason Gunthorpe wrote: On Fri, Nov 22, 2019 at 12:57:27PM -0800, Niranjana Vishwanathapura wrote: [...] > +static int > +i915_range_fault(struct i915_svm *svm, struct hmm_range *range) >

Re: [Intel-gfx] [RFC 03/13] drm/i915/svm: Runtime (RT) allocator support

2019-11-25 Thread Niranjan Vishwanathapura
On Mon, Nov 25, 2019 at 09:59:37AM +, Chris Wilson wrote: Quoting Niranjana Vishwanathapura (2019-11-22 20:57:24) Shared Virtual Memory (SVM) runtime allocator support allows binding a shared virtual address to a buffer object (BO) in the device page table through an ioctl call. The ioctl

Re: [RFC 06/13] drm/i915/svm: Page table mirroring support

2019-11-25 Thread Niranjan Vishwanathapura
On Mon, Nov 25, 2019 at 01:24:18PM +, Jason Gunthorpe wrote: On Sun, Nov 24, 2019 at 01:12:47PM -0800, Niranjan Vishwanathapura wrote: > > > Using a temporary range is the pattern from nouveau, is it really > > > necessary in this driver? > > > > Yah, not

Re: [RFC 06/13] drm/i915/svm: Page table mirroring support

2019-11-24 Thread Niranjan Vishwanathapura
On Sat, Nov 23, 2019 at 11:53:52PM +, Jason Gunthorpe wrote: On Fri, Nov 22, 2019 at 08:44:18PM -0800, Niranjan Vishwanathapura wrote: On Fri, Nov 22, 2019 at 11:33:12PM +, Jason Gunthorpe wrote: > On Fri, Nov 22, 2019 at 12:57:27PM -0800, Niranjana Vishwanathapura wrote: > >

Re: [RFC 06/13] drm/i915/svm: Page table mirroring support

2019-11-22 Thread Niranjan Vishwanathapura
On Fri, Nov 22, 2019 at 11:33:12PM +, Jason Gunthorpe wrote: On Fri, Nov 22, 2019 at 12:57:27PM -0800, Niranjana Vishwanathapura wrote: +static inline bool +i915_range_done(struct hmm_range *range) +{ + bool ret = hmm_range_valid(range); + + hmm_range_unregister(range); +

Re: [RFC 06/13] drm/i915/svm: Page table mirroring support

2019-11-22 Thread Niranjan Vishwanathapura
On Fri, Nov 22, 2019 at 08:14:51PM +, Jason Gunthorpe wrote: On Fri, Nov 22, 2019 at 12:01:17PM -0800, Niranjan Vishwanathapura wrote: On Fri, Nov 22, 2019 at 11:54:45AM -0800, Niranjana Vishwanathapura wrote: > Use HMM page table mirroring support to build device page table. > Imp

Re: [RFC 06/13] drm/i915/svm: Page table mirroring support

2019-11-22 Thread Niranjan Vishwanathapura
On Fri, Nov 22, 2019 at 11:54:45AM -0800, Niranjana Vishwanathapura wrote: Use HMM page table mirroring support to build device page table. Implement the bind ioctl and bind the process address range in the specified context's ppgtt. Handle invalidation notifications by unbinding the address rang

Re: [Intel-gfx] [PATCH v3 35/37] drm/i915: Introduce GEM_OBJECT_SETPARAM with I915_PARAM_MEMORY_REGION

2019-09-30 Thread Niranjan Vishwanathapura
On Fri, Aug 09, 2019 at 11:26:41PM +0100, Matthew Auld wrote: From: Abdiel Janulgue This call will specify which memory region an object should be placed. Note that changing the object's backing storage should be immediately done after an object is created or if it's not yet in use, otherwise