[Intel-gfx] [PATCH] Fix system lockup when a client tries to allocate a huge BO

Eric Anholt eric at anholt.net
Fri Jul 10 00:59:32 CEST 2009


On Mon, 2009-07-06 at 10:23 +0100, Chris Wilson wrote:
> On Mon, 2009-07-06 at 10:10 +0100, Simon Farnsworth wrote:
> > Eric Anholt wrote:
> > > Anyway, we could just cap allocations at aperture size and avoid any
> > > trickiness.  There's no reason to allow a BO to be allocated that won't
> > > fit in the GPU, right?
> > > 
> > Sounds very reasonable; how do I code that?
> 
> I think adding a defensive guard to bo_alloc of
>   if(size > bufmgr->gtt_size) return NULL;
> would be the first step -- which for now also ensures that size will be
> less than ULONG_MAX/2.
> 
> However the fix I think Eric is alluding to is this:
> >From aae30a03aba0fbe33ca51f052aaa8d57ebcb9eaf Mon Sep 17 00:00:00 2001
> From: Chris Wilson <chris at chris-wilson.co.uk>
> Date: Thu, 2 Jul 2009 14:31:49 +0100
> Subject: [PATCH] Limit bo pixmap to hw constraints

2D acceleration sizes are much bigger than this -- in fact,
approximately equivalent to the server's limits.

-- 
Eric Anholt
eric at anholt.net                         eric.anholt at intel.com


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20090709/2e2c6be3/attachment-0002.sig>


More information about the Intel-gfx mailing list