dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Huang Rui <ray.huang@amd.com>
To: dri-devel@lists.freedesktop.org, amd-gfx@lists.freedesktop.org
Cc: "Huang Rui" <ray.huang@amd.com>,
	"Christian König" <christian.koenig@amd.com>
Subject: [PATCH 1/5] drm/ttm: add helper structures for bulk moves on lru list
Date: Wed, 8 Aug 2018 17:59:33 +0800	[thread overview]
Message-ID: <1533722377-27020-2-git-send-email-ray.huang@amd.com> (raw)
In-Reply-To: <1533722377-27020-1-git-send-email-ray.huang@amd.com>

From: Christian König <christian.koenig@amd.com>

Add bulk move pos to store the pointer of first and last buffer object.
The list in between will be bulk moved on lru list.

Signed-off-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Huang Rui <ray.huang@amd.com>
---
 include/drm/ttm/ttm_bo_driver.h | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/include/drm/ttm/ttm_bo_driver.h b/include/drm/ttm/ttm_bo_driver.h
index 3234cc3..e4fee8e 100644
--- a/include/drm/ttm/ttm_bo_driver.h
+++ b/include/drm/ttm/ttm_bo_driver.h
@@ -491,6 +491,34 @@ struct ttm_bo_device {
 };
 
 /**
+ * struct ttm_lru_bulk_move_pos
+ *
+ * @first: first BO in the bulk move range
+ * @last: last BO in the bulk move range
+ *
+ * Positions for a lru bulk move.
+ */
+struct ttm_lru_bulk_move_pos {
+	struct ttm_buffer_object *first;
+	struct ttm_buffer_object *last;
+};
+
+/**
+ * struct ttm_lru_bulk_move
+ *
+ * @tt: first/last lru entry for BOs in the TT domain
+ * @vram: first/last lru entry for BOs in the VRAM domain
+ * @swap: first/last lru entry for BOs on the swap list
+ *
+ * Helper structure for bulk moves on the LRU list.
+ */
+struct ttm_lru_bulk_move {
+	struct ttm_lru_bulk_move_pos tt[TTM_MAX_BO_PRIORITY];
+	struct ttm_lru_bulk_move_pos vram[TTM_MAX_BO_PRIORITY];
+	struct ttm_lru_bulk_move_pos swap[TTM_MAX_BO_PRIORITY];
+};
+
+/**
  * ttm_flag_masked
  *
  * @old: Pointer to the result and original value.
-- 
2.7.4

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

  reply	other threads:[~2018-08-08  9:59 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-08  9:59 [PATCH 0/5] drm/ttm,amdgpu: Introduce LRU bulk move functionality Huang Rui
2018-08-08  9:59 ` Huang Rui [this message]
     [not found] ` <1533722377-27020-1-git-send-email-ray.huang-5C7GfCeVMHo@public.gmane.org>
2018-08-08  9:59   ` [PATCH 2/5] drm/ttm: revise ttm_bo_move_to_lru_tail to support bulk moves Huang Rui
2018-08-08  9:59   ` [PATCH 3/5] drm/ttm: add bulk move function on LRU Huang Rui
2018-08-08  9:59   ` [PATCH 4/5] drm/amdgpu: use bulk moves for efficient VM LRU handling Huang Rui
     [not found]     ` <1533722377-27020-5-git-send-email-ray.huang-5C7GfCeVMHo@public.gmane.org>
2018-08-08 10:47       ` Christian König
2018-08-09  6:18         ` Huang Rui
2018-08-09  7:18           ` Christian König
     [not found]             ` <fa9f6c9e-6ec5-0d54-8c86-5e4271efab51-5C7GfCeVMHo@public.gmane.org>
2018-08-09 12:25               ` Huang Rui
2018-08-09 12:27                 ` Christian König
     [not found]                   ` <fd0fe9b8-2216-2d47-7a7a-a9bbdd0c5c53-5C7GfCeVMHo@public.gmane.org>
2018-08-10  9:03                     ` Huang Rui
2018-08-08  9:59 ` [PATCH 5/5] drm/amdgpu: move PD/PT bos on LRU again Huang Rui

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=1533722377-27020-2-git-send-email-ray.huang@amd.com \
    --to=ray.huang@amd.com \
    --cc=amd-gfx@lists.freedesktop.org \
    --cc=christian.koenig@amd.com \
    --cc=dri-devel@lists.freedesktop.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox