summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/ttm
diff options
context:
space:
mode:
authorChristian König2017-03-29 12:13:54 +0200
committerAlex Deucher2017-04-05 05:33:42 +0200
commitc8b26bd1d2997e20b5f911c04b1dd2266256b976 (patch)
tree0311263dedf7050243a04c2171c2c99a111c7573 /drivers/gpu/drm/ttm
parentdrm/ttm: add io_mem_pfn callback (diff)
downloadkernel-qcow2-linux-c8b26bd1d2997e20b5f911c04b1dd2266256b976.tar.gz
kernel-qcow2-linux-c8b26bd1d2997e20b5f911c04b1dd2266256b976.tar.xz
kernel-qcow2-linux-c8b26bd1d2997e20b5f911c04b1dd2266256b976.zip
drm/ttm: add TTM_PL_FLAG_CONTIGUOUS v2
This allows drivers to specify if they need a contiguous allocation or not. v2: use space instead of tab Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/ttm')
-rw-r--r--drivers/gpu/drm/ttm/ttm_bo.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index 99d2a2c6a4ec..e44626a2e698 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -1036,7 +1036,9 @@ static bool ttm_bo_places_compat(const struct ttm_place *places,
*new_flags = heap->flags;
if ((*new_flags & mem->placement & TTM_PL_MASK_CACHING) &&
- (*new_flags & mem->placement & TTM_PL_MASK_MEM))
+ (*new_flags & mem->placement & TTM_PL_MASK_MEM) &&
+ (!(*new_flags & TTM_PL_FLAG_CONTIGUOUS) ||
+ (mem->placement & TTM_PL_FLAG_CONTIGUOUS)))
return true;
}
return false;