Re: [Intel-gfx] [PATCH 4/4] drm/i915: Support for pread/pwrite from/to non shmem backed objects

2015-09-15 Thread Chris Wilson
On Fri, Jul 31, 2015 at 06:46:20PM +0530, Goel, Akash wrote: > Since the suggestion is to reuse the gtt_pwrite_fast function only > for non-shmem backed objects, can we also relax the Tiling > constraint here, apart from removing the PIN_NONBLOCK flag. As > anyways there is a put_fence already

Re: [Intel-gfx] [PATCH 4/4] drm/i915: Support for pread/pwrite from/to non shmem backed objects

2015-09-15 Thread Chris Wilson
On Tue, Sep 15, 2015 at 02:03:27PM +0530, ankitprasad.r.sha...@intel.com wrote: > @@ -1090,17 +1184,17 @@ i915_gem_pwrite_ioctl(struct drm_device *dev, void > *data, > goto out; > } > > - /* prime objects have no backing filp to GEM pread/pwrite > - * pages from. >

Re: [Intel-gfx] [PATCH 4/4] drm/i915: Support for pread/pwrite from/to non shmem backed objects

2015-09-15 Thread Ankitprasad Sharma
On Tue, 2015-09-15 at 10:54 +0100, Chris Wilson wrote: > On Tue, Sep 15, 2015 at 02:03:27PM +0530, ankitprasad.r.sha...@intel.com > wrote: > > @@ -1090,17 +1184,17 @@ i915_gem_pwrite_ioctl(struct drm_device *dev, void > > *data, > > goto out; > > } > > > > - /* prime objects

Re: [Intel-gfx] [PATCH 4/4] drm/i915: Support for pread/pwrite from/to non shmem backed objects

2015-09-10 Thread Ankitprasad Sharma
On Fri, 2015-07-31 at 18:46 +0530, Goel, Akash wrote: > > On 7/22/2015 8:09 PM, Chris Wilson wrote: > > On Wed, Jul 22, 2015 at 07:21:49PM +0530, ankitprasad.r.sha...@intel.com > > wrote: > >> static int > >> i915_gem_shmem_pread(struct drm_device *dev, > >> struct

Re: [Intel-gfx] [PATCH 4/4] drm/i915: Support for pread/pwrite from/to non shmem backed objects

2015-07-31 Thread Goel, Akash
On 7/22/2015 8:09 PM, Chris Wilson wrote: On Wed, Jul 22, 2015 at 07:21:49PM +0530, ankitprasad.r.sha...@intel.com wrote: static int i915_gem_shmem_pread(struct drm_device *dev, struct drm_i915_gem_object *obj, @@ -754,17 +850,20 @@ i915_gem_pread_ioctl(struct

Re: [Intel-gfx] [PATCH 4/4] drm/i915: Support for pread/pwrite from/to non shmem backed objects

2015-07-22 Thread Tvrtko Ursulin
Hi, On 07/22/2015 02:51 PM, ankitprasad.r.sha...@intel.com wrote: From: Ankitprasad Sharma ankitprasad.r.sha...@intel.com This patch adds support for extending the pread/pwrite functionality for objects not backed by shmem. The access will be made through gtt interface. This will cover prime

Re: [Intel-gfx] [PATCH 4/4] drm/i915: Support for pread/pwrite from/to non shmem backed objects

2015-07-22 Thread Daniel Vetter
On Wed, Jul 22, 2015 at 04:46:00PM +0100, Tvrtko Ursulin wrote: But also, why it is even necessary to drop the mutex here? Locking inversion with our own pagefault handler. Happens since at least mesa can return gtt mmaps to gl clients, which can then in turn try to upload that with pwrite

Re: [Intel-gfx] [PATCH 4/4] drm/i915: Support for pread/pwrite from/to non shmem backed objects

2015-07-22 Thread Tvrtko Ursulin
On 07/22/2015 05:05 PM, Daniel Vetter wrote: On Wed, Jul 22, 2015 at 04:46:00PM +0100, Tvrtko Ursulin wrote: But also, why it is even necessary to drop the mutex here? Locking inversion with our own pagefault handler. Happens since at least mesa can return gtt mmaps to gl clients, which can

Re: [Intel-gfx] [PATCH 4/4] drm/i915: Support for pread/pwrite from/to non shmem backed objects

2015-07-22 Thread Chris Wilson
On Wed, Jul 22, 2015 at 07:21:49PM +0530, ankitprasad.r.sha...@intel.com wrote: static int i915_gem_shmem_pread(struct drm_device *dev, struct drm_i915_gem_object *obj, @@ -754,17 +850,20 @@ i915_gem_pread_ioctl(struct drm_device *dev, void *data, goto out;

Re: [Intel-gfx] [PATCH 4/4] drm/i915: Support for pread/pwrite from/to non shmem backed objects

2015-07-02 Thread Chris Wilson
On Thu, Jul 02, 2015 at 11:42:44AM +0100, Tvrtko Ursulin wrote: I am not super familiar with low level mapping business. But it looks correct to me. Just one question would be if there are any downsides to WC mapping? If in the read case it would be any advantage not to ask for WC? Read-side

Re: [Intel-gfx] [PATCH 4/4] drm/i915: Support for pread/pwrite from/to non shmem backed objects

2015-07-02 Thread Tvrtko Ursulin
On 07/01/2015 10:25 AM, ankitprasad.r.sha...@intel.com wrote: From: Ankitprasad Sharma ankitprasad.r.sha...@intel.com This patch adds support for extending the pread/pwrite functionality for objects not backed by shmem. The access will be made through gtt interface. This will cover prime

Re: [Intel-gfx] [PATCH 4/4] drm/i915: Support for pread/pwrite from/to non shmem backed objects

2015-07-02 Thread Tvrtko Ursulin
On 07/02/2015 12:00 PM, Chris Wilson wrote: + /* This is a slow read/write as it tries to read from +* and write to user memory which may result into page +* faults +*/ + ret = slow_user_access(dev_priv-gtt.mappable,

Re: [Intel-gfx] [PATCH 4/4] drm/i915: Support for pread/pwrite from/to non shmem backed objects

2015-07-02 Thread Chris Wilson
On Thu, Jul 02, 2015 at 12:27:42PM +0100, Tvrtko Ursulin wrote: On 07/02/2015 12:00 PM, Chris Wilson wrote: + /* This is a slow read/write as it tries to read from + * and write to user memory which may result into page + * faults + */ + ret

Re: [Intel-gfx] [PATCH 4/4] drm/i915: Support for pread/pwrite from/to non shmem backed objects

2015-07-02 Thread shuang . he
Tested-By: Intel Graphics QA PRTS (Patch Regression Test System Contact: shuang...@intel.com) Task id: 6697 -Summary- Platform Delta drm-intel-nightly Series Applied ILK

Re: [Intel-gfx] [PATCH 4/4] drm/i915: Support for pread/pwrite from/to non shmem backed objects

2015-07-01 Thread Chris Wilson
On Wed, Jul 01, 2015 at 02:55:47PM +0530, ankitprasad.r.sha...@intel.com wrote: - ret = i915_gem_shmem_pread(dev, obj, args, file); + /* pread for non shmem backed objects */ + if (!obj-base.filp) { + if (obj-tiling_mode == I915_TILING_NONE) + ret =