[Nouveau] [Bug 39010] better handling of large pixmaps
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Mon Aug 19 19:04:52 PDT 2013
https://bugs.freedesktop.org/show_bug.cgi?id=39010
--- Comment #8 from Ilia Mirkin <imirkin at alum.mit.edu> ---
What's with the weird non-power-of-2 sizes?
Wouldn't it be better to have a target number of pixmaps to fit in vram, or
perhaps a percentage of vram that you're willing to take up with a single
pixmap? There are lots of cards with all sorts of quantities of memory (e.g.
there are 8800's with 320MB of RAM).
So once you determine a percentage, just have a list of sizes like
sizes = [8192, 4096, 2048]
for size in sizes:
if size * size * 4 < memory * 0.1:
return size
return 1024
(This is an example where I assume RGBA pixmaps, up to 10% of vram, but I
picked that at random... maybe other percentages would be more reasonable...
play around with the numbers. It certainly seems that we'd never want to allow
a pixmap that's bigger than VRAM, at the very least, which with current code,
there could be, if there were nv10+ with < 64MB of vram, which I'm pretty sure
I've seen with at least NV1A with 32M of stolen ram.)
[Note: please don't take this as an endorsement of the approach. In fact, I
thought TTM should be able to handle all that, but apparently not. This is just
a comment on improving your patch, irrespective of the overall approach.]
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/nouveau/attachments/20130820/930f12fa/attachment.html>
More information about the Nouveau
mailing list