Skip to content

panfrost: Don't round up Midgard polygon list BOs

Alyssa Rosenzweig requested to merge alyssa/mesa:panfrost/dont-round into main

Rounding up the polygon list BO can waste large amounts of memory. In a common case I observed, it rounded up 11MB to 16MB, wasting 5MB. That adds up quickly across processes, especially on the 2GB machines.

This only applies to Midgard. On Bifrost and newer, the driver does not explicitly allocate this data structure. Cc stable because this rounding is incorrect and the increase in RAM usage can cause real problems (especially given how slow the shrinker is).

Cc @italove, I would appreciate if you would double check the calculation here because I sure didn't :~)

Merge request reports