mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
drm/vmwgfx: move ttm_bo_swapout_all into vmwgfx
It is the sole user of this. Signed-off-by: Christian König <christian.koenig@amd.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/393498/
This commit is contained in:
parent
4561b366c7
commit
d7c59750f2
3 changed files with 5 additions and 13 deletions
|
@ -1525,17 +1525,6 @@ out:
|
||||||
}
|
}
|
||||||
EXPORT_SYMBOL(ttm_bo_swapout);
|
EXPORT_SYMBOL(ttm_bo_swapout);
|
||||||
|
|
||||||
void ttm_bo_swapout_all(void)
|
|
||||||
{
|
|
||||||
struct ttm_operation_ctx ctx = {
|
|
||||||
.interruptible = false,
|
|
||||||
.no_wait_gpu = false
|
|
||||||
};
|
|
||||||
|
|
||||||
while (ttm_bo_swapout(&ctx) == 0);
|
|
||||||
}
|
|
||||||
EXPORT_SYMBOL(ttm_bo_swapout_all);
|
|
||||||
|
|
||||||
void ttm_bo_tt_destroy(struct ttm_buffer_object *bo)
|
void ttm_bo_tt_destroy(struct ttm_buffer_object *bo)
|
||||||
{
|
{
|
||||||
if (bo->ttm == NULL)
|
if (bo->ttm == NULL)
|
||||||
|
|
|
@ -1370,6 +1370,10 @@ static int vmw_pm_freeze(struct device *kdev)
|
||||||
struct pci_dev *pdev = to_pci_dev(kdev);
|
struct pci_dev *pdev = to_pci_dev(kdev);
|
||||||
struct drm_device *dev = pci_get_drvdata(pdev);
|
struct drm_device *dev = pci_get_drvdata(pdev);
|
||||||
struct vmw_private *dev_priv = vmw_priv(dev);
|
struct vmw_private *dev_priv = vmw_priv(dev);
|
||||||
|
struct ttm_operation_ctx ctx = {
|
||||||
|
.interruptible = false,
|
||||||
|
.no_wait_gpu = false
|
||||||
|
};
|
||||||
int ret;
|
int ret;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -1390,7 +1394,7 @@ static int vmw_pm_freeze(struct device *kdev)
|
||||||
vmw_execbuf_release_pinned_bo(dev_priv);
|
vmw_execbuf_release_pinned_bo(dev_priv);
|
||||||
vmw_resource_evict_all(dev_priv);
|
vmw_resource_evict_all(dev_priv);
|
||||||
vmw_release_device_early(dev_priv);
|
vmw_release_device_early(dev_priv);
|
||||||
ttm_bo_swapout_all();
|
while (ttm_bo_swapout(&ctx) == 0);
|
||||||
if (dev_priv->enable_fb)
|
if (dev_priv->enable_fb)
|
||||||
vmw_fifo_resource_dec(dev_priv);
|
vmw_fifo_resource_dec(dev_priv);
|
||||||
if (atomic_read(&dev_priv->num_fifo_resources) != 0) {
|
if (atomic_read(&dev_priv->num_fifo_resources) != 0) {
|
||||||
|
|
|
@ -542,7 +542,6 @@ ssize_t ttm_bo_io(struct ttm_bo_device *bdev, struct file *filp,
|
||||||
size_t count, loff_t *f_pos, bool write);
|
size_t count, loff_t *f_pos, bool write);
|
||||||
|
|
||||||
int ttm_bo_swapout(struct ttm_operation_ctx *ctx);
|
int ttm_bo_swapout(struct ttm_operation_ctx *ctx);
|
||||||
void ttm_bo_swapout_all(void);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* ttm_bo_uses_embedded_gem_object - check if the given bo uses the
|
* ttm_bo_uses_embedded_gem_object - check if the given bo uses the
|
||||||
|
|
Loading…
Add table
Reference in a new issue