From 38da1ae68a2192307109ac9b6d6c36da27285dd7 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Mon, 10 Apr 2023 17:08:21 +0200 Subject: [PATCH] radv: update binning settings to work around GPU hangs Ported from RadeonSI, but it seems PAL always use 1 for both parameters as well. This should fix random GPU hangs with small chips (eg. NAVI24, GFX1103), though all chips might have been affected. Cc: mesa-stable Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8046 Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8597 Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/8683 Signed-off-by: Samuel Pitoiset Part-of: (cherry picked from commit 74ab9401561c5d5bef62330c0b1264f42bfe52da) --- .pick_status.json | 2 +- src/amd/vulkan/radv_physical_device.c | 15 ++------------- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 601801fae59..22c4e1f5f89 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -553,7 +553,7 @@ "description": "radv: update binning settings to work around GPU hangs", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null }, diff --git a/src/amd/vulkan/radv_physical_device.c b/src/amd/vulkan/radv_physical_device.c index b7e3803a1a5..976865f0ae5 100644 --- a/src/amd/vulkan/radv_physical_device.c +++ b/src/amd/vulkan/radv_physical_device.c @@ -389,20 +389,9 @@ static void radv_get_binning_settings(const struct radv_physical_device *pdevice, struct radv_binning_settings *settings) { - if (pdevice->rad_info.has_dedicated_vram && pdevice->rad_info.max_render_backends > 4) { - settings->context_states_per_bin = 1; - settings->persistent_states_per_bin = 1; - } else { - settings->context_states_per_bin = 3; - /* 32 causes hangs for RAVEN. */ - settings->persistent_states_per_bin = 8; - } - + settings->context_states_per_bin = 1; + settings->persistent_states_per_bin = 1; settings->fpovs_per_batch = 63; - - /* The context states are affected by the scissor bug. */ - if (pdevice->rad_info.has_gfx9_scissor_bug) - settings->context_states_per_bin = 1; } static void