@@ -655,13 +655,12 @@ nouveau_bo_init_mem_type(struct ttm_bo_device *bdev, uint32_t type,
655
655
656
656
switch (type ) {
657
657
case TTM_PL_SYSTEM :
658
- man -> flags = TTM_MEMTYPE_FLAG_MAPPABLE ;
658
+ man -> flags = 0 ;
659
659
man -> available_caching = TTM_PL_MASK_CACHING ;
660
660
man -> default_caching = TTM_PL_FLAG_CACHED ;
661
661
break ;
662
662
case TTM_PL_VRAM :
663
- man -> flags = TTM_MEMTYPE_FLAG_FIXED |
664
- TTM_MEMTYPE_FLAG_MAPPABLE ;
663
+ man -> flags = TTM_MEMTYPE_FLAG_FIXED ;
665
664
man -> available_caching = TTM_PL_FLAG_UNCACHED |
666
665
TTM_PL_FLAG_WC ;
667
666
man -> default_caching = TTM_PL_FLAG_WC ;
@@ -690,12 +689,12 @@ nouveau_bo_init_mem_type(struct ttm_bo_device *bdev, uint32_t type,
690
689
man -> func = & ttm_bo_manager_func ;
691
690
692
691
if (drm -> agp .bridge ) {
693
- man -> flags = TTM_MEMTYPE_FLAG_MAPPABLE ;
692
+ man -> flags = 0 ;
694
693
man -> available_caching = TTM_PL_FLAG_UNCACHED |
695
694
TTM_PL_FLAG_WC ;
696
695
man -> default_caching = TTM_PL_FLAG_WC ;
697
696
} else {
698
- man -> flags = TTM_MEMTYPE_FLAG_MAPPABLE ;
697
+ man -> flags = 0 ;
699
698
man -> available_caching = TTM_PL_MASK_CACHING ;
700
699
man -> default_caching = TTM_PL_FLAG_CACHED ;
701
700
}
@@ -1437,7 +1436,6 @@ nouveau_bo_verify_access(struct ttm_buffer_object *bo, struct file *filp)
1437
1436
static int
1438
1437
nouveau_ttm_io_mem_reserve (struct ttm_bo_device * bdev , struct ttm_mem_reg * reg )
1439
1438
{
1440
- struct ttm_mem_type_manager * man = & bdev -> man [reg -> mem_type ];
1441
1439
struct nouveau_drm * drm = nouveau_bdev (bdev );
1442
1440
struct nvkm_device * device = nvxx_device (& drm -> client .device );
1443
1441
struct nouveau_mem * mem = nouveau_mem (reg );
@@ -1447,8 +1445,7 @@ nouveau_ttm_io_mem_reserve(struct ttm_bo_device *bdev, struct ttm_mem_reg *reg)
1447
1445
reg -> bus .size = reg -> num_pages << PAGE_SHIFT ;
1448
1446
reg -> bus .base = 0 ;
1449
1447
reg -> bus .is_iomem = false;
1450
- if (!(man -> flags & TTM_MEMTYPE_FLAG_MAPPABLE ))
1451
- return - EINVAL ;
1448
+
1452
1449
switch (reg -> mem_type ) {
1453
1450
case TTM_PL_SYSTEM :
1454
1451
/* System memory */
0 commit comments