etnaviv: Use write combine instead of unached mappings for shader bo
authorGuido Günther <agx@sigxcpu.org>
Mon, 1 Oct 2018 16:37:28 +0000 (18:37 +0200)
committerLucas Stach <l.stach@pengutronix.de>
Thu, 4 Oct 2018 08:33:25 +0000 (10:33 +0200)
The later are sensitive to unaligned accesses on arm64[1] and we don't
need an uncached mapping here.

[1]: https://lists.freedesktop.org/archives/etnaviv/2018-September/001956.html

Signed-off-by: Guido Günther <guido.gunther@puri.sm>
Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
src/gallium/drivers/etnaviv/etnaviv_shader.c

index 04ababc801ffd8428e6895614e4b7426276e4eb7..27c735b83bd000547438b95931a0ecd2ed5c5eaf 100644 (file)
@@ -41,7 +41,7 @@ static bool etna_icache_upload_shader(struct etna_context *ctx, struct etna_shad
 {
    if (v->bo)
       return true;
-   v->bo = etna_bo_new(ctx->screen->dev, v->code_size*4, DRM_ETNA_GEM_CACHE_UNCACHED);
+   v->bo = etna_bo_new(ctx->screen->dev, v->code_size*4, DRM_ETNA_GEM_CACHE_WC);
    if (!v->bo)
       return false;