From 0f821c1e2f3de699fc0664ba73a2082879812c3d Mon Sep 17 00:00:00 2001 From: Aditya Swarup Date: Fri, 2 Aug 2024 12:44:47 -0700 Subject: [PATCH] iris: Disable fast clear when surface height is 16k If surface height during fast clear is 16k, as per bspec the height programmed should be "value - 1" i.e. 0x3FFF. However, HW adds "1" to it but ignores overflow bit[14]. HW performs OOB check based on bit[13:0] which is 0 and drops failed transactions. This patch passes the following failing test on LNL: "PIGLIT_PLATFORM=gbm PIGLIT_DEFAULT_SIZE=16384x16384 shader_runner fast-slow-clear-interaction.shader_test -auto -fbo" Signed-off-by: Aditya Swarup Reviewed-by: Nanley Chery Part-of: --- src/gallium/drivers/iris/iris_clear.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/gallium/drivers/iris/iris_clear.c b/src/gallium/drivers/iris/iris_clear.c index 30617d1622f..b4a4e346ca9 100644 --- a/src/gallium/drivers/iris/iris_clear.c +++ b/src/gallium/drivers/iris/iris_clear.c @@ -157,6 +157,12 @@ can_fast_clear_color(struct iris_context *ice, return false; } + /* Wa_16021232440: Disable fast clear when height is 16k */ + if (intel_needs_workaround(devinfo, 16021232440) && + res->surf.logical_level0_px.h == 16 * 1024) { + return false; + } + return true; }