@@ -742,15 +742,13 @@ static int vmw_init_mem_type(struct ttm_bo_device *bdev, uint32_t type,
742
742
switch (type ) {
743
743
case TTM_PL_SYSTEM :
744
744
/* System memory */
745
-
746
- man -> flags = TTM_MEMTYPE_FLAG_MAPPABLE ;
747
745
man -> available_caching = TTM_PL_FLAG_CACHED ;
748
746
man -> default_caching = TTM_PL_FLAG_CACHED ;
749
747
break ;
750
748
case TTM_PL_VRAM :
751
749
/* "On-card" video ram */
752
750
man -> func = & vmw_thp_func ;
753
- man -> flags = TTM_MEMTYPE_FLAG_FIXED | TTM_MEMTYPE_FLAG_MAPPABLE ;
751
+ man -> flags = TTM_MEMTYPE_FLAG_FIXED ;
754
752
man -> available_caching = TTM_PL_FLAG_CACHED ;
755
753
man -> default_caching = TTM_PL_FLAG_CACHED ;
756
754
break ;
@@ -762,7 +760,6 @@ static int vmw_init_mem_type(struct ttm_bo_device *bdev, uint32_t type,
762
760
* slots as well as the bo size.
763
761
*/
764
762
man -> func = & vmw_gmrid_manager_func ;
765
- man -> flags = TTM_MEMTYPE_FLAG_MAPPABLE ;
766
763
man -> available_caching = TTM_PL_FLAG_CACHED ;
767
764
man -> default_caching = TTM_PL_FLAG_CACHED ;
768
765
break ;
@@ -789,16 +786,14 @@ static int vmw_verify_access(struct ttm_buffer_object *bo, struct file *filp)
789
786
790
787
static int vmw_ttm_io_mem_reserve (struct ttm_bo_device * bdev , struct ttm_mem_reg * mem )
791
788
{
792
- struct ttm_mem_type_manager * man = & bdev -> man [mem -> mem_type ];
793
789
struct vmw_private * dev_priv = container_of (bdev , struct vmw_private , bdev );
794
790
795
791
mem -> bus .addr = NULL ;
796
792
mem -> bus .is_iomem = false;
797
793
mem -> bus .offset = 0 ;
798
794
mem -> bus .size = mem -> num_pages << PAGE_SHIFT ;
799
795
mem -> bus .base = 0 ;
800
- if (!(man -> flags & TTM_MEMTYPE_FLAG_MAPPABLE ))
801
- return - EINVAL ;
796
+
802
797
switch (mem -> mem_type ) {
803
798
case TTM_PL_SYSTEM :
804
799
case VMW_PL_GMR :
0 commit comments