dri-devel.lists.freedesktop.org archive mirror
 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 v2 1/5] drm/ttm: add helper structures for bulk moves on lru list
Date: Fri, 10 Aug 2018 19:55:55 +0800	[thread overview]
Message-ID: <1533902159-14232-2-git-send-email-ray.huang@amd.com> (raw)
In-Reply-To: <1533902159-14232-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-10 11:55 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-10 11:55 [PATCH v2 0/5] drm/ttm,amdgpu: Introduce LRU bulk move functionality Huang Rui
2018-08-10 11:55 ` Huang Rui [this message]
2018-08-10 11:55 ` [PATCH v2 2/5] drm/ttm: revise ttm_bo_move_to_lru_tail to support bulk moves Huang Rui
     [not found] ` <1533902159-14232-1-git-send-email-ray.huang-5C7GfCeVMHo@public.gmane.org>
2018-08-10 11:55   ` [PATCH v2 3/5] drm/ttm: add bulk move function on LRU Huang Rui
2018-08-10 11:55   ` [PATCH v2 4/5] drm/amdgpu: use bulk moves for efficient VM LRU handling (v2) Huang Rui
     [not found]     ` <1533902159-14232-5-git-send-email-ray.huang-5C7GfCeVMHo@public.gmane.org>
2018-08-10 14:18       ` Christian König
     [not found]         ` <1ebf27de-2230-827a-e96c-4ba0dcce14ed-5C7GfCeVMHo@public.gmane.org>
2018-08-11  4:41           ` Huang Rui
2018-08-10 11:55   ` [PATCH v2 5/5] drm/amdgpu: move PD/PT bos on LRU again Huang Rui
2018-08-12 21:12   ` [PATCH v2 0/5] drm/ttm, amdgpu: Introduce LRU bulk move functionality Mike Lothian
     [not found]     ` <CAHbf0-F-0y-nss2Dd8SGBLhbiO49H4EA9wEgFBTL0ZjgnmvjOQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2018-08-13  6:52       ` 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=1533902159-14232-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;
as well as URLs for NNTP newsgroup(s).