All of lore.kernel.org
 help / color / mirror / Atom feed
From: Monk Liu <Monk.Liu-5C7GfCeVMHo@public.gmane.org>
To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW@public.gmane.org
Cc: Monk Liu <Monk.Liu-5C7GfCeVMHo@public.gmane.org>
Subject: [PATCH 1/3] drm/amdgpu:new field members for SRIOV
Date: Tue, 10 Jan 2017 18:33:40 +0800	[thread overview]
Message-ID: <1484044422-2898-2-git-send-email-Monk.Liu@amd.com> (raw)
In-Reply-To: <1484044422-2898-1-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>

and implement CSA functions in this file

Change-Id: Ife0eff7b13b8b5946f005a39f6ecb8db1cb72c38
Signed-off-by: Monk Liu <Monk.Liu@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 14 ++++++++++++++
 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h   |  2 ++
 2 files changed, 16 insertions(+)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h
index 0d821d9..cc36d28 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h
@@ -28,9 +28,23 @@
 #define AMDGPU_SRIOV_CAPS_ENABLE_IOV   (1 << 1) /* sr-iov is enabled on this GPU */
 #define AMDGPU_SRIOV_CAPS_IS_VF        (1 << 2) /* this GPU is a virtual function */
 #define AMDGPU_PASSTHROUGH_MODE        (1 << 3) /* thw whole GPU is pass through for VM */
+
 /* GPU virtualization */
 struct amdgpu_virt {
 	uint32_t caps;
+	uint32_t csa_size;
+	struct amdgpu_bo *csa_obj;
+	uint64_t csa_vmid0_addr;
+	uint64_t gds_vmid0_addr;
+};
+
+struct amdgpu_vm_virt {
+	/* each VM will map on CSA */
+	struct ttm_validate_buffer csa_tv;
+	struct amdgpu_bo_va *csa_bo_va;
+	/* virtual MC address of CSA & GDS for each VM */
+	uint64_t vm_csa_addr;
+	uint64_t vm_gds_addr;
 };
 
 #define amdgpu_sriov_enabled(adev) \
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
index 42a629b..27cbcbc 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
@@ -29,6 +29,7 @@
 #include "gpu_scheduler.h"
 #include "amdgpu_sync.h"
 #include "amdgpu_ring.h"
+#include "amdgpu_virt.h"
 
 struct amdgpu_bo_va;
 struct amdgpu_job;
@@ -111,6 +112,7 @@ struct amdgpu_vm {
 
 	/* client id */
 	u64                     client_id;
+	struct amdgpu_vm_virt	vm_virt;
 };
 
 struct amdgpu_vm_id {
-- 
2.7.4

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

  parent reply	other threads:[~2017-01-10 10:33 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-10 10:33 [PATCH 0/3] static CSA patches Monk Liu
     [not found] ` <1484044422-2898-1-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-01-10 10:33   ` Monk Liu [this message]
2017-01-10 10:33   ` [PATCH 2/3] drm/amdgpu:add new file for SRIOV Monk Liu
2017-01-10 10:33   ` [PATCH 3/3] drm/amdgpu:invoke CSA functions Monk Liu
2017-01-11  2:53 [PATCH 0/3] CSA patches Monk Liu
     [not found] ` <1484103205-5789-1-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-01-11  2:53   ` [PATCH 1/3] drm/amdgpu:new field members for SRIOV Monk Liu
2017-01-11 10:43 [PATCH 0/3] CSA patch v3 Monk Liu
     [not found] ` <1484131406-19893-1-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-01-11 10:43   ` [PATCH 1/3] drm/amdgpu:new field members for SRIOV Monk Liu
     [not found]     ` <1484131406-19893-2-git-send-email-Monk.Liu-5C7GfCeVMHo@public.gmane.org>
2017-01-11 12:46       ` Christian König
     [not found]         ` <1560cfc2-f700-fedd-c557-0b121c2f3cca-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-01-11 14:49           ` Liu, Monk
     [not found]             ` <BY2PR1201MB11106625F28ACE98D9AF99E984660-O28G1zQ8oGliQkyLPkmea2rFom/aUZj6nBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2017-01-11 15:46               ` 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=1484044422-2898-2-git-send-email-Monk.Liu@amd.com \
    --to=monk.liu-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.