[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

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 ripe

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 a...@lxorguk.ukuu.org.uk 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

[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

[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

[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 >> > + *

[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 Thu, Sep 15, 2011 at 5:47 PM, Rob Clark rob.cl...@linaro.org 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

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 rob.cl...@linaro.org wrote: +/** + * drm_gem_get_pages - helper to allocate backing pages for a GEM object + * @obj: obj in question + * @gfpmask: gfp mask of requested pages + */

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 dan...@ffwll.ch 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 rob.cl...@linaro.org wrote: +/** + * drm_gem_get_pages - helper to allocate backing pages for a GEM object + * @obj:

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 rob.cl...@linaro.org wrote: On Mon, Sep 26, 2011 at 2:43 PM, Daniel Vetter dan...@ffwll.ch 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 rob.cl...@linaro.org wrote: +/** + *

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 dan...@ffwll.ch wrote: On Mon, Sep 26, 2011 at 21:56, Rob Clark rob.cl...@linaro.org wrote: On Mon, Sep 26, 2011 at 2:43 PM, Daniel Vetter dan...@ffwll.ch wrote: On Mon, Sep 26, 2011 at 01:18:40PM -0500, Rob Clark wrote: On Thu, Sep 15, 2011 at

[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 +

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

2011-09-15 Thread Rob Clark
From: Rob Clark r...@ti.com 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 r...@ti.com --- drivers/gpu/drm/drm_gem.c | 87