All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 01/11] drm/amdgpu: reserve the first 2x512 of GART
@ 2017-07-03  9:44 Christian König
       [not found] ` <1499075076-1851-1-git-send-email-deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
  0 siblings, 1 reply; 30+ messages in thread
From: Christian König @ 2017-07-03  9:44 UTC (permalink / raw)
  To: amd-gfx-PD4FTy7X32lNgt0PjOBp9y5qC8QIuHrW

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

We want to use them as remap address space.

Signed-off-by: Christian König <christian.koenig@amd.com>
---
 drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c | 5 ++++-
 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h     | 3 +++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c
index 1ef6255..f46a97d 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_gtt_mgr.c
@@ -43,12 +43,15 @@ static int amdgpu_gtt_mgr_init(struct ttm_mem_type_manager *man,
 			       unsigned long p_size)
 {
 	struct amdgpu_gtt_mgr *mgr;
+	uint64_t start, size;
 
 	mgr = kzalloc(sizeof(*mgr), GFP_KERNEL);
 	if (!mgr)
 		return -ENOMEM;
 
-	drm_mm_init(&mgr->mm, 0, p_size);
+	start = AMDGPU_GTT_MAX_TRANSFER_SIZE * AMDGPU_GTT_NUM_TRANSFER_WINDOWS;
+	size = p_size - start;
+	drm_mm_init(&mgr->mm, start, size);
 	spin_lock_init(&mgr->lock);
 	mgr->available = p_size;
 	man->priv = mgr;
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h
index 776a20a..c8059f0 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.h
@@ -34,6 +34,9 @@
 #define AMDGPU_PL_FLAG_GWS		(TTM_PL_FLAG_PRIV << 1)
 #define AMDGPU_PL_FLAG_OA		(TTM_PL_FLAG_PRIV << 2)
 
+#define AMDGPU_GTT_MAX_TRANSFER_SIZE	512
+#define AMDGPU_GTT_NUM_TRANSFER_WINDOWS	2
+
 struct amdgpu_mman {
 	struct ttm_bo_global_ref        bo_global_ref;
 	struct drm_global_reference	mem_global_ref;
-- 
2.7.4

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

^ permalink raw reply related	[flat|nested] 30+ messages in thread

end of thread, other threads:[~2017-07-06 16:28 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-03  9:44 [PATCH 01/11] drm/amdgpu: reserve the first 2x512 of GART Christian König
     [not found] ` <1499075076-1851-1-git-send-email-deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-07-03  9:44   ` [PATCH 02/11] drm/amdgpu: add amdgpu_gart_map function v2 Christian König
     [not found]     ` <1499075076-1851-2-git-send-email-deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-07-06 16:16       ` Alex Deucher
2017-07-03  9:44   ` [PATCH 03/11] drm/amdgpu: use the GTT windows for BO moves v2 Christian König
     [not found]     ` <1499075076-1851-3-git-send-email-deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-07-06 16:17       ` Alex Deucher
2017-07-03  9:44   ` [PATCH 04/11] drm/amdgpu: stop mapping BOs to GTT Christian König
     [not found]     ` <1499075076-1851-4-git-send-email-deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-07-06 16:18       ` Alex Deucher
2017-07-03  9:44   ` [PATCH 05/11] drm/amdgpu: remove maximum BO size limitation v2 Christian König
     [not found]     ` <1499075076-1851-5-git-send-email-deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-07-06 16:18       ` Alex Deucher
2017-07-03  9:44   ` [PATCH 06/11] drm/amdgpu: use TTM values instead of MC values for the info queries Christian König
     [not found]     ` <1499075076-1851-6-git-send-email-deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-07-06 16:19       ` Alex Deucher
2017-07-03  9:44   ` [PATCH 07/11] drm/amdgpu: rename GART to SYSVM Christian König
     [not found]     ` <1499075076-1851-7-git-send-email-deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-07-04  3:13       ` Zhou, David(ChunMing)
     [not found]         ` <MWHPR1201MB0206D4883B42434777D43C12B4D70-3iK1xFAIwjrUF/YbdlDdgWrFom/aUZj6nBOFsp37pqbUKgpGm//BTAC/G2K4zDHf@public.gmane.org>
2017-07-04  7:43           ` Christian König
     [not found]             ` <b838bbac-38df-5ee4-5447-9edba988ea8a-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-07-04  7:59               ` zhoucm1
2017-07-04  8:09       ` Huang Rui
2017-07-04  8:46         ` Christian König
2017-07-04 21:11       ` Felix Kuehling
     [not found]         ` <61109920-9d05-cb27-67b3-51a1b46b15bc-5C7GfCeVMHo@public.gmane.org>
2017-07-05  0:57           ` Michel Dänzer
     [not found]             ` <06b47744-60a4-f79e-e120-60d7bcff8526-otUistvHUpPR7s880joybQ@public.gmane.org>
2017-07-05  7:22               ` Christian König
2017-07-06 16:22           ` Alex Deucher
2017-07-03  9:44   ` [PATCH 08/11] drm/amdgpu: move SYSVM struct and function into amdgpu_sysvm.h Christian König
     [not found]     ` <1499075076-1851-8-git-send-email-deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-07-06 16:24       ` Alex Deucher
2017-07-03  9:44   ` [PATCH 09/11] drm/amdgpu: move amdgpu_sysvm_location into amdgpu_sysvm.c as well Christian König
     [not found]     ` <1499075076-1851-9-git-send-email-deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-07-06 16:25       ` Alex Deucher
2017-07-03  9:44   ` [PATCH 10/11] drm/amdgpu: setup GTT size directly from module parameter Christian König
     [not found]     ` <1499075076-1851-10-git-send-email-deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-07-06 16:26       ` Alex Deucher
2017-07-03  9:44   ` [PATCH 11/11] drm/amdgpu: add sysvm_size Christian König
     [not found]     ` <1499075076-1851-11-git-send-email-deathsimple-ANTagKRnAhcb1SvskN2V4Q@public.gmane.org>
2017-07-06 16:28       ` Alex Deucher
2017-07-06 16:15   ` [PATCH 01/11] drm/amdgpu: reserve the first 2x512 of GART Alex Deucher

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.