File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
drivers/gpu/drm/amd/amdgpu Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -1778,7 +1778,7 @@ int amdgpu_cs_find_mapping(struct amdgpu_cs_parser *parser,
1778
1778
struct ttm_operation_ctx ctx = { false, false };
1779
1779
struct amdgpu_vm * vm = & fpriv -> vm ;
1780
1780
struct amdgpu_bo_va_mapping * mapping ;
1781
- int r ;
1781
+ int i , r ;
1782
1782
1783
1783
addr /= AMDGPU_GPU_PAGE_SIZE ;
1784
1784
@@ -1793,13 +1793,13 @@ int amdgpu_cs_find_mapping(struct amdgpu_cs_parser *parser,
1793
1793
if (dma_resv_locking_ctx ((* bo )-> tbo .base .resv ) != & parser -> exec .ticket )
1794
1794
return - EINVAL ;
1795
1795
1796
- if (!(( * bo )-> flags & AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS )) {
1797
- (* bo )-> flags |= AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS ;
1798
- amdgpu_bo_placement_from_domain ( * bo , (* bo )-> allowed_domains );
1799
- r = ttm_bo_validate ( & ( * bo )-> tbo , & ( * bo ) -> placement , & ctx ) ;
1800
- if ( r )
1801
- return r ;
1802
- }
1796
+ ( * bo )-> flags |= AMDGPU_GEM_CREATE_VRAM_CONTIGUOUS ;
1797
+ amdgpu_bo_placement_from_domain (* bo , ( * bo )-> allowed_domains ) ;
1798
+ for ( i = 0 ; i < (* bo )-> placement . num_placement ; i ++ )
1799
+ ( * bo )-> placements [ i ]. flags |= TTM_PL_FLAG_CONTIGUOUS ;
1800
+ r = ttm_bo_validate ( & ( * bo ) -> tbo , & ( * bo ) -> placement , & ctx );
1801
+ if ( r )
1802
+ return r ;
1803
1803
1804
1804
return amdgpu_ttm_alloc_gart (& (* bo )-> tbo );
1805
1805
}
You can’t perform that action at this time.
0 commit comments