drm/ast: switch to using CACHED by default for sysram
authorDave Airlie <airlied@redhat.com>
Fri, 12 Sep 2014 04:32:40 +0000 (14:32 +1000)
committerDave Airlie <airlied@redhat.com>
Fri, 12 Sep 2014 07:32:12 +0000 (17:32 +1000)
This fixes problems on ppc64 platforms, where we could end up using
a WC mapping for migrating BOs with memcpy, when really we want to
use cached memory.

Tested-by: Ben Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/ast/ast_ttm.c

index 8008ea0..5098c7d 100644 (file)
@@ -300,9 +300,9 @@ void ast_ttm_placement(struct ast_bo *bo, int domain)
        if (domain & TTM_PL_FLAG_VRAM)
                bo->placements[c++].flags = TTM_PL_FLAG_WC | TTM_PL_FLAG_UNCACHED | TTM_PL_FLAG_VRAM;
        if (domain & TTM_PL_FLAG_SYSTEM)
-               bo->placements[c++].flags = TTM_PL_MASK_CACHING | TTM_PL_FLAG_SYSTEM;
+               bo->placements[c++].flags = TTM_PL_FLAG_CACHED | TTM_PL_FLAG_SYSTEM;
        if (!c)
-               bo->placements[c++].flags = TTM_PL_MASK_CACHING | TTM_PL_FLAG_SYSTEM;
+               bo->placements[c++].flags = TTM_PL_FLAG_CACHED | TTM_PL_FLAG_SYSTEM;
        bo->placement.num_placement = c;
        bo->placement.num_busy_placement = c;
        for (i = 0; i < c; ++i) {