All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dave Airlie <airlied@gmail.com>
To: dri-devel@lists.freedesktop.org
Cc: christian.koenig@amd.com, rscheidegger.oss@gmail.com
Subject: [PATCH 5/5] drm/ttm: make move callback compulstory
Date: Tue,  6 Oct 2020 10:06:44 +1000	[thread overview]
Message-ID: <20201006000644.1005758-6-airlied@gmail.com> (raw)
In-Reply-To: <20201006000644.1005758-1-airlied@gmail.com>

From: Dave Airlie <airlied@redhat.com>

All drivers should have a move callback now so make it compulsory.

Reviewed-by: Ben Skeggs <bskeggs@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
---
 drivers/gpu/drm/ttm/ttm_bo.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index e11e8eaa6602..88d215de9ae1 100644
--- a/drivers/gpu/drm/ttm/ttm_bo.c
+++ b/drivers/gpu/drm/ttm/ttm_bo.c
@@ -270,18 +270,7 @@ static int ttm_bo_handle_move_mem(struct ttm_buffer_object *bo,
 	if (bdev->driver->move_notify)
 		bdev->driver->move_notify(bo, evict, mem);
 
-	if (old_man->use_tt && new_man->use_tt) {
-		if (bo->mem.mem_type == TTM_PL_SYSTEM) {
-			ttm_bo_assign_mem(bo, mem);
-			ret = 0;
-		} else
-			ret = ttm_bo_move_ttm(bo, ctx, mem);
-	} else if (bdev->driver->move) {
-		ret = bdev->driver->move(bo, evict, ctx, mem);
-	} else {
-		ret = ttm_bo_move_memcpy(bo, ctx, mem);
-	}
-
+	ret = bdev->driver->move(bo, evict, ctx, mem);
 	if (ret) {
 		if (bdev->driver->move_notify) {
 			swap(*mem, bo->mem);
-- 
2.27.0

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

  parent reply	other threads:[~2020-10-06  0:07 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-06  0:06 [PATCH 0/5] ttm make move callback compulsory Dave Airlie
2020-10-06  0:06 ` [PATCH 1/5] drm/qxl: drop unused code (v2) Dave Airlie
2020-10-06  0:06 ` [PATCH 2/5] drm/vmwgfx: move null mem checks outside move notifies Dave Airlie
2020-10-08  3:39   ` Zack Rusin
2020-10-06  0:06 ` [PATCH 3/5] drm/vmwgfx: add a move callback Dave Airlie
2020-10-08  3:41   ` Zack Rusin
2020-10-08  4:02     ` Dave Airlie
2020-10-08 15:35   ` Roland Scheidegger
2020-10-06  0:06 ` [PATCH 4/5] drm/vram_helper: implement a ttm " Dave Airlie
2020-10-06  0:06 ` Dave Airlie [this message]
2020-10-06 10:29 ` [PATCH 0/5] ttm make move callback compulsory 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=20201006000644.1005758-6-airlied@gmail.com \
    --to=airlied@gmail.com \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=rscheidegger.oss@gmail.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.