Change-Id: Ia55b206d95812c5afcfd6cec29f580758d1f50f0
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/ttm/ttm_page_alloc.c | 19 +++
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c
b/drivers/gpu/d
Change-Id: Id8bd4d1ecff9f3ab14355e2dbd1c59b9fe824e01
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/ttm/ttm_page_alloc.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c
b/drivers/gpu/drm/ttm/ttm_page_alloc.c
Change-Id: I9fa45af447c3c78d0b7b2b8958081e584c560120
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/ttm/ttm_page_alloc.c | 11 ---
1 file changed, 11 deletions(-)
diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c
b/drivers/gpu/drm/ttm/ttm_page_alloc.c
index 8
Change-Id: I9fa45af447c3c78d0b7b2b8958081e584c560120
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/ttm/ttm_page_alloc.c | 11 ---
1 file changed, 11 deletions(-)
diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c
b/drivers/gpu/drm/ttm/ttm_page_alloc.c
index a
e.g. shrink reqeust is less than 512, the logic will skip huge pool
Change-Id: Id8bd4d1ecff9f3ab14355e2dbd1c59b9fe824e01
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/ttm/ttm_page_alloc.c | 12 +++-
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/d
Change-Id: Id8bd4d1ecff9f3ab14355e2dbd1c59b9fe824e01
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/ttm/ttm_page_alloc.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c
b/drivers/gpu/drm/ttm/ttm_page_alloc.c
Change-Id: Ia55b206d95812c5afcfd6cec29f580758d1f50f0
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/ttm/ttm_page_alloc.c | 19 +++
1 file changed, 11 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c
b/drivers/gpu/d
Change-Id: Idf5ccb579d264b343199d8b8344bddeec2c0019f
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/ttm/ttm_page_alloc.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c
b/drivers/gpu/drm/ttm/ttm_page_alloc.c
index 2
to indicate page order for each element in the pool
Change-Id: Ic609925ca5d2a5d4ad49d6becf505388ce3624cf
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/ttm/ttm_page_alloc.c | 42 ++--
1 file changed, 31 insertions(+), 11 deletions(-)
diff
to indicate page order for each element in the pool
Change-Id: Ic609925ca5d2a5d4ad49d6becf505388ce3624cf
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/ttm/ttm_page_alloc.c | 38 +---
1 file changed, 27 insertions(+), 11 deletions(-)
diff
Change-Id: Idf5ccb579d264b343199d8b8344bddeec2c0019f
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/ttm/ttm_page_alloc.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c
b/drivers/gpu/drm/ttm/ttm_page_alloc.c
index a
Change-Id: Idf5ccb579d264b343199d8b8344bddeec2c0019f
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/ttm/ttm_page_alloc.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c
b/drivers/gpu/drm/ttm/ttm_page_alloc.c
index a
Change-Id: Ia55b206d95812c5afcfd6cec29f580758d1f50f0
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/ttm/ttm_page_alloc.c | 26 ++
1 file changed, 18 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c
b/drivers/gpu/d
e.g. shrink reqeust is less than 512, the logic will skip huge pool
Change-Id: Id8bd4d1ecff9f3ab14355e2dbd1c59b9fe824e01
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/ttm/ttm_page_alloc.c | 12 +++-
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/d
Change-Id: Icc8b5112570429f24e90d52484df2728c546f85b
Signed-off-by: Roger He <hongbo...@amd.com>
Reviewed-by: Christian König <christian.koe...@amd.com>
Cc: sta...@vger.kernel.org
---
drivers/gpu/drm/ttm/ttm_bo.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/tt
Change-Id: I0c6ece0decd18d30ccc94e5c7ca106d351941c62
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/ttm/ttm_bo.c | 11 +--
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index 098b22e..b
Change-Id: I5279b5cd3560c4082b00f822219575a5f9c3808a
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/ttm/ttm_bo.c| 2 +-
drivers/gpu/drm/ttm/ttm_memory.c| 15 +--
drivers/gpu/drm/ttm/ttm_object.c
Change-Id: I4104a12e09a374b6477a0dd5a8fce26dce27a746
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/ttm/ttm_memory.c | 15 ---
drivers/gpu/drm/ttm/ttm_page_alloc.c | 6 +-
drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 8 ++--
include/d
then remove superfluous functions
Change-Id: Iea020f0e30a239e0265e7a1500168c7d7f819bd9
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/ttm/ttm_bo.c | 21 +++-
drivers/gpu/drm/ttm/ttm_memory.c | 12 ++-
include/drm/ttm/ttm_bo_api.h | 1 +
include/d
Change-Id: I42a7df8c50e1ce3b527ee9cb78809f8e58136f07
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 +-
drivers/gpu/drm/nouveau/nouveau_bo.c| 2 +-
drivers/gpu/drm/radeon/radeon_ttm.c | 2 +-
drivers/gpu/drm/ttm/ttm_bo.c
Change-Id: I803ea52d11e5c06add0dffab836c3aecc00b56dd
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 7 ---
drivers/gpu/drm/ast/ast_ttm.c| 5 +++--
drivers/gpu/drm/cirrus/cirrus_ttm.c | 5 +++--
drivers/gpu/drm/n
Change-Id: I1e87954564f38ad298bf6e4ff88c9f26f291a62d
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/ttm/ttm_bo.c | 15 +++
drivers/gpu/drm/ttm/ttm_memory.c | 12
include/drm/ttm/ttm_bo_api.h | 3 ++-
3 files changed, 21 insertions(+), 9 del
extract this function since eviction and swapout share same logic
Change-Id: I80a475a93fceed8d66d74a1832c815a0756341ac
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/ttm/ttm_bo.c | 29 +++--
1 file changed, 19 insertions(+), 10 deletions(-)
diff
Change-Id: I0c6571c2a64e6c5bdad80ccbcccb40eba1c20b4e
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
b/drivers/gpu/drm/amd/
Change-Id: Ide96a1ccad9bb44b0bb0d80e123c2d810ba618ed
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/ttm/ttm_page_alloc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c
b/drivers/gpu/drm/ttm/ttm_page_alloc.c
Change-Id: Ia55b206d95812c5afcfd6cec29f580758d1f50f0
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/ttm/ttm_page_alloc.c | 42 +---
1 file changed, 34 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c
b/drive
to indicate page order for each element in the pool
Change-Id: Ic609925ca5d2a5d4ad49d6becf505388ce3624cf
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/ttm/ttm_page_alloc.c | 33 ++---
1 file changed, 22 insertions(+), 11 deletions(-)
diff
1. add page order into pool to support gtt huge page
2. add page order support when ttm pages put
3. update memory shrinker with order handling
Roger He (4):
drm/ttm: add page order in page pool
drm/ttm: use NUM_PAGES_TO_ALLOC always
drm/ttm: add page order support in ttm_pages_put
drm
Change-Id: Id8bd4d1ecff9f3ab14355e2dbd1c59b9fe824e01
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/ttm/ttm_page_alloc.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c
b/drivers/gpu/drm/ttm/ttm_page_alloc.c
Change-Id: Ia55b206d95812c5afcfd6cec29f580758d1f50f0
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/ttm/ttm_page_alloc.c | 42 +---
1 file changed, 34 insertions(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c
b/drive
Change-Id: Ic20c016eb3043d7cfedc2e3648790a017168da6c
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/ttm/ttm_page_alloc.c | 28 +++-
1 file changed, 19 insertions(+), 9 deletions(-)
diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc.c
b/drivers/gpu/d
to indicate page order for each element in the pool
Change-Id: Ic609925ca5d2a5d4ad49d6becf505388ce3624cf
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/ttm/ttm_page_alloc.c | 42 ++--
1 file changed, 31 insertions(+), 11 deletions(-)
diff
include ttm_bo_move_memcpy and ttm_bo_move_ttm
Change-Id: I160b2fe1da3200405810d0215c4521b5f0d3615a
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 7 +++
drivers/gpu/drm/nouveau/nouveau_bo.c| 7 +++
drivers/gpu/drm/qxl/qxl
Change-Id: I8db51d843955f5db14bb4bbff892eaedbd9f0abe
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/ttm/ttm_bo.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index 17fe8be..eb8c568 100644
--- a/drivers/gpu/d
Change-Id: I83ac6a77f24e14698aa386a497a262e24c5bbdb6
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/ttm/ttm_bo.c | 6 ++
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index 22b6ca5..f138e95
Change-Id: I491d4ceb8c98bb3d8e6e0ddef2330284ce2fe5f6
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/ttm/ttm_bo.c | 7 +++
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c
index eb8c568..22b6ca5
Change-Id: I0c6571c2a64e6c5bdad80ccbcccb40eba1c20b4e
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +-
drivers/gpu/drm/ttm/ttm_bo.c | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/
on_alloc_stage: is this operation on allocation stage
resv: reservation bo used of this operation
Change-Id: I01ea482e8c7470014196eb218e2ff8913306eef0
Signed-off-by: Roger He <hongbo...@amd.com>
---
include/drm/ttm/ttm_bo_api.h | 4
1 file changed, 4 insertions(+)
diff --git a/inclu
forward the operation context to ttm_mem_global_alloc_page as well,
and the ultimate goal is swapout enablement for per vm BOs.
Per vm BOs refer to all BOs which share same reservation object.
Change-Id: I4104a12e09a374b6477a0dd5a8fce26dce27a746
Signed-off-by: Roger He <hongbo...@amd.
forward the operation context to ttm_tt_populate as well,
and the ultimate goal is swapout enablement for per vm BOs.
Change-Id: If8dfa0f500429d1420e0da67eb6901f0bfbca57b
Reviewed-by: Christian König <christian.koe...@amd.com>
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers
extract a function as ttm_bo_evict_swapout_allowable since eviction and
swapout can share same logic
Change-Id: I80a475a93fceed8d66d74a1832c815a0756341ac
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/ttm/ttm_bo.c | 29 +++--
1 file changed, 19 inse
forward the operation context to ttm_tt_bind as well,
and the ultimate goal is swapout enablement for reserved BOs.
v2: use common term rather than amd specific
Change-Id: I42a7df8c50e1ce3b527ee9cb78809f8e58136f07
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/amd/
if the bo shares same reservation object then not lock it again
at swapout time to make it possible to swap out.
v2: refine the commmit message
Change-Id: I1e87954564f38ad298bf6e4ff88c9f26f291a62d
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/ttm/ttm_bo.c
extract a function as ttm_bo_evict_swapout_allowable since eviction and
swapout can share same logic.
v2: modify commit message and add description in the code
Change-Id: I80a475a93fceed8d66d74a1832c815a0756341ac
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/ttm/ttm_bo.
This fixes the build warning:
"ignoring return value of 'register_shrinker', declared with
attribute warn_unused_result [-Wunused-result]"
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/ttm/ttm_page_alloc.c | 21 -
drivers/gpu/drm/ttm/ttm_
when ttm_mem_global_alloc_page fails, we should call
ttm_mem_global_free_page to update memory count for
the ttm pages which already run ttm_mem_global_alloc_page
successfully
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/ttm/ttm_page_alloc.
Missed in the patche:
dc94777 drm/ttm: enable swapout for reserved BOs during allocation.
don't unreserve the BO if it is not reserved by itself.
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/ttm/ttm_bo.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff
add this for correctly updating global mem count in ttm_mem_zone.
before that when ttm_mem_global_alloc_page fails, we would update all
dma_page's global mem count in ttm_dma->pages_list. but actually here
we should not update for the last dma_page.
Signed-off-by: Roger He <hongbo...@a
if ttm_get_pages or ttm_mem_global_alloc_page fail, should not update
global memory count.
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/ttm/ttm_page_alloc.c | 6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/ttm/ttm_page_allo
add input parameter for ttm_dma_unpopulate.
when ttm_dma_pool_get_pages or ttm_mem_global_alloc_page fail, don't
call ttm_mem_global_free_page to update global memory count.
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 2 +-
drivers/gpu/drm/n
ttm module needs it to determine its internal parameter setting.
Signed-off-by: Roger He <hongbo...@amd.com>
---
include/linux/swap.h | 6 ++
mm/swapfile.c| 15 +++
2 files changed, 21 insertions(+)
diff --git a/include/linux/swap.h b/include/linux/swap.h
index c
, it will trigger OOM killer.
v2: add new page flag TTM_PAGE_FLAG_PAGEFAULT rather than using
struct ttm_operation_ctx
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/ttm/ttm_bo_vm.c | 6 --
drivers/gpu/drm/ttm/ttm_memory.c | 27 +++
drivers/g
ory which can't be flushed into disk/file. At this time, any
memory request will trigger OOM killer.
v2: always get total system swap size rather than getting it once
at module init time
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/ttm/ttm_memo
set its initial value as 1/2 * free swap cache size when module initial.
and adjust this value when allocate TTM memory
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/ttm/ttm_memory.c | 10 --
include/drm/ttm/ttm_memory.h | 2 ++
2 files changed, 10 insertions
OOM killer.
v2: fix minor typo
v3: keep original behavior except ttm page with flag NO_RETRY
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/ttm/ttm_bo_vm.c | 6 +-
drivers/gpu/drm/ttm/ttm_memory.c | 27 +++
drivers/gpu/d
ory which can't be flushed into swap space.
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/ttm/ttm_memory.c | 12
drivers/gpu/drm/ttm/ttm_tt.c | 13 +++--
include/drm/ttm/ttm_memory.h | 2 ++
3 files changed, 21 insertions(+), 6 deletions(-)
d
because this zone has only 4GB, it is easy to became bottleneck for
huge normal zone.
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 3 +++
drivers/gpu/drm/ttm/ttm_memory.c| 10 --
include/drm/ttm/ttm_memory.h| 1 +
3
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/ttm/ttm_memory.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/ttm/ttm_memory.c b/drivers/gpu/drm/ttm/ttm_memory.c
index 875e5b8..25e1ce0 100644
--- a/drivers/gpu/drm/ttm/ttm_me
if true, allocate TTM pages regardless of zone global memory
account limit. For suspend, We should avoid TTM memory allocate
failure then result in suspend failure.
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.c | 2 +-
drivers/gpu/drm/amd/
allocation.
v2: merge two memory limit(swap and system) into one
v3: keep original behavior except with ttm->page_flags
TTM_PAGE_FLAG_NO_RETRY
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/ttm/ttm_memory.c | 34
drivers/gp
, it will trigger OOM killer.
the subsequent patche will use this.
v2: keep original behavior except ttm bo with flag no_retry
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/ttm/ttm_bo_vm.c | 6 --
drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 1 -
include/drm/ttm/ttm_bo
for saving memory and more bit flag can be used in future
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 ++--
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 4 ++--
drivers/gpu/drm/ttm/ttm_bo.c | 3 ++-
include/drm/ttm/ttm_bo
, allow TTM
allocation.
v2: merge two memory limit(swap and system) into one
v3: keep original behavior except ttm_opt_ctx->flags with
TTM_OPT_FLAG_FORCE_ALLOC
v4: always set force_alloc as tx->flags & TTM_OPT_FLAG_FORCE_ALLOC
Signed-off-by: Roger He <hongbo...@amd.com>
---
Because ttm_bo_force_list_clean() is only called on two occasions:
1. By ttm_bo_evict_mm() during suspend.
2. By ttm_bo_clean_mm() when the driver unloads.
On both cases we absolutely don't want any memory allocation failure.
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/d
, allow TTM
allocation.
v2: merge two memory limit(swap and system) into one
v3: keep original behavior except ttm_opt_ctx->flags with
TTM_OPT_FLAG_FORCE_ALLOC
v4: always set force_alloc as ttm_opt_ctx->flags & TTM_OPT_FLAG_FORCE_ALLOC
Signed-off-by: Roger He <hongbo...@amd.com&
if it is true, allocate TTM pages regardless of zone global memory
account limit. For example suspend, We should avoid TTM memory
allocate failure to lead to whole process fail.
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/ttm/ttm_bo.c | 13 -
1 file chan
, it will trigger OOM killer.
v2: keep original behavior except ttm bo with flag no_retry
v3: forward the ttm_operation_ctx to ttm_mem_global_reserve
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/ttm/ttm_bo_vm.c | 6 --
drivers/gpu/drm/ttm/ttm_memory.c
, it will trigger OOM killer.
will be used later.
v2: set the FORCE_ALLOC always
v3: minor refine
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/ttm/ttm_bo_vm.c | 4 +++-
include/drm/ttm/ttm_bo_api.h| 4 +++-
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/g
if true for it, allocate TTM pages regardless of zone global memory
account limit.
that is for another special case: suspend.
doesn't care the zone global memory account limit for this case.
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_debugfs.
(by defaut), keep the original behavior
no any change.
Roger He (5):
drm/ttm: check if the free swap space is under limit 256MB
drm/ttm: keep original behavior except with flag no_retry
drm/ttm: use bit flag to replace allow_reserved_eviction in
ttm_operation_ctx
drm/ttm: add bit flag
set the no_retry flag in struct ttm_mem_global and init it
after ttm_mem_global_init
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 8 +---
drivers/gpu/drm/ttm/ttm_memory.c| 3 +++
include/drm/ttm/ttm_memory.h| 3 +++
3
> 256MB and at that time free swap
space is under 256MB but available system mem > its
lower limit, allow TTM allocation;
b. if total swap space < 256 or no swap disk at all, check
the available system mem, if it is bigger than its
threshold, allow TTM allocation.
Signed-off-by:
, it will trigger OOM killer.
v2: keep original behavior except ttm bo with flag no_retry
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/ttm/ttm_bo_vm.c | 6 --
drivers/gpu/drm/ttm/ttm_memory.c | 25 +
drivers/gpu/d
for saving memory and more bit flag can be used in future
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 ++--
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 4 ++--
drivers/gpu/drm/ttm/ttm_bo.c | 3 ++-
include/drm/ttm/ttm_bo
, allow TTM
allocation.
v2: merge two memory limit(swap and system) into one
v3: keep original behavior except ttm_opt_ctx->flags with
TTM_OPT_FLAG_FORCE_ALLOC
v4: always set force_alloc as tx->flags & TTM_OPT_FLAG_FORCE_ALLOC
v5: add an attribute for lower_mem_limit
Signed-off-by
_mem_limit as 0 to keep original behavior
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/ttm/ttm_memory.c | 92
drivers/gpu/drm/ttm/ttm_page_alloc.c | 3 ++
drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 3 ++
include/drm/
Fixes interface change done in the following commit:
eb86c98 drm/ttm: use an operation ctx for ttm_tt_populate in ttm_bo_driver
i missed this driver because it is in staging dir.
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/staging/vboxvideo/vbox_ttm.c | 5 +++--
1 file chan
age is not right
v3: use lower bits of dma_page vaddr
Signed-off-by: Roger He <hongbo...@amd.com>
---
drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 55 +---
1 file changed, 29 insertions(+), 26 deletions(-)
diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c
b/drivers/gp
78 matches
Mail list logo