Re: [PATCH] drm/i915: Allow tiling of objects with bit 17 swizzling by the CPU.
On Fri, 2009-04-03 at 18:08 -0700, Keith Packard wrote: On Fri, 2009-04-03 at 17:03 -0700, Eric Anholt wrote: + obj_priv-bit_17 = kmalloc(page_count, GFP_KERNEL); seems like you could save a bit of memory here by using 1 bit per page instead of a byte. Before, I was figuring it was better to have easy code than memory optimal code in my infrequently-tested workaround. Since recent notes about kmalloc limits, I'll switch to using bitmap.h. -- Eric Anholt e...@anholt.net eric.anh...@intel.com signature.asc Description: This is a digitally signed message part -- -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
Re: [PATCH] drm/i915: Allow tiling of objects with bit 17 swizzling by the CPU.
On Sat, 2009-04-04 at 10:25 -0700, Eric Anholt wrote: Before, I was figuring it was better to have easy code than memory optimal code in my infrequently-tested workaround. Since recent notes about kmalloc limits, I'll switch to using bitmap.h. Yeah, a single page of bits will cover 32k of pages this way. Not sure bitmap.h is the best plan though; it looks designed to deal with fixed-size bitmaps (there are warnings about using variable lengths in the comments). -- keith.pack...@intel.com signature.asc Description: This is a digitally signed message part -- -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
Re: [PATCH] drm/i915: Allow tiling of objects with bit 17 swizzling by the CPU.
On Fri, 2009-04-03 at 17:03 -0700, Eric Anholt wrote: + obj_priv-bit_17 = kmalloc(page_count, GFP_KERNEL); seems like you could save a bit of memory here by using 1 bit per page instead of a byte. -- keith.pack...@intel.com signature.asc Description: This is a digitally signed message part -- -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel
Re: [PATCH] drm/i915: Allow tiling of objects with bit 17 swizzling by the CPU.
On Fri, 03 Apr 2009 18:08:14 -0700 Keith Packard kei...@keithp.com wrote: On Fri, 2009-04-03 at 17:03 -0700, Eric Anholt wrote: + obj_priv-bit_17 = kmalloc(page_count, GFP_KERNEL); seems like you could save a bit of memory here by using 1 bit per page instead of a byte. If you choose to go that route there are a bunch of bitmap handling routines in linux/bitmap.h. -- Jesse Barnes, Intel Open Source Technology Center -- -- ___ Dri-devel mailing list Dri-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/dri-devel