drm/amdgpu: Fix a false positive when pin non-VRAM memory
authorxinhui pan <xinhui.pan@amd.com>
Sat, 30 Jan 2021 00:41:04 +0000 (08:41 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 2 Feb 2021 17:06:21 +0000 (12:06 -0500)
commite1a4b67aac9ee870b4d95a008d47910c47db3092
tree0cd08367c2b04935648e47ed92409f763d864f8f
parentb131c363c8a37815e5c7d748883f7d3e1d8e40c2
drm/amdgpu: Fix a false positive when pin non-VRAM memory

Flag TTM_PL_FLAG_CONTIGUOUS is only valid for VRAM domain. So fix the
false positive by checking memory type too.

Suggested-by: Felix Kuehling <Felix.Kuehling@amd.com>
Acked-by: Christian König <christian.koenig@amd.com>
Signed-off-by: xinhui pan <xinhui.pan@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c