All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Christian König" <ckoenig.leichtzumerken@gmail.com>
To: dri-devel@lists.freedesktop.org, ray.huang@amd.com,
	airlied@gmail.com, daniel@ffwll.ch
Subject: [PATCH 4/4] drm/vmwgfx: move ttm_bo_swapout_all into vmwgfx
Date: Fri,  2 Oct 2020 10:47:07 +0200	[thread overview]
Message-ID: <20201002084707.2203-4-christian.koenig@amd.com> (raw)
In-Reply-To: <20201002084707.2203-1-christian.koenig@amd.com>

It is the sole user of this.

Signed-off-by: Christian König <christian.koenig@amd.com>
---
 drivers/gpu/drm/ttm/ttm_bo.c        | 11 -----------
 drivers/gpu/drm/vmwgfx/vmwgfx_drv.c |  6 +++++-
 include/drm/ttm/ttm_bo_api.h        |  1 -
 3 files changed, 5 insertions(+), 13 deletions(-)

diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index 5c5836c4284e..74708dd4a8e9 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -1308,17 +1308,6 @@ int ttm_bo_swapout(struct ttm_operation_ctx *ctx)
 }
 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)
 {
 	if (bo->ttm == NULL)
diff --git a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
index 2f99079e122b..dcbcb04ff27c 100644
--- a/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
+++ b/drivers/gpu/drm/vmwgfx/vmwgfx_drv.c
@@ -1364,6 +1364,10 @@ static int vmw_pm_freeze(struct device *kdev)
 	struct pci_dev *pdev = to_pci_dev(kdev);
 	struct drm_device *dev = pci_get_drvdata(pdev);
 	struct vmw_private *dev_priv = vmw_priv(dev);
+	struct ttm_operation_ctx ctx = {
+		.interruptible = false,
+		.no_wait_gpu = false
+	};
 	int ret;
 
 	/*
@@ -1384,7 +1388,7 @@ static int vmw_pm_freeze(struct device *kdev)
 	vmw_execbuf_release_pinned_bo(dev_priv);
 	vmw_resource_evict_all(dev_priv);
 	vmw_release_device_early(dev_priv);
-	ttm_bo_swapout_all();
+	while (ttm_bo_swapout(&ctx) == 0);
 	if (dev_priv->enable_fb)
 		vmw_fifo_resource_dec(dev_priv);
 	if (atomic_read(&dev_priv->num_fifo_resources) != 0) {
diff --git a/include/drm/ttm/ttm_bo_api.h b/include/drm/ttm/ttm_bo_api.h
index f0fbef7817c6..630ce2288de7 100644
--- a/include/drm/ttm/ttm_bo_api.h
+++ b/include/drm/ttm/ttm_bo_api.h
@@ -542,7 +542,6 @@ ssize_t ttm_bo_io(struct ttm_device *bdev, struct file *filp,
 		  size_t count, loff_t *f_pos, bool write);
 
 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
-- 
2.17.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel

  parent reply	other threads:[~2020-10-02  8:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-02  8:47 [PATCH 1/4] drm/ttm: device naming cleanup Christian König
2020-10-02  8:47 ` [PATCH 2/4] drm/ttm: rename and move ttm_bo_evict_mm as well Christian König
2020-10-02  9:07   ` Daniel Vetter
2020-10-02  9:16     ` Daniel Vetter
2020-10-02  9:47       ` Christian König
2020-10-02 10:00         ` Daniel Vetter
2020-10-02  8:47 ` [PATCH 3/4] drm/ttm: drop glob parameter from ttm_bo_swapout Christian König
2020-10-02  8:47 ` Christian König [this message]
2020-10-02  9:17   ` [PATCH 4/4] drm/vmwgfx: move ttm_bo_swapout_all into vmwgfx Daniel Vetter
2020-10-06  0:15 ` [PATCH 1/4] drm/ttm: device naming cleanup Dave Airlie
2020-10-06  9:24   ` Daniel Vetter
2020-10-07 11:32     ` Christian König
2020-10-07  8:28   ` Christian König

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201002084707.2203-4-christian.koenig@amd.com \
    --to=ckoenig.leichtzumerken@gmail.com \
    --cc=airlied@gmail.com \
    --cc=daniel@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=ray.huang@amd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.