From dc921f73779e90e1514191d87cbe133c61b15b19 Mon Sep 17 00:00:00 2001 From: Vadym Shovkoplias Date: Mon, 20 Dec 2021 13:39:21 +0200 Subject: [PATCH] iris: Do not apply SCANOUT allocation flags for SHARED-only requests It provides similar solution as in [1]. This was workaround for the users of gbm_bo_create_with_modifiers(), which were unable to specify the buffer usage (GPU / GPU+DISPLAY). But after the commit [2] this become possible. And forcing usage to GBM_BO_USE_SCANOUT migrated directly into gbm_bo_create_with_modifiers [3], allowing us to remove such workarounds from the drivers. [1]: ef3b31c9 ("v3d: Don't force SCANOUT for PIPE_BIND_SHARED requests") [2]: 268e12c6 ("gbm: add gbm_{bo,surface}_create_with_modifiers2") [3]: ad50b47a ("gbm: assume USE_SCANOUT in create_with_modifiers") Suggested-by: Roman Stratiienko Signed-off-by: Vadym Shovkoplias Reviewed-by: Nanley Chery Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5642 Part-of: --- src/gallium/drivers/iris/iris_resource.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/gallium/drivers/iris/iris_resource.c b/src/gallium/drivers/iris/iris_resource.c index 1296067e024..84e28743b68 100644 --- a/src/gallium/drivers/iris/iris_resource.c +++ b/src/gallium/drivers/iris/iris_resource.c @@ -432,10 +432,7 @@ iris_resource_alloc_flags(const struct iris_screen *screen, break; } - /* Scanout and shared buffers need to be WC (shared because they might be - * used for scanout) - */ - if (templ->bind & (PIPE_BIND_SCANOUT | PIPE_BIND_SHARED)) + if (templ->bind & PIPE_BIND_SCANOUT) flags |= BO_ALLOC_SCANOUT; if (templ->flags & (PIPE_RESOURCE_FLAG_MAP_COHERENT |