[Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2014-05-16 Thread Chris Wilson
By exporting the ability to map user address and inserting PTEs representing their backing pages into the GTT, we can exploit UMA in order to utilize normal application data as a texture source or even as a render target (depending upon the capabilities of the chipset). This has a number of uses,

Re: [Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2014-05-16 Thread Volkin, Bradley D
Reviewed-by: Brad Volkin bradley.d.vol...@intel.com On Fri, May 16, 2014 at 02:22:37PM +0100, Chris Wilson wrote: By exporting the ability to map user address and inserting PTEs representing their backing pages into the GTT, we can exploit UMA in order to utilize normal application data as a

Re: [Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2014-05-16 Thread Daniel Vetter
On Fri, May 16, 2014 at 08:34:52AM -0700, Volkin, Bradley D wrote: Reviewed-by: Brad Volkin bradley.d.vol...@intel.com On Fri, May 16, 2014 at 02:22:37PM +0100, Chris Wilson wrote: By exporting the ability to map user address and inserting PTEs representing their backing pages into the

Re: [Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2014-02-04 Thread Daniel Vetter
On Mon, Feb 03, 2014 at 03:28:37PM +, Tvrtko Ursulin wrote: On 01/29/2014 08:34 PM, Daniel Vetter wrote: Actually I've found something else to complain about: On Tue, Jan 28, 2014 at 2:16 PM, Chris Wilson ch...@chris-wilson.co.uk wrote: +#define I915_USERPTR_READ_ONLY 0x1 This

Re: [Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2014-02-03 Thread Tvrtko Ursulin
On 01/29/2014 08:34 PM, Daniel Vetter wrote: Actually I've found something else to complain about: On Tue, Jan 28, 2014 at 2:16 PM, Chris Wilson ch...@chris-wilson.co.uk wrote: +#define I915_USERPTR_READ_ONLY 0x1 This smells like an insta-root-exploit: 1. mmap /lib/ld-linux.so as read-only

Re: [Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2014-02-03 Thread Tvrtko Ursulin
On 01/30/2014 11:06 AM, Chris Wilson wrote: On Wed, Jan 29, 2014 at 10:58:48PM +0100, Daniel Vetter wrote: On Wed, Jan 29, 2014 at 10:53 PM, Chris Wilson ch...@chris-wilson.co.uk wrote: On Wed, Jan 29, 2014 at 09:25:51PM +0100, Daniel Vetter wrote: So originally I've thought we need this due

Re: [Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2014-01-30 Thread Chris Wilson
On Wed, Jan 29, 2014 at 10:58:48PM +0100, Daniel Vetter wrote: On Wed, Jan 29, 2014 at 10:53 PM, Chris Wilson ch...@chris-wilson.co.uk wrote: On Wed, Jan 29, 2014 at 09:25:51PM +0100, Daniel Vetter wrote: So originally I've thought we need this due to the massive overhead of the mmu

Re: [Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2014-01-29 Thread Daniel Vetter
On Tue, Jan 28, 2014 at 01:16:46PM +, Chris Wilson wrote: By exporting the ability to map user address and inserting PTEs representing their backing pages into the GTT, we can exploit UMA in order to utilize normal application data as a texture source or even as a render target (depending

Re: [Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2014-01-29 Thread Daniel Vetter
Actually I've found something else to complain about: On Tue, Jan 28, 2014 at 2:16 PM, Chris Wilson ch...@chris-wilson.co.uk wrote: +#define I915_USERPTR_READ_ONLY 0x1 This smells like an insta-root-exploit: 1. mmap /lib/ld-linux.so as read-only 2. userptr bind that mmap'ed area as READ_ONLY 3.

Re: [Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2014-01-29 Thread Chris Wilson
On Wed, Jan 29, 2014 at 09:34:42PM +0100, Daniel Vetter wrote: Actually I've found something else to complain about: On Tue, Jan 28, 2014 at 2:16 PM, Chris Wilson ch...@chris-wilson.co.uk wrote: +#define I915_USERPTR_READ_ONLY 0x1 This smells like an insta-root-exploit: 1. mmap

Re: [Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2014-01-29 Thread Chris Wilson
On Wed, Jan 29, 2014 at 09:25:51PM +0100, Daniel Vetter wrote: So originally I've thought we need this due to the massive overhead of the mmu notifier. But now with the nice shared mmu notifiers I've thought that overhead is gone I prefer to also ditch this option. Same goes about the

Re: [Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2014-01-29 Thread Daniel Vetter
On Wed, Jan 29, 2014 at 10:53 PM, Chris Wilson ch...@chris-wilson.co.uk wrote: On Wed, Jan 29, 2014 at 09:25:51PM +0100, Daniel Vetter wrote: So originally I've thought we need this due to the massive overhead of the mmu notifier. But now with the nice shared mmu notifiers I've thought that

Re: [Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2014-01-27 Thread Volkin, Bradley D
Hi Chris, A few questions/comments throughout. I may be off the mark on some. Please bear with me as I try to get more familiar with the gem code. Thanks, Brad [ snip ] On Fri, Jan 24, 2014 at 01:00:19AM -0800, Chris Wilson wrote: +static void +__i915_mmu_notifier_destroy_worker(struct

Re: [Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2014-01-27 Thread Chris Wilson
On Mon, Jan 27, 2014 at 09:56:12AM -0800, Volkin, Bradley D wrote: +static void +i915_mmu_notifier_del(struct i915_mmu_notifier *mmu, + struct i915_mmu_object *mn) +{ + bool destroy; + + spin_lock(mmu-lock); + interval_tree_remove(mn-it, mmu-objects); +

[Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2014-01-24 Thread Chris Wilson
By exporting the ability to map user address and inserting PTEs representing their backing pages into the GTT, we can exploit UMA in order to utilize normal application data as a texture source or even as a render target (depending upon the capabilities of the chipset). This has a number of uses,

[Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2014-01-22 Thread Chris Wilson
By exporting the ability to map user address and inserting PTEs representing their backing pages into the GTT, we can exploit UMA in order to utilize normal application data as a texture source or even as a render target (depending upon the capabilities of the chipset). This has a number of uses,

[Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2014-01-15 Thread Chris Wilson
By exporting the ability to map user address and inserting PTEs representing their backing pages into the GTT, we can exploit UMA in order to utilize normal application data as a texture source or even as a render target (depending upon the capabilities of the chipset). This has a number of uses,

[Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2013-08-14 Thread Chris Wilson
By exporting the ability to map user address and inserting PTEs representing their backing pages into the GTT, we can exploit UMA in order to utilize normal application data as a texture source or even as a render target (depending upon the capabilities of the chipset). This has a number of uses,

Re: [Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2013-06-24 Thread Jesse Barnes
On Mon, 8 Apr 2013 21:24:58 +0200 Daniel Vetter dan...@ffwll.ch wrote: On Mon, Apr 8, 2013 at 7:40 PM, Chris Wilson ch...@chris-wilson.co.uk wrote: On Mon, Apr 08, 2013 at 07:18:11PM +0200, Daniel Vetter wrote: On Tue, Feb 12, 2013 at 02:17:22PM +, Chris Wilson wrote: By exporting the

Re: [Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2013-04-15 Thread Daniel Vetter
On Mon, Apr 8, 2013 at 11:48 PM, Chris Wilson ch...@chris-wilson.co.uk wrote: On Mon, Apr 08, 2013 at 09:24:58PM +0200, Daniel Vetter wrote: On Mon, Apr 8, 2013 at 7:40 PM, Chris Wilson ch...@chris-wilson.co.uk wrote: On Mon, Apr 08, 2013 at 07:18:11PM +0200, Daniel Vetter wrote: On Tue,

Re: [Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2013-04-08 Thread Daniel Vetter
On Tue, Feb 12, 2013 at 02:17:22PM +, Chris Wilson wrote: By exporting the ability to map user address and inserting PTEs representing their backing pages into the GTT, we can exploit UMA in order to utilize normal application data as a texture source or even as a render target (depending

Re: [Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2013-04-08 Thread Chris Wilson
On Mon, Apr 08, 2013 at 07:18:11PM +0200, Daniel Vetter wrote: On Tue, Feb 12, 2013 at 02:17:22PM +, Chris Wilson wrote: By exporting the ability to map user address and inserting PTEs representing their backing pages into the GTT, we can exploit UMA in order to utilize normal

Re: [Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2013-04-08 Thread Daniel Vetter
On Mon, Apr 8, 2013 at 7:40 PM, Chris Wilson ch...@chris-wilson.co.uk wrote: On Mon, Apr 08, 2013 at 07:18:11PM +0200, Daniel Vetter wrote: On Tue, Feb 12, 2013 at 02:17:22PM +, Chris Wilson wrote: By exporting the ability to map user address and inserting PTEs representing their backing

Re: [Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2013-04-08 Thread Chris Wilson
On Mon, Apr 08, 2013 at 09:24:58PM +0200, Daniel Vetter wrote: On Mon, Apr 8, 2013 at 7:40 PM, Chris Wilson ch...@chris-wilson.co.uk wrote: On Mon, Apr 08, 2013 at 07:18:11PM +0200, Daniel Vetter wrote: On Tue, Feb 12, 2013 at 02:17:22PM +, Chris Wilson wrote: By exporting the ability

Re: [Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2013-04-08 Thread Eric Anholt
Daniel Vetter dan...@ffwll.ch writes: On Mon, Apr 8, 2013 at 7:40 PM, Chris Wilson ch...@chris-wilson.co.uk wrote: On Mon, Apr 08, 2013 at 07:18:11PM +0200, Daniel Vetter wrote: On Tue, Feb 12, 2013 at 02:17:22PM +, Chris Wilson wrote: By exporting the ability to map user address and

Re: [Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2013-02-13 Thread Reese, Armin C
] On Behalf Of Chris Wilson Sent: Tuesday, February 12, 2013 6:17 AM To: intel-gfx@lists.freedesktop.org Subject: [Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl By exporting the ability to map user address and inserting PTEs representing

Re: [Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2013-02-13 Thread Chris Wilson
On Wed, Feb 13, 2013 at 10:24:59PM +, Reese, Armin C wrote: Thanks for the patch, Chris. This is exactly what we were looking for to replace the VMAP feature you submitted a couple of years ago. We need a method to quickly move data from user mode allocations into video memory (by

[Intel-gfx] [PATCH] drm/i915: Introduce mapping of user pages into video memory (userptr) ioctl

2013-02-12 Thread Chris Wilson
By exporting the ability to map user address and inserting PTEs representing their backing pages into the GTT, we can exploit UMA in order to utilize normal application data as a texture source or even as a render target (depending upon the capabilities of the chipset). This has a number of uses,