@@ -343,37 +343,23 @@ nouveau_bo_new(struct nouveau_cli *cli, u64 size, int align,
343343}
344344
345345static void
346- set_placement_list (struct nouveau_drm * drm , struct ttm_place * pl , unsigned * n ,
347- uint32_t domain , uint32_t flags )
346+ set_placement_list (struct ttm_place * pl , unsigned * n , uint32_t domain )
348347{
349348 * n = 0 ;
350349
351350 if (domain & NOUVEAU_GEM_DOMAIN_VRAM ) {
352- struct nvif_mmu * mmu = & drm -> client .mmu ;
353- const u8 type = mmu -> type [drm -> ttm .type_vram ].type ;
354-
355351 pl [* n ].mem_type = TTM_PL_VRAM ;
356- pl [* n ].flags = flags & ~TTM_PL_FLAG_CACHED ;
357-
358- /* Some BARs do not support being ioremapped WC */
359- if (drm -> client .device .info .family >= NV_DEVICE_INFO_V0_TESLA &&
360- type & NVIF_MEM_UNCACHED )
361- pl [* n ].flags &= ~TTM_PL_FLAG_WC ;
362-
352+ pl [* n ].flags = 0 ;
363353 (* n )++ ;
364354 }
365355 if (domain & NOUVEAU_GEM_DOMAIN_GART ) {
366356 pl [* n ].mem_type = TTM_PL_TT ;
367- pl [* n ].flags = flags ;
368-
369- if (drm -> agp .bridge )
370- pl [* n ].flags &= ~TTM_PL_FLAG_CACHED ;
371-
357+ pl [* n ].flags = 0 ;
372358 (* n )++ ;
373359 }
374360 if (domain & NOUVEAU_GEM_DOMAIN_CPU ) {
375361 pl [* n ].mem_type = TTM_PL_SYSTEM ;
376- pl [(* n )++ ].flags = flags ;
362+ pl [(* n )++ ].flags = 0 ;
377363 }
378364}
379365
@@ -415,18 +401,14 @@ void
415401nouveau_bo_placement_set (struct nouveau_bo * nvbo , uint32_t domain ,
416402 uint32_t busy )
417403{
418- struct nouveau_drm * drm = nouveau_bdev (nvbo -> bo .bdev );
419404 struct ttm_placement * pl = & nvbo -> placement ;
420- uint32_t flags = nvbo -> force_coherent ? TTM_PL_FLAG_UNCACHED :
421- TTM_PL_MASK_CACHING ;
422405
423406 pl -> placement = nvbo -> placements ;
424- set_placement_list (drm , nvbo -> placements , & pl -> num_placement ,
425- domain , flags );
407+ set_placement_list (nvbo -> placements , & pl -> num_placement , domain );
426408
427409 pl -> busy_placement = nvbo -> busy_placements ;
428- set_placement_list (drm , nvbo -> busy_placements , & pl -> num_busy_placement ,
429- domain | busy , flags );
410+ set_placement_list (nvbo -> busy_placements , & pl -> num_busy_placement ,
411+ domain | busy );
430412
431413 set_placement_range (nvbo , domain );
432414}
@@ -888,7 +870,7 @@ nouveau_bo_move_flipd(struct ttm_buffer_object *bo, bool evict,
888870 .fpfn = 0 ,
889871 .lpfn = 0 ,
890872 .mem_type = TTM_PL_TT ,
891- .flags = TTM_PL_MASK_CACHING
873+ .flags = 0
892874 };
893875 struct ttm_placement placement ;
894876 struct ttm_resource tmp_reg ;
@@ -930,7 +912,7 @@ nouveau_bo_move_flips(struct ttm_buffer_object *bo, bool evict,
930912 .fpfn = 0 ,
931913 .lpfn = 0 ,
932914 .mem_type = TTM_PL_TT ,
933- .flags = TTM_PL_MASK_CACHING
915+ .flags = 0
934916 };
935917 struct ttm_placement placement ;
936918 struct ttm_resource tmp_reg ;
0 commit comments