Lines Matching refs:dev_priv
89 static int vmw_mob_pt_populate(struct vmw_private *dev_priv,
107 static int vmw_setup_otable_base(struct vmw_private *dev_priv, in vmw_setup_otable_base() argument
141 ret = vmw_mob_pt_populate(dev_priv, mob); in vmw_setup_otable_base()
149 cmd = vmw_fifo_reserve(dev_priv, sizeof(*cmd)); in vmw_setup_otable_base()
172 vmw_fifo_commit(dev_priv, sizeof(*cmd)); in vmw_setup_otable_base()
191 static void vmw_takedown_otable_base(struct vmw_private *dev_priv, in vmw_takedown_otable_base() argument
205 cmd = vmw_fifo_reserve(dev_priv, sizeof(*cmd)); in vmw_takedown_otable_base()
220 vmw_fifo_commit(dev_priv, sizeof(*cmd)); in vmw_takedown_otable_base()
237 static int vmw_otable_batch_setup(struct vmw_private *dev_priv, in vmw_otable_batch_setup() argument
256 ret = ttm_bo_create(&dev_priv->bdev, bo_size, in vmw_otable_batch_setup()
281 ret = vmw_setup_otable_base(dev_priv, i, batch->otable_bo, in vmw_otable_batch_setup()
296 vmw_takedown_otable_base(dev_priv, i, in vmw_otable_batch_setup()
316 int vmw_otables_setup(struct vmw_private *dev_priv) in vmw_otables_setup() argument
318 struct vmw_otable **otables = &dev_priv->otable_batch.otables; in vmw_otables_setup()
321 if (dev_priv->has_dx) { in vmw_otables_setup()
327 dev_priv->otable_batch.num_otables = ARRAY_SIZE(dx_tables); in vmw_otables_setup()
334 dev_priv->otable_batch.num_otables = ARRAY_SIZE(pre_dx_tables); in vmw_otables_setup()
337 ret = vmw_otable_batch_setup(dev_priv, &dev_priv->otable_batch); in vmw_otables_setup()
348 static void vmw_otable_batch_takedown(struct vmw_private *dev_priv, in vmw_otable_batch_takedown() argument
357 vmw_takedown_otable_base(dev_priv, i, in vmw_otable_batch_takedown()
376 void vmw_otables_takedown(struct vmw_private *dev_priv) in vmw_otables_takedown() argument
378 vmw_otable_batch_takedown(dev_priv, &dev_priv->otable_batch); in vmw_otables_takedown()
379 kfree(dev_priv->otable_batch.otables); in vmw_otables_takedown()
430 static int vmw_mob_pt_populate(struct vmw_private *dev_priv, in vmw_mob_pt_populate() argument
436 ret = ttm_bo_create(&dev_priv->bdev, mob->num_pages * PAGE_SIZE, in vmw_mob_pt_populate()
587 void vmw_mob_unbind(struct vmw_private *dev_priv, in vmw_mob_unbind() argument
605 cmd = vmw_fifo_reserve(dev_priv, sizeof(*cmd)); in vmw_mob_unbind()
613 vmw_fifo_commit(dev_priv, sizeof(*cmd)); in vmw_mob_unbind()
619 vmw_fifo_resource_dec(dev_priv); in vmw_mob_unbind()
637 int vmw_mob_bind(struct vmw_private *dev_priv, in vmw_mob_bind() argument
663 ret = vmw_mob_pt_populate(dev_priv, mob); in vmw_mob_bind()
672 vmw_fifo_resource_inc(dev_priv); in vmw_mob_bind()
674 cmd = vmw_fifo_reserve(dev_priv, sizeof(*cmd)); in vmw_mob_bind()
688 vmw_fifo_commit(dev_priv, sizeof(*cmd)); in vmw_mob_bind()
693 vmw_fifo_resource_dec(dev_priv); in vmw_mob_bind()