]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drm/amdgpu:keep bo pinned in prefered domain
authorFrank Min <Frank.Min@amd.com>
Wed, 27 Apr 2016 10:33:35 +0000 (18:33 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 25 Oct 2016 18:38:21 +0000 (14:38 -0400)
Signed-off-by: Frank Min <Frank.Min@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_cgs.c

index a61f4186a7ddd5706cc789da1edc20d3cb0b30dc..44f565465b0975a296a61dfd03aa8c6b3e0e132e 100644 (file)
@@ -242,7 +242,7 @@ static int amdgpu_cgs_gmap_gpu_mem(struct cgs_device *cgs_device, cgs_handle_t h
        r = amdgpu_bo_reserve(obj, false);
        if (unlikely(r != 0))
                return r;
-       r = amdgpu_bo_pin_restricted(obj, AMDGPU_GEM_DOMAIN_GTT,
+       r = amdgpu_bo_pin_restricted(obj, obj->prefered_domains,
                                     min_offset, max_offset, mcaddr);
        amdgpu_bo_unreserve(obj);
        return r;