xf86-video-intel: 2 commits - src/i830_driver.c src/i830_uxa.c
Eric Anholt
eric at anholt.net
Thu Jul 9 14:13:33 PDT 2009
On Wed, 2009-07-08 at 18:27 +0200, Michel Dänzer wrote:
> On Wed, 2009-07-08 at 09:18 -0700, Eric Anholt wrote:
> >
> > New commits:
> > commit 40e7c9505265823786cf730214db84812a5e494e
> > Author: Eric Anholt <eric at anholt.net>
> > Date: Mon Jul 6 11:54:50 2009 -0700
> >
> > Refuse to allocate giant BOs on 32-bit systems.
> >
> > The overcommit of address space combined with these buffers hitting SW
> > fallbacks all the time means that we're probably better off telling the
> > application "no" instead of likely silently failing later.
> >
> > Bug #22601.
> >
> > diff --git a/src/i830_uxa.c b/src/i830_uxa.c
> > index eb35014..ef7ac84 100644
> > --- a/src/i830_uxa.c
> > +++ b/src/i830_uxa.c
> > @@ -627,6 +627,22 @@ i830_uxa_create_pixmap (ScreenPtr screen, int w, int h, int depth, unsigned usag
> > * with drm_intel_bufmgr_check_aperture().
> > */
> > size = i830_get_fence_size(i830, stride * h);
> > + assert(size >= stride * h);
> > + }
> > +
> > + /* Fail very large allocations on 32-bit systems. Large BOs will
> > + * tend to hit SW fallbacks frequently, and also will tend to fail
> > + * to successfully map when doing SW fallbacks because we overcommit
> > + * address space for BO access.
> > + *
> > + * Note that size should fit in 32 bits. We throw out >32767x32767x4,
> > + * and pitch alignment could get us up to 32768x32767x4.
> > + */
> > + if (sizeof(unsigned int) == 4 &&
> > [...]
>
> FWIW, this test is true on 64-bit systems as well.
Hah, wrote the wrong code for what I was thinking. Thanks.
--
Eric Anholt
eric at anholt.net eric.anholt at intel.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://lists.x.org/archives/xorg-devel/attachments/20090709/8332378f/attachment.pgp
More information about the xorg-devel
mailing list