summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/vmwgfx
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2020-07-21 10:58:13 +0300
committerChristian König <christian.koenig@amd.com>2020-07-31 18:13:09 +0300
commitbe1213a341a289afc51f89181c310e368fba0b66 (patch)
tree4821ba39873497faafa02a8ff1080cc513ccb6a5 /drivers/gpu/drm/vmwgfx
parent418d2ad1ac521acc46f74f6bcbc8c1158d077346 (diff)
downloadlinux-be1213a341a289afc51f89181c310e368fba0b66.tar.xz
drm/ttm: remove TTM_MEMTYPE_FLAG_FIXED v2
Instead use a boolean field in the memory manager structure. Also invert the meaning of the field since the use of a TT structure is the special case here. v2: cleanup zero init. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Link: https://patchwork.freedesktop.org/patch/382079/
Diffstat (limited to 'drivers/gpu/drm/vmwgfx')
-rw-r--r--drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
index b2761a4b4992..d00748ecaf20 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c
@@ -747,7 +747,6 @@ static int vmw_init_mem_type(struct ttm_bo_device *bdev, uint32_t type,
case TTM_PL_VRAM:
/* "On-card" video ram */
man->func = &vmw_thp_func;
- man->flags = TTM_MEMTYPE_FLAG_FIXED;
man->available_caching = TTM_PL_FLAG_CACHED;
man->default_caching = TTM_PL_FLAG_CACHED;
break;
@@ -761,6 +760,8 @@ static int vmw_init_mem_type(struct ttm_bo_device *bdev, uint32_t type,
man->func = &vmw_gmrid_manager_func;
man->available_caching = TTM_PL_FLAG_CACHED;
man->default_caching = TTM_PL_FLAG_CACHED;
+ /* TODO: This is most likely not correct */
+ man->use_tt = true;
break;
default:
DRM_ERROR("Unsupported memory type %u\n", (unsigned)type);