[PATCH 3/4] drm/ttm: add input parameter force_alloc for ttm_bo_evict_mm

2018-02-08 Thread Roger He
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/

[PATCH 4/4] drm/ttm: check if the mem free space is under lower limit

2018-02-08 Thread Roger He
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

[PATCH 1/4] drm/ttm: use bit flag to replace allow_reserved_eviction in ttm_operation_ctx

2018-02-08 Thread Roger He
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

[PATCH 5/5] drm/ttm: add input parameter allow_allo_anyway for ttm_bo_evict_mm

2018-02-06 Thread Roger He
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.

[PATCH 4/5] drm/ttm: add bit flag TTM_OPT_FLAG_ALLOW_ALLOC_ANYWAY

2018-02-06 Thread Roger He
, 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

[PATCH 3/5] drm/ttm: use bit flag to replace allow_reserved_eviction in ttm_operation_ctx

2018-02-06 Thread Roger He
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

[PATCH 1/5] drm/ttm: check if the free swap space is under limit 256MB

2018-02-06 Thread Roger He
> 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:

[PATCH 2/5] drm/ttm: keep original behavior except with flag no_retry

2018-02-06 Thread Roger He
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

[PATCH 0/5] prevent OOM triggered by TTM

2018-02-06 Thread Roger He
(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

[PATCH 6/7] drm/ttm: add ttm_bo_evict_swapout_allowable to check bo is allowable to evict or swapout

2017-12-20 Thread Roger He
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

[PATCH 7/7] drm/ttm: enable swapout of per VM BOs during allocation and allows reaping of deleted BOs

2017-12-20 Thread Roger He
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

[PATCH 5/7] drm/ttm: use an operation ctx for ttm_tt_bind

2017-12-20 Thread Roger He
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

[PATCH 4/7] drm/ttm: use an operation ctx for ttm_tt_populate in ttm_bo_driver

2017-12-20 Thread Roger He
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

[PATCH 3/7] drm/ttm: use an operation ctx for ttm_mem_global_alloc_page

2017-12-20 Thread Roger He
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

[PATCH 1/7] drm/ttm: call ttm_bo_swapout directly when ttm shrink

2017-12-20 Thread Roger He
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

[PATCH 2/7] drm/ttm: use an operation ctx for ttm_mem_global_alloc

2017-12-20 Thread Roger He
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

[PATCH 1/2] drm/amd/amdgpu: set allow_reserved_eviction and resv when bo allocation and cs

2017-12-14 Thread Roger He
Change-Id: I0c6571c2a64e6c5bdad80ccbcccb40eba1c20b4e Signed-off-by: Roger He <hongbo...@amd.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 6 +- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 7 ++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/d

[PATCH] drm/ttm: enable eviction for Per-VM-BO

2017-12-14 Thread Roger He
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

[PATCH] drm/ttm: init locked again to prevent incorrect unlock

2017-12-13 Thread Roger He
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

[PATCH 3/3] drm/ttm: enable eviction for Per-VM-BO

2017-12-12 Thread Roger He
Change-Id: I0c6ece0decd18d30ccc94e5c7ca106d351941c62 Signed-off-by: Roger He <hongbo...@amd.com> --- drivers/gpu/drm/ttm/ttm_bo.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 098b22e..e

[PATCH 2/3] drm/amd/amdgpu: init allow_reserved_eviction and resv when create a new bo

2017-12-12 Thread Roger He
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/

[PATCH 1/3] drm/ttm: add allow_reserved_eviction and resv into ttm_operation_ctx

2017-12-12 Thread Roger He
allow_reserved_eviction: Allow eviction of reserved BOs resv: Reservation object to allow reserved evictions with Change-Id: I01ea482e8c7470014196eb218e2ff8913306eef0 Signed-off-by: Roger He <hongbo...@amd.com> --- include/drm/ttm/ttm_bo_api.h | 4 1 file changed, 4 insertions(+)

[PATCH 6/6] drm/ttm: remove parameter reservation since it is moved into ttm context

2017-12-12 Thread Roger He
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

[PATCH 5/6] drm/ttm: enable eviction for Per-VM-BO

2017-12-12 Thread Roger He
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

[PATCH 4/6] drm/ttm: init locked again to prevent incorrect unlock

2017-12-12 Thread Roger He
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

[PATCH 3/6] drm/ttm: use an ttm operation ctx for ttm_bo_move_xxx

2017-12-12 Thread Roger He
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

[PATCH 1/6] drm/ttm: add on_alloc_stage and reservation into ttm_operation_ctx

2017-12-12 Thread Roger He
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

[PATCH 2/6] drm/ttm: when create a new ttm bo init on_alloc_stage and resv for ttm_operation_ctx

2017-12-12 Thread Roger He
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/

[PATCH] drm/amd/amdgpu: set gtt size according to system memory size only

2017-11-29 Thread Roger He
Change-Id: Ib634375b90d875fe04a890fc82fb1e3b7112676a Signed-off-by: Roger He <hongbo...@amd.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/

[PATCH] drm/amd/amdgpu: set gtt size according to system memory size only

2017-11-28 Thread Roger He
Change-Id: Ib634375b90d875fe04a890fc82fb1e3b7112676a Signed-off-by: Roger He <hongbo...@amd.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 16 +++- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/

[PATCH 1/3] drm/ttm: add set_pages_wb for handling page order more than zero

2017-11-22 Thread Roger He
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

[PATCH 2/3] drm/ttm: add page order support in ttm_pages_put

2017-11-22 Thread Roger He
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

[PATCH 3/3] drm/ttm: roundup the shrink request to prevent skip huge pool

2017-11-22 Thread Roger He
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

[PATCH 5/5] drm/ttm: delete set_pages_array_wb since no one use it anymore

2017-11-22 Thread Roger He
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

[PATCH 4/5] drm/ttm: roundup the shrink request to prevent skip huge pool

2017-11-22 Thread Roger He
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

[PATCH 3/5] drm/ttm: add page order support in ttm_pages_put

2017-11-22 Thread Roger He
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

[PATCH 2/5] drm/ttm: add set_pages_wb for handling page order more than zero

2017-11-22 Thread Roger He
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

[PATCH 1/5] drm/ttm: add page order in page pool

2017-11-22 Thread Roger He
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

[PATCH 5/5] drm/ttm: delete set_pages_array_wb since no one use it anymore

2017-11-22 Thread Roger He
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

[PATCH 4/5] drm/ttm: free one in huge pool even shrink request less than one element

2017-11-22 Thread Roger He
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

[PATCH 3/5] drm/ttm: add page order support in ttm_pages_put

2017-11-22 Thread Roger He
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

[PATCH 2/5] drm/ttm: add set_pages_wb for handling page order more than zero

2017-11-22 Thread Roger He
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

[PATCH 1/5] drm/ttm: add page order in page pool

2017-11-22 Thread Roger He
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

[PATCH 4/4] drm/ttm: free one in huge pool even shrink request less than one element

2017-11-21 Thread Roger He
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

[PATCH 1/4] drm/ttm: add page order in page pool

2017-11-21 Thread Roger He
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

[PATCH 4/4] drm/ttm: free one in huge pool even shrink request less than one element

2017-11-21 Thread Roger He
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

[PATCH 3/4] drm/ttm: add page order support in ttm_pages_put

2017-11-21 Thread Roger He
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

[PATCH 1/4] drm/ttm: add page order in page pool

2017-11-21 Thread Roger He
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

[PATCH] drm/amd/amdgpu: fix over-bound accessing in amdgpu_cs_wait_any_fence

2017-11-16 Thread Roger He
a1d8a0 Change-Id: I60d90d13dda69cd8aa6396f0246379f8390e3fb1 Signed-off-by: Roger He <hongbo...@amd.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgp

[PATCH] drm/amd/amdgpu: fix over-bound accessing in amdgpu_cs_wait_any_fence

2017-11-16 Thread Roger He
a1d8a0 Change-Id: I60d90d13dda69cd8aa6396f0246379f8390e3fb1 Signed-off-by: Roger He <hongbo...@amd.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgp

[PATCH] drm/amd/amdgpu: not allow gtt size exceed 75%*system memory size

2017-11-12 Thread Roger He
keep consistency with threshold of swapout Change-Id: I5b14d18ed7a9f79810cc50c023ac9e240bddf101 Signed-off-by: Roger He <hongbo...@amd.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/

[PATCH] drm/amd/amdgpu: if visible VRAM allocation fail, fall back to invisible try again

2017-11-10 Thread Roger He
Change-Id: Ib30efa5f007fce12a85a66722a8c9f76496f2dec Signed-off-by: Roger He <hongbo...@amd.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c index f

[PATCH] drm/amd/amdgpu: not allow gtt size exceed system memory size

2017-11-10 Thread Roger He
since sometimes VRAM size is bigger than system memory Change-Id: I5b14d18ed7a9f79810cc50c023ac9e240bddf101 Signed-off-by: Roger He <hongbo...@amd.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/d

[PATCH 1/2] drm/amd/amdgpu: fix evicted VRAM bo adjudgement condition

2017-11-02 Thread Roger He
Change-Id: Iac13b13fa136d0ce4fc2a40d010f07aa5d11e3f4 Signed-off-by: Roger He <hongbo...@amd.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 5 + 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu

[PATCH] drm/amd/amdgpu: cover fragment size between 4 and 9 when not aligned

2017-08-29 Thread Roger He
this can get performance improvement for some cases Change-Id: Ibb58bb3099f7e8c4b5da90da73a03544cdb2bcb7 Signed-off-by: Roger He <hongbo...@amd.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 98 +++--- 1 file changed, 79 insertions(+), 19 deletions(-) diff

[PATCH] drm/amd/amdgpu: fix build warning

2017-08-25 Thread Roger He
Change-Id: I335123d3f77b11adc65b29463e12f825d19ca382 Signed-off-by: Roger He <hongbo...@amd.com> --- drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/mmhub_v1_0.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/

[PATCH] drm/amd/amdgpu: fix BANK_SELECT on Vega10

2017-08-24 Thread Roger He
BANK_SELECT should always be FRAGMENT_SIZE + 3 due to 8-entry (2^3) per cache line in L2 TLB for Vega10. Change-Id: I8cfcff197e2c571c1a547aaed959e492b4a6fe0e Signed-off-by: Roger He <hongbo...@amd.com> --- drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 3 +-- drivers/gpu/drm/amd/amdgpu/mmhub_

[PATCH 2/2] drm/amd/amdgpu: expose fragment size as module parameter

2017-08-15 Thread Roger He
Change-Id: I70e4ea94b8520e19cfee5ba6c9a0ecf1ee3f5f1a Signed-off-by: Roger He <hongbo...@amd.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c| 4 drivers/gpu/drm/amd/

[PATCH 2/2] drm/amd/amdgpu: expose fragment size as module parameter

2017-08-15 Thread Roger He
Change-Id: I70e4ea94b8520e19cfee5ba6c9a0ecf1ee3f5f1a Signed-off-by: Roger He <hongbo...@amd.com> --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c| 4 drivers/gpu/drm/amd/

[PATCH] drm/amdgpu: extend lock range for race condition when gpu reset

2017-05-05 Thread Roger . He
to cover below case: 1. A task gart bind/unbind but not add to adev->gtt_list yet 2. at this time gpu reset, gtt only recover those gtt in adev->gtt_list Change-Id: Ifb4360e3b68624f2be67fa82100623cf4c451873 Signed-off-by: Roger.He --- drivers/gpu/drm/amd/amdgpu/amdgpu.h

[PATCH] drm/amdgpu: validate shadow before restoring from it

2017-04-24 Thread Roger . He
Change-Id: Id925f4e241c4192127880d2017fbf2979aa09fc7 Signed-off-by: Roger.He --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 33 ++ 1 file changed, 33 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

[PATCH 3/3] drm/amdgpu: fix gpu reset issue

2017-04-21 Thread Roger . He
Change-Id: Ib77d33a09f348ebf2e3a9d7861411f4b951ebf7c Signed-off-by: Roger.He --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 6 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 16 +++- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c| 4

[PATCH 1/3] drm/amdgpu: fix indent

2017-04-21 Thread Roger . He
Change-Id: I3a81680648fbaca74662c85709c864fa3a4a75bd Signed-off-by: Roger.He --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 34 +++--- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

[PATCH 2/3] drm/amdgpu: validate bo before restoring from shadow

2017-04-21 Thread Roger . He
Change-Id: Id925f4e241c4192127880d2017fbf2979aa09fc7 Signed-off-by: Roger.He --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 46 ++ 1 file changed, 46 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

[PATCH 1/2] drm/amd/amdgpu: fix performance drop when VRAM pressure

2017-03-27 Thread Roger . He
When VRAM pressue and trigger huge evictions there is performance drop, this patch fix it. Change-Id: Idcd2db65be69d62bcbd7dfaa3bcf9bc964d6d122 Signed-off-by: Roger.He Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 4

[PATCH 2/2] drm/amd/amdgpu: decrease ttm bo priority number

2017-03-27 Thread Roger . He
decrease and also reserve priority number for KFD using Change-Id: I9e36d292c920c034ddca53d0ec282c17b7a3cf16 Signed-off-by: Roger.He Reviewed-by: Christian König --- include/drm/ttm/ttm_bo_driver.h | 2 +- 1 file changed, 1 insertion(+), 1

[PATCH] drm/amd/amdgpu: decrease ttm bo priority to fix performance drop when VRAM pressure

2017-03-27 Thread Roger . He
1. When VRAM pressue and trigger huge evictions there is performance drop, this patch fix it. 2. Also reserve priority for KFD using Change-Id: Idcd2db65be69d62bcbd7dfaa3bcf9bc964d6d122 Signed-off-by: Roger.He --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 4 +---

[PATCH] drm/amd/amdgpu: fix performance drop

2016-12-27 Thread Roger . He
From: "Hongbo.He" rollback to ttm default callback since OCL perf benchmark huge performance drop Change-Id: If4cfc5a52872a7e00a7cbcad6efa46c57ee533de Signed-off-by: Roger.He --- drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 5 ++--- 1 file changed, 2