From 3234ef853855d5197c788566b6cfa3afde58627c Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Thu, 15 Apr 2021 15:10:30 -0400 Subject: [PATCH] zink: only reset query on suspend if the query has previously been stopped if the query has never been stopped, then doing an implicit reset here does nothing except give the gpu more work Fixes: 00fc85a0119 ("zink: reset queries when suspending if >50% of total pool is used") Reviewed-by: Dave Airlie Part-of: (cherry picked from commit 55b2b9b389a82cb0fd2e82cfb63ac1ac3a687358) --- .pick_status.json | 2 +- src/gallium/drivers/zink/zink_query.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index ffa91e206a7..c5217e4d18a 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -391,7 +391,7 @@ "description": "zink: only reset query on suspend if the query has previously been stopped", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": "00fc85a01194e9fc150d4a0ec80826f2f16504ee" }, diff --git a/src/gallium/drivers/zink/zink_query.c b/src/gallium/drivers/zink/zink_query.c index 5755818d3ad..a0dfc75a6f4 100644 --- a/src/gallium/drivers/zink/zink_query.c +++ b/src/gallium/drivers/zink/zink_query.c @@ -780,7 +780,7 @@ zink_suspend_queries(struct zink_context *ctx, struct zink_batch *batch) } if (query->needs_update) update_qbo(ctx, query); - if (query->curr_query > NUM_QUERIES / 2) + if (query->last_start && query->curr_query > NUM_QUERIES / 2) reset_pool(ctx, batch, query); } }