Re: [Intel-gfx] [PATCH 17/42] drm/i915: Pass around sg_table to get_pages/put_pages backend

2016-10-17 Thread Chris Wilson
On Mon, Oct 17, 2016 at 11:52:27AM +0100, Tvrtko Ursulin wrote: > > On 14/10/2016 10:43, Chris Wilson wrote: > >On Fri, Oct 14, 2016 at 10:28:42AM +0100, Tvrtko Ursulin wrote: > >> diff --git a/drivers/gpu/drm/i915/i915_drv.h > >> b/drivers/gpu/drm/i915/i915_drv.h > >> index

Re: [Intel-gfx] [PATCH 17/42] drm/i915: Pass around sg_table to get_pages/put_pages backend

2016-10-17 Thread Tvrtko Ursulin
On 14/10/2016 10:43, Chris Wilson wrote: On Fri, Oct 14, 2016 at 10:28:42AM +0100, Tvrtko Ursulin wrote: diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h index 3c22d49005fe..271e63c8f037 100644 --- a/drivers/gpu/drm/i915/i915_drv.h +++

Re: [Intel-gfx] [PATCH 17/42] drm/i915: Pass around sg_table to get_pages/put_pages backend

2016-10-14 Thread Chris Wilson
On Fri, Oct 14, 2016 at 10:28:42AM +0100, Tvrtko Ursulin wrote: > diff --git a/drivers/gpu/drm/i915/i915_drv.h > b/drivers/gpu/drm/i915/i915_drv.h > index 3c22d49005fe..271e63c8f037 100644 > --- a/drivers/gpu/drm/i915/i915_drv.h > +++ b/drivers/gpu/drm/i915/i915_drv.h > @@ -2175,8 +2175,8 @@

Re: [Intel-gfx] [PATCH 17/42] drm/i915: Pass around sg_table to get_pages/put_pages backend

2016-10-14 Thread Tvrtko Ursulin
[sending the draft reply until I get another look at it] On 07/10/2016 10:46, Chris Wilson wrote: The plan is to move obj->pages out from under the struct_mutex into its own per-object lock. We need to prune any assumption of the struct_mutex from the get_pages/put_pages backends, and to make

Re: [Intel-gfx] [PATCH 17/42] drm/i915: Pass around sg_table to get_pages/put_pages backend

2016-10-14 Thread Chris Wilson
On Fri, Oct 14, 2016 at 12:12:32PM +0300, Joonas Lahtinen wrote: > On pe, 2016-10-07 at 10:46 +0100, Chris Wilson wrote: > > @@ -2376,6 +2374,19 @@ __deprecated > >  extern void drm_gem_object_unreference_unlocked(struct drm_gem_object *); > >   > >  static inline bool > >

Re: [Intel-gfx] [PATCH 17/42] drm/i915: Pass around sg_table to get_pages/put_pages backend

2016-10-14 Thread Joonas Lahtinen
On pe, 2016-10-07 at 10:46 +0100, Chris Wilson wrote: > @@ -2376,6 +2374,19 @@ __deprecated >  extern void drm_gem_object_unreference_unlocked(struct drm_gem_object *); >   >  static inline bool > +i915_gem_object_is_dead(const struct drm_i915_gem_object *obj) > +{ > + return

[Intel-gfx] [PATCH 17/42] drm/i915: Pass around sg_table to get_pages/put_pages backend

2016-10-07 Thread Chris Wilson
The plan is to move obj->pages out from under the struct_mutex into its own per-object lock. We need to prune any assumption of the struct_mutex from the get_pages/put_pages backends, and to make it easier we pass around the sg_table to operate on rather than indirectly via the obj.