Re: [Intel-gfx] [PATCH 2/3] drm/i915: Refactor duplicate object vmap functions

2015-10-08 Thread kbuild test robot
Hi Chris, [auto build test WARNING on v4.3-rc4 -- if it's inappropriate base, please ignore] reproduce: # apt-get install sparse make ARCH=x86_64 allmodconfig make C=1 CF=-D__CHECK_ENDIAN__ sparse warnings: (new ones prefixed by >>) >> drivers/gpu/drm/i915/intel_ringbu

Re: [Intel-gfx] [PATCH 2/3] drm/i915: Refactor duplicate object vmap functions

2015-10-08 Thread Chris Wilson
On Thu, Oct 08, 2015 at 03:58:13PM +0300, Ville Syrjälä wrote: > > + pages = kmalloc(n*sizeof(*pages), GFP_TEMPORARY); > > Random driveby: kmalloc_array() That would be scary, imagine having enough pages in the object to overflow unsigned long :) > Also __GFP_NOWARN? True. > I wond

Re: [Intel-gfx] [PATCH 2/3] drm/i915: Refactor duplicate object vmap functions

2015-10-08 Thread Ville Syrjälä
On Thu, Oct 08, 2015 at 01:39:55PM +0100, Chris Wilson wrote: > We now have two implementations for vmapping a whole object, one for > dma-buf and one for the ringbuffer. If we couple the vmapping into the > obj->pages lifetime, then we can reuse an obj->vmapping for both and at > the same time cou

[Intel-gfx] [PATCH 2/3] drm/i915: Refactor duplicate object vmap functions

2015-10-08 Thread Chris Wilson
We now have two implementations for vmapping a whole object, one for dma-buf and one for the ringbuffer. If we couple the vmapping into the obj->pages lifetime, then we can reuse an obj->vmapping for both and at the same time couple it into the shrinker. Signed-off-by: Chris Wilson --- drivers/g