Module: Mesa Branch: staging/23.0 Commit: 86487ffe6651f6ad4c8c245e10edc2fafd928b2c URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=86487ffe6651f6ad4c8c245e10edc2fafd928b2c
Author: Alyssa Rosenzweig <[email protected]> Date: Sun Oct 30 21:37:51 2022 -0400 panfrost: Don't round up Midgard polygon list BOs 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). Signed-off-by: Alyssa Rosenzweig <[email protected]> Cc: mesa-stable Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21831> (cherry picked from commit f2617944bfd3200c590c440baa95f8ff63fa87b9) --- .pick_status.json | 2 +- src/gallium/drivers/panfrost/pan_cmdstream.c | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index eec76ddd648..a1ceb16638d 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -4999,7 +4999,7 @@ "description": "panfrost: Don't round up Midgard polygon list BOs", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/src/gallium/drivers/panfrost/pan_cmdstream.c b/src/gallium/drivers/panfrost/pan_cmdstream.c index 2f567e96d8a..14930e10ecb 100644 --- a/src/gallium/drivers/panfrost/pan_cmdstream.c +++ b/src/gallium/drivers/panfrost/pan_cmdstream.c @@ -4436,7 +4436,6 @@ batch_get_polygon_list(struct panfrost_batch *batch) bool has_draws = batch->scoreboard.first_tiler != NULL; unsigned size = panfrost_tiler_get_polygon_list_size( dev, batch->key.width, batch->key.height, has_draws); - size = util_next_power_of_two(size); /* Create the BO as invisible if we can. If there are no draws, * we need to write the polygon list manually because there's
