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 <roman.o.stratiienko@globallogic.com>
Signed-off-by: Vadym Shovkoplias <vadym.shovkoplias@globallogic.com>
Reviewed-by: Nanley Chery <nanley.g.chery@intel.com>
Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/5642
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14264>
This commit is contained in:
Vadym Shovkoplias 2021-12-20 13:39:21 +02:00 committed by Marge Bot
parent 93087f71e6
commit dc921f7377
1 changed files with 1 additions and 4 deletions

View File

@ -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 |