All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Kuehling, Felix" <Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
To: "amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org"
	<amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org>
Cc: "Zeng, Oak" <Oak.Zeng-5C7GfCeVMHo@public.gmane.org>,
	"Koenig,
	Christian" <Christian.Koenig-5C7GfCeVMHo@public.gmane.org>
Subject: [PATCH 1/4] drm/amdgpu: Extends amdgpu vm definitions
Date: Fri, 23 Aug 2019 21:33:46 +0000	[thread overview]
Message-ID: <20190823213249.10749-2-Felix.Kuehling@amd.com> (raw)
In-Reply-To: <20190823213249.10749-1-Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>

From: Oak Zeng <Oak.Zeng@amd.com>

Add definition of all supported mtypes. The RW mtype
is recently introduced for arcturus. Also add definition
of a flag to probe and possibly invalidate remote GPU
cache, which will be used later in this series.

Change-Id: I96fc9bb4b6b1e62bdc10b600d8aaa6a802128d6d
Signed-off-by: Oak Zeng <Oak.Zeng@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 9 +++++++--
 include/uapi/drm/amdgpu_drm.h          | 4 ++++
 2 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
index 2eda3a8c330d..7a77477af6a4 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
@@ -80,8 +80,13 @@ struct amdgpu_bo_list_entry;
 #define AMDGPU_PTE_MTYPE_VG10(a)	((uint64_t)(a) << 57)
 #define AMDGPU_PTE_MTYPE_VG10_MASK	AMDGPU_PTE_MTYPE_VG10(3ULL)
 
-#define AMDGPU_MTYPE_NC 0
-#define AMDGPU_MTYPE_CC 2
+enum amdgpu_mtype {
+	AMDGPU_MTYPE_NC = 0,
+	AMDGPU_MTYPE_WC = 1,
+	AMDGPU_MTYPE_CC = 2,
+	AMDGPU_MTYPE_UC = 3,
+	AMDGPU_MTYPE_RW = 4,
+};
 
 #define AMDGPU_PTE_DEFAULT_ATC  (AMDGPU_PTE_SYSTEM      \
                                 | AMDGPU_PTE_SNOOPED    \
diff --git a/include/uapi/drm/amdgpu_drm.h b/include/uapi/drm/amdgpu_drm.h
index ca97b6802275..97e8e51f76aa 100644
--- a/include/uapi/drm/amdgpu_drm.h
+++ b/include/uapi/drm/amdgpu_drm.h
@@ -503,6 +503,10 @@ struct drm_amdgpu_gem_op {
 #define AMDGPU_VM_MTYPE_CC		(3 << 5)
 /* Use UC MTYPE instead of default MTYPE */
 #define AMDGPU_VM_MTYPE_UC		(4 << 5)
+/* Use RW MTYPE instead of default MTYPE */
+#define AMDGPU_VM_MTYPE_RW		(5 << 5)
+/* Cacheable/snoopable */
+#define AMDGPU_VM_PAGE_INVALIDATE_PROBE	(1 << 9)
 
 struct drm_amdgpu_gem_va {
 	/** GEM object handle */
-- 
2.17.1

_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

  parent reply	other threads:[~2019-08-23 21:33 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-23 21:33 [PATCH 0/4] KFD: Mapping-specific MTYPEs on Arcturus Kuehling, Felix
     [not found] ` <20190823213249.10749-1-Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
2019-08-23 21:33   ` [PATCH 2/4] drm/amdgpu: Support new arcturus mtype Kuehling, Felix
2019-08-23 21:33   ` Kuehling, Felix [this message]
     [not found]     ` <20190823213249.10749-2-Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
2019-08-24 11:12       ` [PATCH 1/4] drm/amdgpu: Extends amdgpu vm definitions Christian König
2019-08-23 21:33   ` [PATCH 3/4] drm/amdgpu: Support snooped PTE flag Kuehling, Felix
     [not found]     ` <20190823213249.10749-4-Felix.Kuehling-5C7GfCeVMHo@public.gmane.org>
2019-08-24 11:13       ` Christian König
     [not found]         ` <f09e6893-347b-4ade-76e5-ad37d8e4e782-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2019-08-24 16:24           ` Kuehling, Felix
     [not found]             ` <a7f9ad48-2e46-5415-e2a8-1738a101d716-5C7GfCeVMHo@public.gmane.org>
2019-08-24 18:59               ` Christian König
     [not found]                 ` <96b6ac1d-de87-3fdb-a531-af4b0a42f1d5-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2019-08-26 15:45                   ` Kuehling, Felix
     [not found]                     ` <4b48fc1a-6ee2-bb60-0518-ea9c6346b8d6-5C7GfCeVMHo@public.gmane.org>
2019-08-26 17:16                       ` Koenig, Christian
     [not found]                         ` <89bf5baa-4b63-e40a-7995-fa35bad988b7-5C7GfCeVMHo@public.gmane.org>
2019-08-26 18:03                           ` Kuehling, Felix
     [not found]                             ` <216f63db-78c5-1098-bea5-2f379b0bf051-5C7GfCeVMHo@public.gmane.org>
2019-08-26 18:12                               ` Koenig, Christian
     [not found]                                 ` <49ba47da-a225-5a21-9014-ccc316c55b60-5C7GfCeVMHo@public.gmane.org>
2019-08-26 22:32                                   ` Kuehling, Felix
2019-08-23 21:33   ` [PATCH 4/4] drm/amdgpu: Determing PTE flags separately for each mapping Kuehling, Felix

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=20190823213249.10749-2-Felix.Kuehling@amd.com \
    --to=felix.kuehling-5c7gfcevmho@public.gmane.org \
    --cc=Christian.Koenig-5C7GfCeVMHo@public.gmane.org \
    --cc=Oak.Zeng-5C7GfCeVMHo@public.gmane.org \
    --cc=amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.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 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.