diff options
Diffstat (limited to 'drivers/gpu/drm/vmwgfx/vmwgfx_drv.c')
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c index 9893328f8fdc..0083cbf99edf 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | |||
@@ -667,6 +667,7 @@ static int vmw_driver_load(struct drm_device *dev, unsigned long chipset) | |||
667 | dev_priv->memory_size = 512*1024*1024; | 667 | dev_priv->memory_size = 512*1024*1024; |
668 | } | 668 | } |
669 | dev_priv->max_mob_pages = 0; | 669 | dev_priv->max_mob_pages = 0; |
670 | dev_priv->max_mob_size = 0; | ||
670 | if (dev_priv->capabilities & SVGA_CAP_GBOBJECTS) { | 671 | if (dev_priv->capabilities & SVGA_CAP_GBOBJECTS) { |
671 | uint64_t mem_size = | 672 | uint64_t mem_size = |
672 | vmw_read(dev_priv, | 673 | vmw_read(dev_priv, |
@@ -676,6 +677,8 @@ static int vmw_driver_load(struct drm_device *dev, unsigned long chipset) | |||
676 | dev_priv->prim_bb_mem = | 677 | dev_priv->prim_bb_mem = |
677 | vmw_read(dev_priv, | 678 | vmw_read(dev_priv, |
678 | SVGA_REG_MAX_PRIMARY_BOUNDING_BOX_MEM); | 679 | SVGA_REG_MAX_PRIMARY_BOUNDING_BOX_MEM); |
680 | dev_priv->max_mob_size = | ||
681 | vmw_read(dev_priv, SVGA_REG_MOB_MAX_SIZE); | ||
679 | } else | 682 | } else |
680 | dev_priv->prim_bb_mem = dev_priv->vram_size; | 683 | dev_priv->prim_bb_mem = dev_priv->vram_size; |
681 | 684 | ||
@@ -941,6 +944,7 @@ static void vmw_postclose(struct drm_device *dev, | |||
941 | drm_master_put(&vmw_fp->locked_master); | 944 | drm_master_put(&vmw_fp->locked_master); |
942 | } | 945 | } |
943 | 946 | ||
947 | vmw_compat_shader_man_destroy(vmw_fp->shman); | ||
944 | ttm_object_file_release(&vmw_fp->tfile); | 948 | ttm_object_file_release(&vmw_fp->tfile); |
945 | kfree(vmw_fp); | 949 | kfree(vmw_fp); |
946 | } | 950 | } |
@@ -960,11 +964,17 @@ static int vmw_driver_open(struct drm_device *dev, struct drm_file *file_priv) | |||
960 | if (unlikely(vmw_fp->tfile == NULL)) | 964 | if (unlikely(vmw_fp->tfile == NULL)) |
961 | goto out_no_tfile; | 965 | goto out_no_tfile; |
962 | 966 | ||
967 | vmw_fp->shman = vmw_compat_shader_man_create(dev_priv); | ||
968 | if (IS_ERR(vmw_fp->shman)) | ||
969 | goto out_no_shman; | ||
970 | |||
963 | file_priv->driver_priv = vmw_fp; | 971 | file_priv->driver_priv = vmw_fp; |
964 | dev_priv->bdev.dev_mapping = dev->dev_mapping; | 972 | dev_priv->bdev.dev_mapping = dev->dev_mapping; |
965 | 973 | ||
966 | return 0; | 974 | return 0; |
967 | 975 | ||
976 | out_no_shman: | ||
977 | ttm_object_file_release(&vmw_fp->tfile); | ||
968 | out_no_tfile: | 978 | out_no_tfile: |
969 | kfree(vmw_fp); | 979 | kfree(vmw_fp); |
970 | return ret; | 980 | return ret; |