[Intel-gfx] [PATCH 4/6] drm/i915: Add bind/unbind object functions to VM

2013-09-24 Thread Ben Widawsky
From: Ben Widawsky As we plumb the code with more VM information, it has become more obvious that the easiest way to deal with bind and unbind is to simply put the function pointers in the vm, and let those choose the correct way to handle the page table updates. This change allows many places in

Re: [Intel-gfx] [PATCH 4/6] drm/i915: Add bind/unbind object functions to VM

2013-09-17 Thread Chris Wilson
On Mon, Sep 16, 2013 at 10:44:29PM -0700, Ben Widawsky wrote: > I'm sorry. After reading my comments again, you're absolutely right. > > How's this? I'm liking it better, since it gives some insight into why GLOBAL_BIND is required. > diff --git a/drivers/gpu/drm/i915/i915_gem_gtt.c > b/drivers

Re: [Intel-gfx] [PATCH 4/6] drm/i915: Add bind/unbind object functions to VM

2013-09-17 Thread Ben Widawsky
On Mon, Sep 16, 2013 at 11:13:02PM +0100, Chris Wilson wrote: > On Mon, Sep 16, 2013 at 11:23:43AM -0700, Ben Widawsky wrote: > > On Mon, Sep 16, 2013 at 10:25:28AM +0100, Chris Wilson wrote: > > > On Sat, Sep 14, 2013 at 03:03:17PM -0700, Ben Widawsky wrote: > > > > +static void gen6_ggtt_bind_vma

Re: [Intel-gfx] [PATCH 4/6] drm/i915: Add bind/unbind object functions to VM

2013-09-16 Thread Daniel Vetter
On Tue, Sep 17, 2013 at 12:18 AM, Chris Wilson wrote: >> Ben's right afaik, we need this kludge to keep snb happy. And we need >> ppgtt to make kernel cs scanning possible, which we seem to need for >> geomtry shaders or some other gl3.2/3 feature. So not much choice I'd say >> ... > > It shouldn'

Re: [Intel-gfx] [PATCH 4/6] drm/i915: Add bind/unbind object functions to VM

2013-09-16 Thread Chris Wilson
On Tue, Sep 17, 2013 at 12:05:46AM +0200, Daniel Vetter wrote: > On Mon, Sep 16, 2013 at 11:23:43AM -0700, Ben Widawsky wrote: > > On Mon, Sep 16, 2013 at 10:25:28AM +0100, Chris Wilson wrote: > > > On Sat, Sep 14, 2013 at 03:03:17PM -0700, Ben Widawsky wrote: > > > > +static void gen6_ggtt_bind_vm

Re: [Intel-gfx] [PATCH 4/6] drm/i915: Add bind/unbind object functions to VM

2013-09-16 Thread Chris Wilson
On Mon, Sep 16, 2013 at 11:23:43AM -0700, Ben Widawsky wrote: > On Mon, Sep 16, 2013 at 10:25:28AM +0100, Chris Wilson wrote: > > On Sat, Sep 14, 2013 at 03:03:17PM -0700, Ben Widawsky wrote: > > > +static void gen6_ggtt_bind_vma(struct i915_vma *vma, > > > +enum i915_cache_

Re: [Intel-gfx] [PATCH 4/6] drm/i915: Add bind/unbind object functions to VM

2013-09-16 Thread Daniel Vetter
On Mon, Sep 16, 2013 at 11:23:43AM -0700, Ben Widawsky wrote: > On Mon, Sep 16, 2013 at 10:25:28AM +0100, Chris Wilson wrote: > > On Sat, Sep 14, 2013 at 03:03:17PM -0700, Ben Widawsky wrote: > > > +static void gen6_ggtt_bind_vma(struct i915_vma *vma, > > > +enum i915_cache_

Re: [Intel-gfx] [PATCH 4/6] drm/i915: Add bind/unbind object functions to VM

2013-09-16 Thread Ben Widawsky
On Mon, Sep 16, 2013 at 10:25:28AM +0100, Chris Wilson wrote: > On Sat, Sep 14, 2013 at 03:03:17PM -0700, Ben Widawsky wrote: > > +static void gen6_ggtt_bind_vma(struct i915_vma *vma, > > + enum i915_cache_level cache_level, > > + u32 flags) > > +{

Re: [Intel-gfx] [PATCH 4/6] drm/i915: Add bind/unbind object functions to VM

2013-09-16 Thread Chris Wilson
On Sat, Sep 14, 2013 at 03:03:17PM -0700, Ben Widawsky wrote: > +static void gen6_ggtt_bind_vma(struct i915_vma *vma, > +enum i915_cache_level cache_level, > +u32 flags) > +{ > + struct drm_device *dev = vma->vm->dev; > + struct drm_i9

[Intel-gfx] [PATCH 4/6] drm/i915: Add bind/unbind object functions to VM

2013-09-14 Thread Ben Widawsky
From: Ben Widawsky As we plumb the code with more VM information, it has become more obvious that the easiest way to deal with bind and unbind is to simply put the function pointers in the vm, and let those choose the correct way to handle the page table updates. This change allows many places in