From: Harish Kasiviswanathan <Harish.Kasiviswanathan@xxxxxxx> This change was lost in last merge. The upstream commit 672242be560 removed init_mem_type Signed-off-by: Harish Kasiviswanathan <Harish.Kasiviswanathan@xxxxxxx> Acked-by: Rajneesh Bhardwaj <rajneesh.bhardwaj@xxxxxxx> Reviewed-by: Eric Huang <jinhuieric.huang@xxxxxxx> Signed-off-by: Alex Deucher <alexander.deucher@xxxxxxx> --- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c index b325b067926b..d6bc08fb5b42 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c @@ -181,8 +181,13 @@ int amdgpu_vram_mgr_init(struct amdgpu_device *adev) struct ttm_resource_manager *man = &mgr->manager; int ret; - man->available_caching = TTM_PL_FLAG_UNCACHED | TTM_PL_FLAG_WC; - man->default_caching = TTM_PL_FLAG_WC; + if (adev->gmc.xgmi.connected_to_cpu) { + man->available_caching = TTM_PL_FLAG_CACHED; + man->default_caching = TTM_PL_FLAG_CACHED; + } else { + man->available_caching = TTM_PL_FLAG_UNCACHED | TTM_PL_FLAG_WC; + man->default_caching = TTM_PL_FLAG_WC; + } ttm_resource_manager_init(man, adev->gmc.real_vram_size >> PAGE_SHIFT); -- 2.29.2 _______________________________________________ amd-gfx mailing list amd-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/amd-gfx