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: Wed, 11 Jan 2017 10:53:23 +0800 [thread overview]
Message-ID: <1484103205-5789-2-git-send-email-Monk.Liu@amd.com> (raw)
In-Reply-To: <1484103205-5789-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 | 8 ++++++++
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 3 +++
2 files changed, 11 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h
index 0d821d9..b65bedc 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h
@@ -28,11 +28,19 @@
#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;
};
+#define AMDGPU_CSA_SIZE (8 * 1024)
+#define AMDGPU_CSA_VADDR (AMDGPU_VA_RESERVED_SIZE - AMDGPU_CSA_SIZE)
+
#define amdgpu_sriov_enabled(adev) \
((adev)->virt.caps & AMDGPU_SRIOV_CAPS_ENABLE_IOV)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
index 42a629b..42f1ec1 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h
@@ -111,6 +111,9 @@ struct amdgpu_vm {
/* client id */
u64 client_id;
+ /* each VM will map on CSA */
+ struct ttm_validate_buffer csa_tv;
+ struct amdgpu_bo_va *csa_bo_va;
};
struct amdgpu_vm_id {
--
2.7.4
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
next prev parent reply other threads:[~2017-01-11 2:53 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
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 ` Monk Liu [this message]
2017-01-11 2:53 ` [PATCH 2/3] drm/amdgpu:add new file for SRIOV Monk Liu
2017-01-11 2:53 ` [PATCH 3/3] drm/amdgpu:invoke CSA functions Monk Liu
-- strict thread matches above, loose matches on Subject: below --
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
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 ` [PATCH 1/3] drm/amdgpu:new field members for SRIOV Monk Liu
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=1484103205-5789-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox