Re: [PATCH] drm/amdgpu/powerplay: Fix missing break in switch statement

2019-03-03 Thread Huang Rui
; Fixes: 34a564eaf528 ("drm/amd/powerplay: implement fw image related smum > interface for Polaris.") > Cc: sta...@vger.kernel.org > Signed-off-by: Gustavo A. R. Silva Reviewed-by: Huang Rui > --- > drivers/gpu/drm/amd/powerplay/smumgr/polaris10_smumgr.c | 1 + >

Re: [PATCH 3/3] drm/radeon: Replace TTM initialization/release with ttm_global

2018-10-18 Thread Huang Rui
On Fri, Oct 19, 2018 at 12:27:52AM +0800, Thomas Zimmermann wrote: > Unified initialization and release of the global TTM state is provided > by struct ttm_global and its interfaces. > > Signed-off-by: Thomas Zimmermann Reviewed-by: Huang Rui > --- > drivers/gpu/drm/radeon

Re: [PATCH 2/3] drm/amdgpu: Replace TTM initialization/release with ttm_global

2018-10-18 Thread Huang Rui
On Fri, Oct 19, 2018 at 12:27:51AM +0800, Thomas Zimmermann wrote: > Unified initialization and relesae of the global TTM state is provided > by struct ttm_global and its interfaces. > > Signed-off-by: Thomas Zimmermann Reviewed-by: Huang Rui > --- > drivers/gpu/drm/amd/a

Re: [PATCH 1/3] drm/ttm: Provide struct ttm_global for referencing TTM global state

2018-10-18 Thread Huang Rui
On Fri, Oct 19, 2018 at 12:27:50AM +0800, Thomas Zimmermann wrote: > The new struct ttm_global provides drivers with TTM's global memory and > BO in a unified way. Initialization and release is handled internally. > > The functionality provided by struct ttm_global is currently re-implemented >

Re: [PATCH][drm-next] drm/amdgpu/powerplay: fix missing break in switch statements

2018-10-09 Thread Huang Rui
Missing break in switch") > > Fixes: 18aafc59b106 ("drm/amd/powerplay: implement fw related smu interface > for iceland.") > Signed-off-by: Colin Ian King Acked-by: Huang Rui > --- > drivers/gpu/drm/amd/powerplay/smumgr/ci_smumgr.c | 2 ++ > drivers/gpu/drm/

Re: [PATCH] list: introduce list_bulk_move_tail helper

2018-09-17 Thread Huang Rui
but better placed in the common list headers. > > Signed-off-by: Christian König > --- For TTM change, patch is Reviewed-by: Huang Rui For new list_bulk_move_tail helper in hinclude/linux/list.h, may we have your comments from LKML? Thanks, Ray > drivers/gpu/drm/ttm/ttm_bo.c | 25 +-

Re: [PATCH 1/2] list: introduce list_bulk_move_tail helper

2018-09-14 Thread Huang Rui
Bulk move helper is useful for TTM driver to improve the LRU moving efficiency. Please go on with my RB. Series are Reviewed-and-Tested-by: Huang Rui > --- > include/linux/list.h | 23 +++ > 1 file changed, 23 insertions(+) > > diff --git a/include/linux/list

Re: [PATCH 1/2] drm/ttm: set ttm_buffer_object pointer as null after it's freed

2018-09-11 Thread Huang Rui
gt; staging tree to work properly...). > > Just add a printk to ttm_bo_bulk_move_helper to print pos->first and > pos->last. > > And another one to amdgpu_bo_destroy to printk the value of tbo. > Hi Tom, Could you help to add below traces to check when the bo is freed.

Re: [PATCH 1/2] drm/ttm: set ttm_buffer_object pointer as null after it's freed

2018-09-10 Thread Huang Rui
On Mon, Sep 10, 2018 at 05:25:48PM +0800, Koenig, Christian wrote: > Am 10.09.2018 um 11:23 schrieb Huang Rui: > > On Mon, Sep 10, 2018 at 11:00:04AM +0200, Christian König wrote: > >> Hi Ray, > >> > >> well those patches doesn't make sense, the pointe

Re: [PATCH 1/2] drm/ttm: set ttm_buffer_object pointer as null after it's freed

2018-09-10 Thread Huang Rui
On Mon, Sep 10, 2018 at 05:25:48PM +0800, Koenig, Christian wrote: > Am 10.09.2018 um 11:23 schrieb Huang Rui: > > On Mon, Sep 10, 2018 at 11:00:04AM +0200, Christian König wrote: > >> Hi Ray, > >> > >> well those patches doesn't make sense, the pointe

Re: [PATCH 1/2] drm/ttm: set ttm_buffer_object pointer as null after it's freed

2018-09-10 Thread Huang Rui
gt; Christian. > > Am 10.09.2018 um 10:57 schrieb Huang Rui: > >It avoids to be refered again after freed. > > > >Signed-off-by: Huang Rui > >Cc: Christian König > >Cc: Tom StDenis > >--- > > drivers/gpu/drm/ttm/ttm_bo.c | 1 + > > 1 file c

[PATCH 2/2] drm/amdgpu: set tbo pointer as null after amdgpu bo is freed

2018-09-10 Thread Huang Rui
The tbo pointer will still have value even the amdgpu bo is freed. It doesn't make sense that it still points a freed memory. It could be refered mistakenly, so set it as null. Signed-off-by: Huang Rui Cc: Christian K??nig Cc: Tom StDenis --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 1

[PATCH 1/2] drm/ttm: set ttm_buffer_object pointer as null after it's freed

2018-09-10 Thread Huang Rui
It avoids to be refered again after freed. Signed-off-by: Huang Rui Cc: Christian K??nig Cc: Tom StDenis --- 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 138c989..d3ef5f8 100644 --- a/drivers

[PATCH v6 4/5] drm/amdgpu: use bulk moves for efficient VM LRU handling (v6)

2018-08-22 Thread Huang Rui
Signed-off-by: Christian König Signed-off-by: Huang Rui Tested-by: Mike Lothian Tested-by: Dieter Nützel Acked-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 3 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 64 +++--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 11

Re: [PATCH v5 4/5] drm/amdgpu: use bulk moves for efficient VM LRU handling (v5)

2018-08-22 Thread Huang Rui
On Wed, Aug 22, 2018 at 04:45:27PM +0800, Zhang, Jerry (Junwei) wrote: > On 08/22/2018 04:38 PM, Huang Rui wrote: > >On Wed, Aug 22, 2018 at 04:33:30PM +0800, Huang Rui wrote: > >>On Wed, Aug 22, 2018 at 04:07:20PM +0800, Zhang, Jerry wrote: > >>>On 08/22/2018 03:5

Re: [PATCH v5 0/5] drm/ttm,amdgpu: Introduce LRU bulk move functionality

2018-08-22 Thread Huang Rui
k we can commit it. > > Thanks for taking care of this, > Christian. OK. Thanks to your time. Thanks, Ray > > Am 22.08.2018 um 09:52 schrieb Huang Rui: > > The idea and proposal is originally from Christian, and I continue to work > > to > > deliver it. > >

Re: [PATCH v5 4/5] drm/amdgpu: use bulk moves for efficient VM LRU handling (v5)

2018-08-22 Thread Huang Rui
On Wed, Aug 22, 2018 at 04:33:30PM +0800, Huang Rui wrote: > On Wed, Aug 22, 2018 at 04:07:20PM +0800, Zhang, Jerry wrote: > > On 08/22/2018 03:52 PM, Huang Rui wrote: > > > I continue to work for bulk moving that based on the proposal by > > > Christian. > >

Re: [PATCH v5 4/5] drm/amdgpu: use bulk moves for efficient VM LRU handling (v5)

2018-08-22 Thread Huang Rui
On Wed, Aug 22, 2018 at 04:07:20PM +0800, Zhang, Jerry wrote: > On 08/22/2018 03:52 PM, Huang Rui wrote: > > I continue to work for bulk moving that based on the proposal by Christian. > > > > Background: > > amdgpu driver will move all PD/PT and PerVM BOs into id

[PATCH v5 3/5] drm/ttm: add bulk move function on LRU

2018-08-22 Thread Huang Rui
This function allow us to bulk move a group of BOs to the tail of their LRU. The positions of group of BOs are stored on the (first, last) bulk_move_pos structure. Signed-off-by: Christian König Signed-off-by: Huang Rui Tested-by: Mike Lothian Tested-by: Dieter Nützel Acked-by: Chunming Zhou

[PATCH v5 4/5] drm/amdgpu: use bulk moves for efficient VM LRU handling (v5)

2018-08-22 Thread Huang Rui
o_lru_tail after command submission, at that time, all bo will be back on idle list. v5: remove amdgpu_vm_move_to_lru_tail_by_list(), use bulk_moveable instread of validated, and move ttm_bo_bulk_move_lru_tail() also into amdgpu_vm_move_to_lru_tail(). Signed-off-by: Christian König Signed-off-by:

[PATCH v5 5/5] drm/amdgpu: move PD/PT bos on LRU again

2018-08-22 Thread Huang Rui
The new bulk moving functionality is ready, the overhead of moving PD/PT bos to LRU is fixed. So move them on LRU again. Signed-off-by: Huang Rui Tested-by: Mike Lothian Tested-by: Dieter Nützel Acked-by: Chunming Zhou Reviewed-by: Junwei Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2

[PATCH v5 2/5] drm/ttm: revise ttm_bo_move_to_lru_tail to support bulk moves

2018-08-22 Thread Huang Rui
From: Christian König When move a BO to the end of LRU, it need remember the BO positions. Make sure all moved bo in between "first" and "last". And they will be bulk moving together. Signed-off-by: Christian König Signed-off-by: Huang Rui Tested-by: Mike Lothian Test

[PATCH v5 1/5] drm/ttm: add helper structures for bulk moves on lru list

2018-08-22 Thread Huang Rui
From: Christian König Add bulk move pos to store the pointer of first and last buffer object. The list in between will be bulk moved on lru list. Signed-off-by: Christian König Signed-off-by: Huang Rui Tested-by: Mike Lothian Tested-by: Dieter Nützel Acked-by: Chunming Zhou Reviewed

[PATCH v5 0/5] drm/ttm,amdgpu: Introduce LRU bulk move functionality

2018-08-22 Thread Huang Rui
_bo_bulk_move_lru_tail() also into amdgpu_vm_move_to_lru_tail(). Thanks, Ray Christian König (2): drm/ttm: add helper structures for bulk moves on lru list drm/ttm: revise ttm_bo_move_to_lru_tail to support bulk moves Huang Rui (3): drm/ttm: add bulk move function on LRU drm/

Re: [PATCH v4 4/5] drm/amdgpu: use bulk moves for efficient VM LRU handling (v4)

2018-08-22 Thread Huang Rui
On Wed, Aug 22, 2018 at 11:31:02AM +0800, Huang Rui wrote: > On Tue, Aug 21, 2018 at 03:54:28PM +0200, Christian König wrote: > > Am 21.08.2018 um 15:43 schrieb Huang Rui: > > >On Mon, Aug 20, 2018 at 09:17:12PM +0800, Christian König wrote: > > >>Am 20.08.2

Re: [PATCH v4 4/5] drm/amdgpu: use bulk moves for efficient VM LRU handling (v4)

2018-08-21 Thread Huang Rui
On Tue, Aug 21, 2018 at 03:54:28PM +0200, Christian König wrote: > Am 21.08.2018 um 15:43 schrieb Huang Rui: > >On Mon, Aug 20, 2018 at 09:17:12PM +0800, Christian König wrote: > >>Am 20.08.2018 um 08:05 schrieb Huang Rui: > >>>On Fri, Aug 17, 2018 at 06:38:16PM

Re: [PATCH v4 4/5] drm/amdgpu: use bulk moves for efficient VM LRU handling (v4)

2018-08-21 Thread Huang Rui
On Mon, Aug 20, 2018 at 09:17:12PM +0800, Christian König wrote: > Am 20.08.2018 um 08:05 schrieb Huang Rui: > > On Fri, Aug 17, 2018 at 06:38:16PM +0800, Koenig, Christian wrote: > >> Am 17.08.2018 um 12:08 schrieb Huang Rui: > >>> I continue to work for bulk mov

Re: [PATCH v4 4/5] drm/amdgpu: use bulk moves for efficient VM LRU handling (v4)

2018-08-20 Thread Huang Rui
On Fri, Aug 17, 2018 at 06:38:16PM +0800, Koenig, Christian wrote: > Am 17.08.2018 um 12:08 schrieb Huang Rui: > > I continue to work for bulk moving that based on the proposal by Christian. > > > > Background: > > amdgpu driver will move all PD/PT and PerVM BOs into id

[PATCH v4 5/5] drm/amdgpu: move PD/PT bos on LRU again

2018-08-17 Thread Huang Rui
The new bulk moving functionality is ready, the overhead of moving PD/PT bos to LRU is fixed. So move them on LRU again. Signed-off-by: Huang Rui Tested-by: Mike Lothian Tested-by: Dieter N??tzel Acked-by: Chunming Zhou Reviewed-by: Junwei Zhang --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c

[PATCH v4 3/5] drm/ttm: add bulk move function on LRU

2018-08-17 Thread Huang Rui
This function allow us to bulk move a group of BOs to the tail of their LRU. The positions of group of BOs are stored on the (first, last) bulk_move_pos structure. Signed-off-by: Christian König Signed-off-by: Huang Rui Tested-by: Mike Lothian Tested-by: Dieter Nützel Acked-by: Chunming Zhou

[PATCH v4 4/5] drm/amdgpu: use bulk moves for efficient VM LRU handling (v4)

2018-08-17 Thread Huang Rui
o_lru_tail after command submission, at that time, all bo will be back on idle list. Signed-off-by: Christian König Signed-off-by: Huang Rui Tested-by: Mike Lothian Tested-by: Dieter Nützel Acked-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 11 ++ drivers/gpu/drm/

[PATCH v4 2/5] drm/ttm: revise ttm_bo_move_to_lru_tail to support bulk moves

2018-08-17 Thread Huang Rui
From: Christian König When move a BO to the end of LRU, it need remember the BO positions. Make sure all moved bo in between "first" and "last". And they will be bulk moving together. Signed-off-by: Christian König Signed-off-by: Huang Rui Tested-by: Mike Lothian Test

[PATCH v4 0/5] drm/ttm,amdgpu: Introduce LRU bulk move functionality

2018-08-17 Thread Huang Rui
lru_tail to support bulk moves Huang Rui (3): drm/ttm: add bulk move function on LRU drm/amdgpu: use bulk moves for efficient VM LRU handling (v4) drm/amdgpu: move PD/PT bos on LRU again drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 11 + drivers/gpu/drm/amd/amdg

[PATCH v4 1/5] drm/ttm: add helper structures for bulk moves on lru list

2018-08-17 Thread Huang Rui
From: Christian König Add bulk move pos to store the pointer of first and last buffer object. The list in between will be bulk moved on lru list. Signed-off-by: Christian König Signed-off-by: Huang Rui Tested-by: Mike Lothian Tested-by: Dieter Nützel Acked-by: Chunming Zhou Reviewed

Re: [PATCH v3 0/5] drm/ttm,amdgpu: Introduce LRU bulk move functionality

2018-08-17 Thread Huang Rui
On Thu, Aug 16, 2018 at 08:41:44AM +0800, Dieter Nützel wrote: > For the series > > Tested-by: Dieter Nützel > > on RX580, > amd-staging-drm-next > #5024f8dfe478 > Thank you so much, will add tested-by in next version. Thanks, Ray > Dieter > > Am 13

[PATCH] drm/ttm: remove dead codes

2018-08-15 Thread Huang Rui
These codes are not used. Signed-off-by: Huang Rui --- drivers/gpu/drm/ttm/ttm_bo_util.c| 5 + drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 8 +--- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm

Re: [PATCH 2/4] drm/scheduler: move entity handling into separate file

2018-08-14 Thread Huang Rui
On Tue, Aug 14, 2018 at 10:12:24AM +0200, Christian König wrote: > This is complex enough on it's own. Move it into a separate C file. > > Signed-off-by: Christian König For series: Reviewed-by: Huang Rui > --- > drivers/gpu/drm/scheduler/Makefile| 2 +- > drivers

Re: [PATCH 1/4] drm/scheduler: trivial error handling fix

2018-08-14 Thread Huang Rui
On Tue, Aug 14, 2018 at 10:12:23AM +0200, Christian König wrote: > Return -ENOMEM when allocating the rq_list fails. > > Signed-off-by: Christian König Reviewed-by: Huang Rui > --- > drivers/gpu/drm/scheduler/gpu_scheduler.c | 3 +++ > 1 file changed, 3 insertions(

Re: [PATCH v3 4/5] drm/amdgpu: use bulk moves for efficient VM LRU handling (v3)

2018-08-14 Thread Huang Rui
On Tue, Aug 14, 2018 at 09:35:50AM +0200, Christian König wrote: > Am 14.08.2018 um 09:24 schrieb Huang Rui: > >On Tue, Aug 14, 2018 at 02:45:22PM +0800, Koenig, Christian wrote: > >>Am 14.08.2018 um 05:05 schrieb Huang Rui: > >>>On Tue, Aug 14, 2018 at 10:26:

Re: [PATCH v3 4/5] drm/amdgpu: use bulk moves for efficient VM LRU handling (v3)

2018-08-14 Thread Huang Rui
On Tue, Aug 14, 2018 at 02:45:22PM +0800, Koenig, Christian wrote: > Am 14.08.2018 um 05:05 schrieb Huang Rui: > > On Tue, Aug 14, 2018 at 10:26:43AM +0800, Zhang, Jerry wrote: > >> On 08/13/2018 05:58 PM, Huang Rui wrote: > >>> I continue to work for bulk mov

Re: [PATCH v3 4/5] drm/amdgpu: use bulk moves for efficient VM LRU handling (v3)

2018-08-13 Thread Huang Rui
On Tue, Aug 14, 2018 at 10:26:43AM +0800, Zhang, Jerry wrote: > On 08/13/2018 05:58 PM, Huang Rui wrote: > > I continue to work for bulk moving that based on the proposal by Christian. > > > > Background: > > amdgpu driver will move all PD/PT and PerVM BOs into id

Re: [PATCH v3 1/5] drm/ttm: add helper structures for bulk moves on lru list

2018-08-13 Thread Huang Rui
On Tue, Aug 14, 2018 at 10:22:34AM +0800, Zhang, Jerry (Junwei) wrote: > On 08/13/2018 06:16 PM, Christian König wrote: > >Am 13.08.2018 um 11:58 schrieb Huang Rui: > >>From: Christian König > >> > >>Add bulk move pos to store the pointer of first and last bu

Re: [PATCH v3 1/5] drm/ttm: add helper structures for bulk moves on lru list

2018-08-13 Thread Huang Rui
On Tue, Aug 14, 2018 at 10:02:00AM +0800, Zhou, David(ChunMing) wrote: > > > On 2018年08月13日 18:16, Christian König wrote: > > Am 13.08.2018 um 11:58 schrieb Huang Rui: > >> From: Christian König > >> > >> Add bulk move pos to store the pointer of f

[PATCH v3 4/5] drm/amdgpu: use bulk moves for efficient VM LRU handling (v3)

2018-08-13 Thread Huang Rui
ig Signed-off-by: Huang Rui Tested-by: Mike Lothian --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 73 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 4 ++ 2 files changed, 61 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drive

[PATCH v3 3/5] drm/ttm: add bulk move function on LRU

2018-08-13 Thread Huang Rui
This function allow us to bulk move a group of BOs to the tail of their LRU. The positions of group of BOs are stored on the (first, last) bulk_move_pos structure. Signed-off-by: Christian König Signed-off-by: Huang Rui Tested-by: Mike Lothian --- drivers/gpu/drm/ttm/ttm_bo.c | 52

[PATCH v3 5/5] drm/amdgpu: move PD/PT bos on LRU again

2018-08-13 Thread Huang Rui
The new bulk moving functionality is ready, the overhead of moving PD/PT bos to LRU is fixed. So move them on LRU again. Signed-off-by: Huang Rui Tested-by: Mike Lothian --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu

[PATCH v3 2/5] drm/ttm: revise ttm_bo_move_to_lru_tail to support bulk moves

2018-08-13 Thread Huang Rui
From: Christian König When move a BO to the end of LRU, it need remember the BO positions. Make sure all moved bo in between "first" and "last". And they will be bulk moving together. Signed-off-by: Christian König Signed-off-by: Huang Rui Tested-by: Mike Lothian ---

[PATCH v3 0/5] drm/ttm,amdgpu: Introduce LRU bulk move functionality

2018-08-13 Thread Huang Rui
stead of the one with save entry. Thanks, Rui Christian König (2): drm/ttm: add helper structures for bulk moves on lru list drm/ttm: revise ttm_bo_move_to_lru_tail to support bulk moves Huang Rui (3): drm/ttm: add bulk move function on LRU drm/amdgpu: use bulk moves for efficient VM LRU han

[PATCH v3 1/5] drm/ttm: add helper structures for bulk moves on lru list

2018-08-13 Thread Huang Rui
From: Christian König Add bulk move pos to store the pointer of first and last buffer object. The list in between will be bulk moved on lru list. Signed-off-by: Christian König Signed-off-by: Huang Rui Tested-by: Mike Lothian --- include/drm/ttm/ttm_bo_driver.h | 28

Re: [PATCH v2 0/5] drm/ttm, amdgpu: Introduce LRU bulk move functionality

2018-08-13 Thread Huang Rui
y > Cheers > > Mike > > On Fri, 10 Aug 2018 at 12:56 Huang Rui wrote: > > > The idea and proposal is originally from Christian, and I continue to work > > to > > deliver it. > > > > Background: > > amdgpu driver will move all PD/PT and PerVM BOs into

Re: [PATCH v2 4/5] drm/amdgpu: use bulk moves for efficient VM LRU handling (v2)

2018-08-10 Thread Huang Rui
On Fri, Aug 10, 2018 at 10:18:24PM +0800, Koenig, Christian wrote: > Am 10.08.2018 um 13:55 schrieb Huang Rui: > > I continue to work for bulk moving that based on the proposal by Christian. > > > > Background: > > amdgpu driver will move all PD/PT and PerVM BOs into id

[PATCH v2 5/5] drm/amdgpu: move PD/PT bos on LRU again

2018-08-10 Thread Huang Rui
The new bulk moving functionality is ready, the overhead of moving PD/PT bos to LRU is fixed. So move them on LRU again. Signed-off-by: Huang Rui --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c

[PATCH v2 4/5] drm/amdgpu: use bulk moves for efficient VM LRU handling (v2)

2018-08-10 Thread Huang Rui
he visible improvement than original, and even better than original with workaround. v2: move all BOs include idle, relocated, and moved list to the end of LRU and put them together. Signed-off-by: Christian König Signed-off-by: Huang Rui --- drivers/gpu/drm/amd/amdgpu/amdgpu

[PATCH v2 3/5] drm/ttm: add bulk move function on LRU

2018-08-10 Thread Huang Rui
This function allow us to bulk move a group of BOs to the tail of their LRU. The positions of group of BOs are stored on the (first, last) bulk_move_pos structure. Signed-off-by: Christian König Signed-off-by: Huang Rui --- drivers/gpu/drm/ttm/ttm_bo.c | 52

[PATCH v2 2/5] drm/ttm: revise ttm_bo_move_to_lru_tail to support bulk moves

2018-08-10 Thread Huang Rui
From: Christian König When move a BO to the end of LRU, it need remember the BO positions. Make sure all moved bo in between "first" and "last". And they will be bulk moving together. Signed-off-by: Christian König Signed-off-by: Huang Rui --- drivers/gpu/drm/amd/amd

[PATCH v2 1/5] drm/ttm: add helper structures for bulk moves on lru list

2018-08-10 Thread Huang Rui
From: Christian König Add bulk move pos to store the pointer of first and last buffer object. The list in between will be bulk moved on lru list. Signed-off-by: Christian König Signed-off-by: Huang Rui --- include/drm/ttm/ttm_bo_driver.h | 28 1 file changed, 28

[PATCH v2 0/5] drm/ttm,amdgpu: Introduce LRU bulk move functionality

2018-08-10 Thread Huang Rui
ist drm/ttm: revise ttm_bo_move_to_lru_tail to support bulk moves Huang Rui (3): drm/ttm: add bulk move function on LRU drm/amdgpu: use bulk moves for efficient VM LRU handling (v2) drm/amdgpu: move PD/PT bos on LRU again drivers/gpu/drm/amd/amdgpu/amd

Re: [PATCH 4/5] drm/amdgpu: use bulk moves for efficient VM LRU handling

2018-08-10 Thread Huang Rui
On Thu, Aug 09, 2018 at 08:27:10PM +0800, Koenig, Christian wrote: > Am 09.08.2018 um 14:25 schrieb Huang Rui: > > On Thu, Aug 09, 2018 at 03:18:55PM +0800, Koenig, Christian wrote: > >> Am 09.08.2018 um 08:18 schrieb Huang Rui: > >>> On Wed, Aug 08, 2018 at 06:47:49P

Re: [PATCH 2/6] dma-buf: add reservation object shared fence accessor

2018-08-10 Thread Huang Rui
On Thu, Aug 09, 2018 at 01:37:09PM +0200, Christian König wrote: > Add a helper to access the shared fences in an reservation object. > > Signed-off-by: Christian König Reviewed-by: Huang Rui > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 7 ++- > drivers/

Re: [PATCH 4/5] drm/amdgpu: use bulk moves for efficient VM LRU handling

2018-08-09 Thread Huang Rui
On Thu, Aug 09, 2018 at 03:18:55PM +0800, Koenig, Christian wrote: > Am 09.08.2018 um 08:18 schrieb Huang Rui: > > On Wed, Aug 08, 2018 at 06:47:49PM +0800, Christian König wrote: > >> Am 08.08.2018 um 11:59 schrieb Huang Rui: > >>> I continue to work for bulk mov

Re: [PATCH 4/5] drm/amdgpu: use bulk moves for efficient VM LRU handling

2018-08-09 Thread Huang Rui
On Wed, Aug 08, 2018 at 06:47:49PM +0800, Christian König wrote: > Am 08.08.2018 um 11:59 schrieb Huang Rui: > > I continue to work for bulk moving that based on the proposal by Christian. > > > > Background: > > amdgpu driver will move all PD/PT and PerVM BOs into id

[PATCH 5/5] drm/amdgpu: move PD/PT bos on LRU again

2018-08-08 Thread Huang Rui
The new bulk moving functionality is ready, the overhead of moving PD/PT bos to LRU is fixed. So move them on LRU again. Signed-off-by: Huang Rui --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c

[PATCH 4/5] drm/amdgpu: use bulk moves for efficient VM LRU handling

2018-08-08 Thread Huang Rui
he visible improvement than original, and even better than original with workaround. Signed-off-by: Christian König Signed-off-by: Huang Rui --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 22 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 4 2 files changed, 18 insertions(+), 8

[PATCH 3/5] drm/ttm: add bulk move function on LRU

2018-08-08 Thread Huang Rui
This function allow us to bulk move a group of BOs to the tail of their LRU. The positions of group of BOs are stored on the (first, last) bulk_move_pos structure. Signed-off-by: Christian König Signed-off-by: Huang Rui --- drivers/gpu/drm/ttm/ttm_bo.c | 52

[PATCH 2/5] drm/ttm: revise ttm_bo_move_to_lru_tail to support bulk moves

2018-08-08 Thread Huang Rui
From: Christian König When move a BO to the end of LRU, it need remember the BO positions. Make sure all moved bo in between "first" and "last". And they will be bulk moving together. Signed-off-by: Christian König Signed-off-by: Huang Rui --- drivers/gpu/drm/amd/amd

[PATCH 1/5] drm/ttm: add helper structures for bulk moves on lru list

2018-08-08 Thread Huang Rui
From: Christian König Add bulk move pos to store the pointer of first and last buffer object. The list in between will be bulk moved on lru list. Signed-off-by: Christian König Signed-off-by: Huang Rui --- include/drm/ttm/ttm_bo_driver.h | 28 1 file changed, 28

[PATCH 0/5] drm/ttm,amdgpu: Introduce LRU bulk move functionality

2018-08-08 Thread Huang Rui
We can see the visible improvement than original, and even better than original with workaround. Thanks, Rui Christian König (2): drm/ttm: add helper structures for bulk moves on lru list drm/ttm: revise ttm_bo_move_to_lru_tail to support bulk moves Huang Rui (3): drm/ttm: add bulk move funct

Re: [PATCH] drm/amdgpu: Transfer fences to dmabuf importer

2018-08-07 Thread Huang Rui
On Tue, Aug 07, 2018 at 11:45:00AM +0100, Chris Wilson wrote: > amdgpu only uses shared-fences internally, but dmabuf importers rely on > implicit write hazard tracking via the reservation_object.fence_excl. > For example, the importer use the write hazard for timing a page flip to > only occur

Re: [PATCH] drm/amd/amdkfd/kfd_int_process_v9: Use true and false for boolean values

2018-08-06 Thread Huang Rui
On Sat, Aug 04, 2018 at 07:30:45PM -0500, Gustavo A. R. Silva wrote: > Return statements in functions returning bool should use true or false > instead of an integer value. > > This code was detected with the help of Coccinelle. > > Signed-off-by: Gustavo A. R. Silva Revi

Re: [PATCH] drm/amdkfd: Use true and false for boolean values

2018-08-06 Thread Huang Rui
Looks good for me. Reviewed-by: Huang Rui Add Felix for his awareness. > --- > drivers/gpu/drm/amd/amdkfd/cik_event_interrupt.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/amd/amdkfd/cik_event_interrupt.c > b/drivers/gpu/drm/amd/

Re: [PATCH 2/4] drm/scheduler: add counter for total jobs in scheduler

2018-08-01 Thread Huang Rui
:-) Thanks, Ray > Christian. > > Am 01.08.2018 um 15:15 schrieb Huang Rui: > > On Wed, Aug 01, 2018 at 01:50:00PM +0530, Nayan Deshmukh wrote: > > > > This should need a commmit message. > > > > Thanks, > > Ray > > > >> Signed-off-by: N

Re: [PATCH 2/4] drm/scheduler: add counter for total jobs in scheduler

2018-08-01 Thread Huang Rui
On Wed, Aug 01, 2018 at 01:50:00PM +0530, Nayan Deshmukh wrote: This should need a commmit message. Thanks, Ray > Signed-off-by: Nayan Deshmukh > --- > drivers/gpu/drm/scheduler/gpu_scheduler.c | 3 +++ > include/drm/gpu_scheduler.h | 2 ++ > 2 files changed, 5 insertions(+) >

Re: [PATCH 1/2] drm/scheduler: Add job dependency trace.

2018-08-01 Thread Huang Rui
On Tue, Jul 31, 2018 at 10:56:53AM -0400, Andrey Grodzovsky wrote: > During debug sessions I encountered a need to trace > back a job dependecy a few steps back to the first failing > job. This trace helpped me a lot. > > Signed-off-by: Andrey Grodzovsky Series are Reviewe

[PATCH 3/3] drm/ttm: clean up non-x86 definitions on ttm_tt

2018-07-31 Thread Huang Rui
All non-x86 definitions are moved to ttm_set_memory header, so remove it from ttm_tt.c. Signed-off-by: Huang Rui --- drivers/gpu/drm/ttm/ttm_tt.c | 25 +++-- 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_tt.c b/drivers/gpu/drm/ttm

[PATCH 2/3] drm/ttm: Add ttm_set_pages_wc and ttm_set_pages_uc helper

2018-07-31 Thread Huang Rui
These two helpers will be used on set page caching. Signed-off-by: Huang Rui --- include/drm/ttm/ttm_set_memory.h | 22 ++ 1 file changed, 22 insertions(+) diff --git a/include/drm/ttm/ttm_set_memory.h b/include/drm/ttm/ttm_set_memory.h index a70723c..7c492b4 100644

[PATCH 1/3] drm/ttm: fix missed conversion of set_pages_array_uc

2018-07-31 Thread Huang Rui
eported-by: kbuild test robot Signed-off-by: Huang Rui --- drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c b/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c index 8304917..507be7a 100644 --- a/d

Re: [radeon-alex:amd-staging-drm-next 690/717] drivers/gpu/drm/ttm/ttm_page_alloc_dma.c:272:7: error: implicit declaration of function 'set_pages_array_uc'; did you mean 'ttm_set_pages_array_uc'?

2018-07-31 Thread Huang Rui
b75f Konrad Rzeszutek Wilk 2011-11-03 275 > pool->dev_name, cpages); > 2334b75f Konrad Rzeszutek Wilk 2011-11-03 276} > 2334b75f Konrad Rzeszutek Wilk 2011-11-03 277if (pool->type & IS_WC) > { > b6fde54f Huang Rui

Re: [PATCH 0/2] drm/amdgpu: Clean-up TTM BO ref-counting interface

2018-07-31 Thread Huang Rui
On Tue, Jul 31, 2018 at 09:12:34AM +0200, Thomas Zimmermann wrote: > This patchset replaces ttm_bo_{reference/unref} with ttm_bo_{get,put}, > which follow Linux' conventions for ref-counting functions. > > v2: > * use prefix drm/amdgpu I guess Chritian will help to fix the subject prefix, you

Re: [PATCH] drm/scheduler: only kill entity if last user is killed

2018-07-29 Thread Huang Rui
I am not very familiar with scheduler yet. From code logic, it looks fine for me. Reviewed-by: Huang Rui > --- > drivers/gpu/drm/scheduler/gpu_scheduler.c | 6 +- > include/drm/gpu_scheduler.h | 1 + > 2 files changed, 6 insertions(+), 1 deletion(-) > > diff

Re: [PATCH v2 0/4] drm/ttm: move non-x86 definitions to the common header

2018-07-26 Thread Huang Rui
On Thu, Jul 26, 2018 at 08:12:05PM +0800, Koenig, Christian wrote: > Am 26.07.2018 um 13:59 schrieb Bas Nieuwenhuizen: > > On Thu, Jul 26, 2018 at 1:52 PM, Huang Rui wrote: > >> Hi, > >> > >> As suggested by Christian, we should move non-x86 definitio

[PATCH v2 3/4] drm/ttm: clean up non-x86 definitions on ttm_page_alloc

2018-07-26 Thread Huang Rui
All non-x86 definitions are moved to ttm_set_memory header, so remove it from ttm_page_alloc.c. Suggested-by: Christian König Signed-off-by: Huang Rui --- drivers/gpu/drm/ttm/ttm_page_alloc.c | 62 +++- 1 file changed, 5 insertions(+), 57 deletions(-) diff

[PATCH v2 2/4] drm/ttm: clean up non-x86 definitions on ttm_page_alloc_dma

2018-07-26 Thread Huang Rui
All non-x86 definitions are moved to ttm_set_memory header, so remove it from ttm_page_alloc_dma.c. Suggested-by: Christian König Signed-off-by: Huang Rui --- drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 48 +++- 1 file changed, 4 insertions(+), 44 deletions(-) diff

[PATCH v2 4/4] drm/ttm: Merge hugepage attr changes in ttm_dma_page_put. (v2)

2018-07-26 Thread Huang Rui
sec though) (v2): use set_pages_wb instead of set_memory_wb. Signed-off-by: Bas Nieuwenhuizen Signed-off-by: Huang Rui --- drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 11 --- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c b/drivers/

[PATCH v2 1/4] drm/ttm: add ttm_set_memory header (v2)

2018-07-26 Thread Huang Rui
This patch moves all non-x86 abstraction to the ttm_set_memory header. It is to make function calling more clearly. (v2): add ttm_ prefix. Suggested-by: Christian König Signed-off-by: Huang Rui --- include/drm/ttm/ttm_set_memory.h | 128 +++ 1 file changed

[PATCH v2 0/4] drm/ttm: move non-x86 definitions to the common header

2018-07-26 Thread Huang Rui
_wb instead of set_memory_wb. Thanks, Ray Bas Nieuwenhuizen (1): drm/ttm: Merge hugepage attr changes in ttm_dma_page_put. (v2) Huang Rui (3): drm/ttm: add ttm_set_memory header (v2) drm/ttm: clean up non-x86 definitions on ttm_page_alloc_dma drm/ttm: clean up non-x86 definitions on ttm_page_al

[PATCH 1/5] drm/ttm: Merge hugepage attr changes in ttm_dma_page_put.

2018-07-26 Thread Huang Rui
sec though) Signed-off-by: Bas Nieuwenhuizen Signed-off-by: Huang Rui --- drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 30 +++--- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/ttm/ttm_page_alloc_dma.c b/drivers/gpu/drm/ttm/ttm_page_alloc_dm

[PATCH 0/5] drm/ttm: move non-x86 definitions to the common header

2018-07-26 Thread Huang Rui
in ttm_dma_page_put. Huang Rui (4): drm/ttm: add ttm_set_memory header drm/ttm: clean up non-x86 definitions on ttm_page_alloc_dma drm/ttm: clean up non-x86 definitions on ttm_page_alloc drm/ttm: use set_pages_wb instead of set_memory_wb drivers/gpu/drm/ttm/ttm_page_alloc.c | 54

Re: [PATCH] drm/ttm: Merge hugepage attr changes in ttm_dma_page_put.

2018-07-26 Thread Huang Rui
On Thu, Jul 26, 2018 at 08:37:45AM +0200, Christian König wrote: > Am 25.07.2018 um 22:29 schrieb Bas Nieuwenhuizen: > >Every set_pages_array_wb call resulted in cross-core > >interrupts and TLB flushes. Merge more of them for > >less overhead. > > > >This reduces the time needed to free a 1.6 GiB

