diff options
author | Thomas Hellstrom <thellstrom@vmware.com> | 2012-11-21 11:09:56 +0100 |
---|---|---|
committer | Thomas Hellstrom <thellstrom@vmware.com> | 2014-01-17 07:52:22 +0100 |
commit | afb0e50fae3aaeef2ca58e27cf650cb388846f19 (patch) | |
tree | 7c33c465359255c1bf8ddba65b1b86eaa4eaf9f6 | |
parent | 6da768aa66d2df9067b0bb694a6106bee3cb191f (diff) | |
download | linux-afb0e50fae3aaeef2ca58e27cf650cb388846f19.tar.bz2 |
drm/vmwgfx: Read bounding box memory from the appropriate register
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Zack Rusin <zackr@vmware.com>
-rw-r--r-- | drivers/gpu/drm/vmwgfx/vmwgfx_drv.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c index a7dc14a9e94b..eaffb0524092 100644 --- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c +++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c @@ -650,13 +650,18 @@ static int vmw_driver_load(struct drm_device *dev, unsigned long chipset) SVGA_REG_SUGGESTED_GBOBJECT_MEM_SIZE_KB); dev_priv->max_mob_pages = mem_size * 1024 / PAGE_SIZE; - } + dev_priv->prim_bb_mem = + vmw_read(dev_priv, + SVGA_REG_MAX_PRIMARY_BOUNDING_BOX_MEM); + } else + dev_priv->prim_bb_mem = dev_priv->vram_size; ret = vmw_dma_masks(dev_priv); if (unlikely(ret != 0)) goto out_err0; - dev_priv->prim_bb_mem = dev_priv->vram_size; + if (unlikely(dev_priv->prim_bb_mem < dev_priv->vram_size)) + dev_priv->prim_bb_mem = dev_priv->vram_size; mutex_unlock(&dev_priv->hw_mutex); |