[PATCH] drm/gem: add functions to get/put pages

2011-09-27 Thread Alan Cox
> Well I think for this case the solution is simple: Tiling not allowed > if userspace is too dumb to properly round the buffer up so it > fulfills whatever odd requirement the hw has. I think hiding the fact > that certain buffers need more backing storage than a naive userspace > might assume is

[PATCH] drm/gem: add functions to get/put pages

2011-09-27 Thread Rob Clark
On Tue, Sep 27, 2011 at 4:35 AM, Alan Cox wrote: >> Well I think for this case the solution is simple: Tiling not allowed >> if userspace is too dumb to properly round the buffer up so it >> fulfills whatever odd requirement the hw has. I think hiding the fact >> that certain buffers need more bac

Re: [PATCH] drm/gem: add functions to get/put pages

2011-09-27 Thread Rob Clark
On Tue, Sep 27, 2011 at 4:35 AM, Alan Cox wrote: >> Well I think for this case the solution is simple: Tiling not allowed >> if userspace is too dumb to properly round the buffer up so it >> fulfills whatever odd requirement the hw has. I think hiding the fact >> that certain buffers need more bac

Re: [PATCH] drm/gem: add functions to get/put pages

2011-09-27 Thread Alan Cox
> Well I think for this case the solution is simple: Tiling not allowed > if userspace is too dumb to properly round the buffer up so it > fulfills whatever odd requirement the hw has. I think hiding the fact > that certain buffers need more backing storage than a naive userspace > might assume is

[PATCH] drm/gem: add functions to get/put pages

2011-09-26 Thread Daniel Vetter
On Mon, Sep 26, 2011 at 21:56, Rob Clark wrote: > On Mon, Sep 26, 2011 at 2:43 PM, Daniel Vetter wrote: >> On Mon, Sep 26, 2011 at 01:18:40PM -0500, Rob Clark wrote: >>> On Thu, Sep 15, 2011 at 5:47 PM, Rob Clark wrote: >>> > +/** >>> > + * drm_gem_get_pages - helper to allocate backing pages fo

[PATCH] drm/gem: add functions to get/put pages

2011-09-26 Thread Daniel Vetter
On Mon, Sep 26, 2011 at 01:18:40PM -0500, Rob Clark wrote: > On Thu, Sep 15, 2011 at 5:47 PM, Rob Clark wrote: > > +/** > > + * drm_gem_get_pages - helper to allocate backing pages for a GEM object > > + * @obj: obj in question > > + * @gfpmask: gfp mask of requested pages > > + */ > > +struct pag

[PATCH] drm/gem: add functions to get/put pages

2011-09-26 Thread Rob Clark
On Mon, Sep 26, 2011 at 3:22 PM, Daniel Vetter wrote: > On Mon, Sep 26, 2011 at 21:56, Rob Clark wrote: >> On Mon, Sep 26, 2011 at 2:43 PM, Daniel Vetter wrote: >>> On Mon, Sep 26, 2011 at 01:18:40PM -0500, Rob Clark wrote: On Thu, Sep 15, 2011 at 5:47 PM, Rob Clark wrote: > +/**

[PATCH] drm/gem: add functions to get/put pages

2011-09-26 Thread Rob Clark
On Mon, Sep 26, 2011 at 2:43 PM, Daniel Vetter wrote: > On Mon, Sep 26, 2011 at 01:18:40PM -0500, Rob Clark wrote: >> On Thu, Sep 15, 2011 at 5:47 PM, Rob Clark wrote: >> > +/** >> > + * drm_gem_get_pages - helper to allocate backing pages for a GEM object >> > + * @obj: obj in question >> > + *

Re: [PATCH] drm/gem: add functions to get/put pages

2011-09-26 Thread Rob Clark
On Mon, Sep 26, 2011 at 3:22 PM, Daniel Vetter wrote: > On Mon, Sep 26, 2011 at 21:56, Rob Clark wrote: >> On Mon, Sep 26, 2011 at 2:43 PM, Daniel Vetter wrote: >>> On Mon, Sep 26, 2011 at 01:18:40PM -0500, Rob Clark wrote: On Thu, Sep 15, 2011 at 5:47 PM, Rob Clark wrote: > +/**

Re: [PATCH] drm/gem: add functions to get/put pages

2011-09-26 Thread Daniel Vetter
On Mon, Sep 26, 2011 at 21:56, Rob Clark wrote: > On Mon, Sep 26, 2011 at 2:43 PM, Daniel Vetter wrote: >> On Mon, Sep 26, 2011 at 01:18:40PM -0500, Rob Clark wrote: >>> On Thu, Sep 15, 2011 at 5:47 PM, Rob Clark wrote: >>> > +/** >>> > + * drm_gem_get_pages - helper to allocate backing pages fo

[PATCH] drm/gem: add functions to get/put pages

2011-09-26 Thread Rob Clark
On Thu, Sep 15, 2011 at 5:47 PM, Rob Clark wrote: > +/** > + * drm_gem_get_pages - helper to allocate backing pages for a GEM object > + * @obj: obj in question > + * @gfpmask: gfp mask of requested pages > + */ > +struct page ** drm_gem_get_pages(struct drm_gem_object *obj, gfp_t gfpmask) > +{

Re: [PATCH] drm/gem: add functions to get/put pages

2011-09-26 Thread Rob Clark
On Mon, Sep 26, 2011 at 2:43 PM, Daniel Vetter wrote: > On Mon, Sep 26, 2011 at 01:18:40PM -0500, Rob Clark wrote: >> On Thu, Sep 15, 2011 at 5:47 PM, Rob Clark wrote: >> > +/** >> > + * drm_gem_get_pages - helper to allocate backing pages for a GEM object >> > + * @obj: obj in question >> > + *

Re: [PATCH] drm/gem: add functions to get/put pages

2011-09-26 Thread Daniel Vetter
On Mon, Sep 26, 2011 at 01:18:40PM -0500, Rob Clark wrote: > On Thu, Sep 15, 2011 at 5:47 PM, Rob Clark wrote: > > +/** > > + * drm_gem_get_pages - helper to allocate backing pages for a GEM object > > + * @obj: obj in question > > + * @gfpmask: gfp mask of requested pages > > + */ > > +struct pag

Re: [PATCH] drm/gem: add functions to get/put pages

2011-09-26 Thread Rob Clark
On Thu, Sep 15, 2011 at 5:47 PM, Rob Clark wrote: > +/** > + * drm_gem_get_pages - helper to allocate backing pages for a GEM object > + * @obj: obj in question > + * @gfpmask: gfp mask of requested pages > + */ > +struct page ** drm_gem_get_pages(struct drm_gem_object *obj, gfp_t gfpmask) > +{

[PATCH] drm/gem: add functions to get/put pages

2011-09-15 Thread Rob Clark
From: Rob Clark This factors out common code from psb_gtt_attach_pages()/ i915_gem_object_get_pages_gtt() and psb_gtt_detach_pages()/ i915_gem_object_put_pages_gtt(). Signed-off-by: Rob Clark --- drivers/gpu/drm/drm_gem.c | 87 + include/drm/drmP.h

[PATCH] drm/gem: add functions to get/put pages

2011-09-15 Thread Rob Clark
From: Rob Clark This factors out common code from psb_gtt_attach_pages()/ i915_gem_object_get_pages_gtt() and psb_gtt_detach_pages()/ i915_gem_object_put_pages_gtt(). Signed-off-by: Rob Clark --- drivers/gpu/drm/drm_gem.c | 87 + include/drm/drmP.h