Re: [PATCH] drm/ttm: Merge hugepage attr changes in ttm_dma_page_put.

2018-07-25 Thread Huang Rui
n CTS from ~2 sec to < 0.25 sec. > (Allocation still takes more than 2 sec though) > > Signed-off-by: Bas Nieuwenhuizen Reviewed-by: Huang Rui > --- > drivers/gpu/drm/ttm/ttm_page_alloc_dma.c | 31 ++-- > 1 file changed, 24 insertions(+), 7 deletions(-

Re: [PATCH][next] drm/amd/pp: initialized result to zero before or'ing in data

2018-06-07 Thread Huang Rui
y: Colin Ian King Nice catch, we must check return values for programming didt registers all as 0. Acked-by: Huang Rui > --- > drivers/gpu/drm/amd/powerplay/hwmgr/vega10_powertune.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/p

Re: [PATCH] drm/radeon: change function signature to pass full range

2018-04-13 Thread Huang Rui
always > false due to limited range of data type [-Wtype-limits] >if (num > ATOM_MAX_HW_I2C_READ) { >^ > > Signed-off-by: Mathieu Malaterre <ma...@debian.org> Reviewed-by: Huang Rui <ray.hu...@amd.com> > --- > drivers/gpu/drm/radeon/a

Re: [PATCH V2] drm/amdgpu: limit DMA size to PAGE_SIZE for scatter-gather buffers

2018-04-11 Thread Huang Rui
On Tue, Apr 10, 2018 at 04:59:55PM -0400, Sinan Kaya wrote: > Code is expecing to observe the same number of buffers returned from > dma_map_sg() function compared to sg_alloc_table_from_pages(). This > doesn't hold true universally especially for systems with IOMMU. > > IOMMU driver tries to

Re: [PATCH] drm/amd/pp: silence a static checker warning

2018-03-25 Thread Huang Rui
st. > > Signed-off-by: Dan Carpenter <dan.carpen...@oracle.com> Reviewed-by: Huang Rui <ray.hu...@amd.com> > > diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu8_hwmgr.c > b/drivers/gpu/drm/amd/powerplay/hwmgr/smu8_hwmgr.c > index 75a465f771f0..7b26607c646a 100644 >

Re: [PATCH] drm/ttm: cleanup unuse ret value

2017-04-17 Thread Huang Rui
On Mon, Apr 17, 2017 at 11:42:18PM +0800, Alex Deucher wrote: > On Mon, Apr 17, 2017 at 3:38 AM, Huang Rui <ray.hu...@amd.com> wrote: > > The ret must be 0 here, otherwise, the function will return after > init_mem_type. > > > > Signed-off-by: Huang Rui <ray.hu

[PATCH] drm/ttm: cleanup unuse ret value

2017-04-17 Thread Huang Rui
The ret must be 0 here, otherwise, the function will return after init_mem_type. Signed-off-by: Huang Rui <ray.hu...@amd.com> --- drivers/gpu/drm/ttm/ttm_bo.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 9ee4ff4..5

Re: [PATCH] drm/amdgpu: fix semicolon.cocci warnings

2017-03-31 Thread Huang Rui
On Fri, Mar 31, 2017 at 06:15:10PM +0800, kbuild test robot wrote: > drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c:133:2-3: Unneeded semicolon > > > Remove unneeded semicolon. > > Generated by: scripts/coccinelle/misc/semicolon.cocci > > CC: Huang Rui <ray.hu...@amd.com&

[PATCH] drm/amd/powerplay/smumgr: mark symbols static where possible

2016-09-19 Thread Huang Rui
Hi Baoyou, On Mon, Sep 19, 2016 at 03:28:39PM +0800, Baoyou Xie wrote: > We get a few warnings when building kernel with W=1: > drivers/gpu/drm/amd/amdgpu/../powerplay/smumgr/tonga_smumgr.c:146:5: warning: > no previous prototype for 'tonga_program_jump_on_start' [-Wmissing-prototypes] >

[PATCH v3] drm: modify drm_global_item_ref to avoid two times of writing ref->object

2016-09-08 Thread Huang Rui
On Thu, Sep 08, 2016 at 02:36:06PM +0800, Chris Wilson wrote: > On Wed, Sep 07, 2016 at 10:07:57PM -0400, Huang Rui wrote: > > In previous drm_global_item_ref, there are two times of writing > > ref->object if item->refcount is 0. So this patch does a minor update > >

[PATCH v3] drm: modify drm_global_item_ref to avoid two times of writing ref->object

2016-09-07 Thread Huang Rui
the code logic more clearly. Signed-off-by: Huang Rui --- Changes from V2 -> V3: - Use duplicate mutex release to avoid "goto" in non-error patch. - Rename error label --- drivers/gpu/drm/drm_global.c | 24 ++-- 1 file changed, 14 insertions(+), 10 deletions(

[Updated PATCH v2] drm: modify drm_global_item_ref to avoid two times of writing ref->object

2016-09-07 Thread Huang Rui
On Wed, Sep 07, 2016 at 04:02:47PM +0800, Koenig, Christian wrote: > Am 07.09.2016 um 09:54 schrieb Huang Rui: > > On Wed, Sep 07, 2016 at 09:12:29AM +0200, Christian K?nig wrote: > >> Am 07.09.2016 um 07:24 schrieb Huang Rui: snip. > >>> ++item->ref

  1   2   >