Skip to content

Commit cd1d58e

Browse files
drm/vmwgfx: stop using TTM_MEMTYPE_FLAG_MAPPABLE
The driver doesn't expose any not-mapable memory resources. Signed-off-by: Christian König <[email protected]> Reviewed-by: Thomas Zimmermann <[email protected]> Reviewed-by: Daniel Vetter <[email protected]> Link: https://patchwork.freedesktop.org/patch/378241/
1 parent f5a9a93 commit cd1d58e

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

drivers/gpu/drm/vmwgfx/vmwgfx_ttm_buffer.c

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -742,15 +742,13 @@ static int vmw_init_mem_type(struct ttm_bo_device *bdev, uint32_t type,
742742
switch (type) {
743743
case TTM_PL_SYSTEM:
744744
/* System memory */
745-
746-
man->flags = TTM_MEMTYPE_FLAG_MAPPABLE;
747745
man->available_caching = TTM_PL_FLAG_CACHED;
748746
man->default_caching = TTM_PL_FLAG_CACHED;
749747
break;
750748
case TTM_PL_VRAM:
751749
/* "On-card" video ram */
752750
man->func = &vmw_thp_func;
753-
man->flags = TTM_MEMTYPE_FLAG_FIXED | TTM_MEMTYPE_FLAG_MAPPABLE;
751+
man->flags = TTM_MEMTYPE_FLAG_FIXED;
754752
man->available_caching = TTM_PL_FLAG_CACHED;
755753
man->default_caching = TTM_PL_FLAG_CACHED;
756754
break;
@@ -762,7 +760,6 @@ static int vmw_init_mem_type(struct ttm_bo_device *bdev, uint32_t type,
762760
* slots as well as the bo size.
763761
*/
764762
man->func = &vmw_gmrid_manager_func;
765-
man->flags = TTM_MEMTYPE_FLAG_MAPPABLE;
766763
man->available_caching = TTM_PL_FLAG_CACHED;
767764
man->default_caching = TTM_PL_FLAG_CACHED;
768765
break;
@@ -789,16 +786,14 @@ static int vmw_verify_access(struct ttm_buffer_object *bo, struct file *filp)
789786

790787
static int vmw_ttm_io_mem_reserve(struct ttm_bo_device *bdev, struct ttm_mem_reg *mem)
791788
{
792-
struct ttm_mem_type_manager *man = &bdev->man[mem->mem_type];
793789
struct vmw_private *dev_priv = container_of(bdev, struct vmw_private, bdev);
794790

795791
mem->bus.addr = NULL;
796792
mem->bus.is_iomem = false;
797793
mem->bus.offset = 0;
798794
mem->bus.size = mem->num_pages << PAGE_SHIFT;
799795
mem->bus.base = 0;
800-
if (!(man->flags & TTM_MEMTYPE_FLAG_MAPPABLE))
801-
return -EINVAL;
796+
802797
switch (mem->mem_type) {
803798
case TTM_PL_SYSTEM:
804799
case VMW_PL_GMR:

0 commit comments

Comments
 (0)