Re: [PATCH] drm/amdgpu: Fix the dead lock issue.

2018-09-10 Thread zhoucm1
On 2018年09月11日 11:37, zhoucm1 wrote: On 2018年09月11日 11:32, Deng, Emily wrote: -Original Message- From: amd-gfx On Behalf Of zhoucm1 Sent: Tuesday, September 11, 2018 11:28 AM To: Deng, Emily ; Zhou, David(ChunMing) ; amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amdgpu:

[PATCH] drm/amdgpu: add module parameter to enable/disable bulk move

2018-09-10 Thread Huang Rui
The bulk moving mechanism still has bug on some corner cases. So disable it by default till it is fixed. We can use the module parameter to enable it for debugging. Signed-off-by: Huang Rui Cc: Christian K??nig Cc: Tom StDenis --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 +

Re: [PATCH] drm/amdgpu: Fix the dead lock issue.

2018-09-10 Thread zhoucm1
On 2018年09月11日 11:32, Deng, Emily wrote: -Original Message- From: amd-gfx On Behalf Of zhoucm1 Sent: Tuesday, September 11, 2018 11:28 AM To: Deng, Emily ; Zhou, David(ChunMing) ; amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amdgpu: Fix the dead lock issue. On 2018年09月11日

RE: [PATCH] drm/amdgpu: Fix the dead lock issue.

2018-09-10 Thread Deng, Emily
>-Original Message- >From: amd-gfx On Behalf Of >zhoucm1 >Sent: Tuesday, September 11, 2018 11:28 AM >To: Deng, Emily ; Zhou, David(ChunMing) >; amd-gfx@lists.freedesktop.org >Subject: Re: [PATCH] drm/amdgpu: Fix the dead lock issue. > > > >On 2018年09月11日 11:23, Deng, Emily wrote: >>>

Re: [PATCH] drm/amdgpu: Fix the dead lock issue.

2018-09-10 Thread zhoucm1
On 2018年09月11日 11:23, Deng, Emily wrote: -Original Message- From: Zhou, David(ChunMing) Sent: Tuesday, September 11, 2018 11:03 AM To: Deng, Emily ; amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amdgpu: Fix the dead lock issue. On 2018年09月11日 10:51, Emily Deng wrote: It

RE: [PATCH] drm/amdgpu: Fix the dead lock issue.

2018-09-10 Thread Deng, Emily
>-Original Message- >From: Zhou, David(ChunMing) >Sent: Tuesday, September 11, 2018 11:03 AM >To: Deng, Emily ; amd-gfx@lists.freedesktop.org >Subject: Re: [PATCH] drm/amdgpu: Fix the dead lock issue. > > > >On 2018年09月11日 10:51, Emily Deng wrote: >> It will ramdomly have the dead lock

Re: [PATCH] drm/amdgpu: Fix the dead lock issue.

2018-09-10 Thread zhoucm1
On 2018年09月11日 10:51, Emily Deng wrote: It will ramdomly have the dead lock issue when test TDR: 1. amdgpu_device_handle_vram_lost gets the lock shadow_list_lock 2. amdgpu_bo_create locked the bo's resv lock 3. amdgpu_bo_create_shadow is waiting for the shadow_list_lock 4.

Re: [PATCH] drm/amdgpu: Fix the dead lock issue.

2018-09-10 Thread Zhang, Jerry (Junwei)
On 09/11/2018 10:51 AM, Emily Deng wrote: It will ramdomly have the dead lock issue when test TDR: 1. amdgpu_device_handle_vram_lost gets the lock shadow_list_lock 2. amdgpu_bo_create locked the bo's resv lock 3. amdgpu_bo_create_shadow is waiting for the shadow_list_lock 4.

[PATCH] drm/amdgpu: Fix the dead lock issue.

2018-09-10 Thread Emily Deng
It will ramdomly have the dead lock issue when test TDR: 1. amdgpu_device_handle_vram_lost gets the lock shadow_list_lock 2. amdgpu_bo_create locked the bo's resv lock 3. amdgpu_bo_create_shadow is waiting for the shadow_list_lock 4. amdgpu_device_recover_vram_from_shadow is waiting for the bo's

Re: Optimize VM handling a bit more

2018-09-10 Thread Zhang, Jerry (Junwei)
Apart from Felix comments, Looks good for me, patch 2 ~ 8 are Reviewed-by: Junwei Zhang Patch 9 ~ 11 are Acked-by: Junwei Zhang On 09/10/2018 02:03 AM, Christian König wrote: Hi everyone, Especially on Vega and Raven VM handling is rather inefficient while creating PTEs because we

Re: [PATCH 04/11] drm/amdgpu: add some VM PD/PT iterators

2018-09-10 Thread Zhang, Jerry (Junwei)
On 09/10/2018 02:03 AM, Christian König wrote: Both a leaf as well as dfs iterator to walk over all the PDs/PTs. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 221 + 1 file changed, 221 insertions(+) diff --git

Re: Optimize VM handling a bit more

2018-09-10 Thread Felix Kuehling
Patches 2, 3, 5, 6, 8, 9, 11 are Reviewed-by: Felix Kuehling I replied with comments to 1, 4, 7, 10. On another thread, some of the machine learning guys found that the main overhead of our memory allocator is clearing of BOs. I'm thinking about a way to avoid that, but your patch 1 interferes

RE: [PATCH v2] drm/amdgpu: Fix the dead lock issue.

2018-09-10 Thread Deng, Emily
>-Original Message- >From: amd-gfx On Behalf Of Deng, >Emily >Sent: Monday, September 10, 2018 6:33 PM >To: Koenig, Christian ; amd- >g...@lists.freedesktop.org >Subject: RE: [PATCH v2] drm/amdgpu: Fix the dead lock issue. > >>-Original Message- >>From: Koenig, Christian >>Sent:

Re: [PATCH libdrm] tests/amdgpu: add unaligned VM test

2018-09-10 Thread Zhang, Jerry (Junwei)
On 09/10/2018 05:33 PM, Christian König wrote: Am 10.09.2018 um 04:44 schrieb Zhang, Jerry (Junwei): On 09/10/2018 02:04 AM, Christian König wrote: Make a VM mapping which is as unaligned as possible. Is it going to test unaligned address between BO allocation and BO mapping and skip huge

Re: [PATCH 04/11] drm/amdgpu: add some VM PD/PT iterators

2018-09-10 Thread Felix Kuehling
On 2018-09-09 02:03 PM, Christian König wrote: > Both a leaf as well as dfs iterator to walk over all the PDs/PTs. > > Signed-off-by: Christian König > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 221 > + > 1 file changed, 221 insertions(+) > > diff --git

Re: [PATCH 10/11] drm/amdgpu: use the maximum possible fragment size on Vega/Raven

2018-09-10 Thread Felix Kuehling
On 2018-09-09 02:03 PM, Christian König wrote: > The fragment size controls only the L1 on Vega/Raven and we now don't > have any extra overhead any more because of larger fragments. > > Signed-off-by: Christian König > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 7 ++- > 1 file changed,

Re: [PATCH 07/11] drm/amdgpu: use the DFS iterator in amdgpu_vm_invalidate_level

2018-09-10 Thread Felix Kuehling
On 2018-09-09 02:03 PM, Christian König wrote: > Less code and easier to maintain. > > Signed-off-by: Christian König > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 28 ++-- > 1 file changed, 6 insertions(+), 22 deletions(-) > > diff --git

Re: [PATCH 01/11] drm/amdgpu: try allocating VRAM as power of two

2018-09-10 Thread Felix Kuehling
This looks good. But it complicates something I've been looking at: Remembering which process drm_mm_nodes last belonged to, so that they don't need to be cleared next time they are allocated by the same process. Having most nodes the same size (vram_page_split pages) would make this very easy and

Fixing SDMA TO after GPU reset

2018-09-10 Thread Andrey Grodzovsky
Attached patch fixes SDMA TO after GPU reset, it's a regression caused by cbd5285 drm/amdgpu: move setting the GART addr into TTM. But to me it looks safer just to revert the original patch all together since we never can predict for sure if VM flush will take place and so it's safer to just

RE: [PATCH 1/2] drm/amdgpu: Moved fault hash table to amdgpu vm

2018-09-10 Thread Zeng, Oak
Hi Christian, Ok, then can I get a reviewed-by for this change? I will drop patch 2 for now, as Philip said offline that he will still need to use that kfifo. I will follow up with Philip anyway. I will re-work on the translation retry patches, after this one. Probably also follow up the idea

[PATCH libdrm] radeon, evergreen: ensure equal sizes for depth-stencil npot textures

2018-09-10 Thread Gert Wollny
From: Gert Wollny On evergreen depth-stencil textures are allocated as two objects, and when using the eg_surface_init_1d_miptrees code path the size evaluation uses the generalized surf_minify function. Here when allocating the depth texture the alignment takes the depth bpe value into account,

[PATCH v2] drm/amdgpu:Add error message when register failed to reach expected value

2018-09-10 Thread James Zhu
Signed-off-by: James Zhu Add error message when register failed to reach expected value, It will help discover potential issue. --- drivers/gpu/drm/amd/amdgpu/soc15_common.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/soc15_common.h

[PATCH] drm/amdgpu:No action needs when VCN PG state is unchanged

2018-09-10 Thread James Zhu
Signed-off-by: James Zhu When VCN PG state is unchanged, it is unnecessary to reset power gate state again. --- drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c | 13 +++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vcn_v1_0.c

[PATCH] drm/amdgpu:Add error message when register failed to reach expected value

2018-09-10 Thread James Zhu
Signed-off-by: James Zhu Add error message when register failed to reach expected value, It will help discover potential issue. --- drivers/gpu/drm/amd/amdgpu/soc15_common.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/soc15_common.h

Re: [drm:amdgpu_job_timedout [amdgpu]] *ERROR* ring gfx timeout

2018-09-10 Thread Dāvis Mosāns
pirmd., 2018. g. 10. sept., plkst. 12:04 — lietotājs Michel Dänzer () rakstīja: > > On 2018-09-08 7:24 p.m., Dāvis Mosāns wrote: > > Hello, > > > > With Radeon RX Vega 64 when launching LibreOffice (6.1.0.3) on Arch > > Linux with 4.18.5 kernel then display freezes. > > dmesg contains: > > > >

Re: [PATCH 1/2] drm/amdgpu: Moved fault hash table to amdgpu vm

2018-09-10 Thread Felix Kuehling
I'm not sure why you need to distinguish current and future state when dealing with page faults. When you get a page fault, you know that the GPU is trying to access memory right now, in the present. So you're always working with the current state. When the CPU page table changes, you get an MMU

Re: [PATCH 2/2] gpu/radeon: use HMM mirror for userptr buffer object.

2018-09-10 Thread kbuild test robot
Hi Jérôme, I love your patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v4.19-rc3 next-20180910] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux

Re: [PATCH 1/2] gpu/radeon: use HMM mirror instead of mmu_notifier

2018-09-10 Thread kbuild test robot
Hi Jérôme, I love your patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v4.19-rc3 next-20180910] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux

Re: [PATCH 2/2] gpu/radeon: use HMM mirror for userptr buffer object.

2018-09-10 Thread kbuild test robot
Hi Jérôme, I love your patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v4.19-rc3 next-20180910] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux

Re: [PATCH 1/2] gpu/radeon: use HMM mirror instead of mmu_notifier

2018-09-10 Thread kbuild test robot
Hi Jérôme, I love your patch! Yet something to improve: [auto build test ERROR on linus/master] [also build test ERROR on v4.19-rc3 next-20180910] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux

Re: [PATCH] drm/amdgpu: Init correct fb region for none XGMI configuration

2018-09-10 Thread Christian König
Am 10.09.2018 um 19:48 schrieb shaoyunl: Fix : 5c777a5 'Adjust GART and AGP location with xgmi offset' Change-Id: I2d78024fbe44a37f46a35d34c1e64dbd3937fdf1 Signed-off-by: shaoyunl Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 5 + 1 file changed, 5

[PATCH] drm/amdgpu: Init correct fb region for none XGMI configuration

2018-09-10 Thread shaoyunl
Fix : 5c777a5 'Adjust GART and AGP location with xgmi offset' Change-Id: I2d78024fbe44a37f46a35d34c1e64dbd3937fdf1 Signed-off-by: shaoyunl --- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c

Re: [PATCH] drm/amdgpu: Init correct fb region for none XGMI configuration

2018-09-10 Thread Christian König
Here a commit message is missing. Especially something like Fix: so that Alex can squash it into the other patch during upstreaming. Apart from that the patch looks good to me, Christian. Am 10.09.2018 um 18:06 schrieb shaoyunl: Change-Id: I2d78024fbe44a37f46a35d34c1e64dbd3937fdf1

[PATCH] drm/amdgpu: Init correct fb region for none XGMI configuration

2018-09-10 Thread shaoyunl
Change-Id: I2d78024fbe44a37f46a35d34c1e64dbd3937fdf1 Signed-off-by: shaoyunl --- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c index cf97c1c..ae44671 100644 ---

Re: [PATCH xf86-video-amdgpu] Add checking color management properties

2018-09-10 Thread Michel Dänzer
Hi Aaron, thanks for the patch. Moving to the amd-gfx mailing list, where xf86-video-amdgpu patches are reviewed. Comments inline below. On 2018-09-10 1:14 p.m., Aaron Liu wrote: > Add gamma_lut/degamma_lut/ctm checking before pushing > staged color management properties on the CRTC. > If

RE: [PATCH 04/12] drm/amdgpu/gmc9: Adjust GART and AGP location with xgmi offset

2018-09-10 Thread Liu, Shaoyun
Sorry , miss this comments and already submitted the serial of the patch . It's a good catch . I will send out another review to initialize fb_start/fb_end with vram_start/vram_end for older chips Regards Shaoyun.liu -Original Message- From: Christian König

Re: [PATCH] drm/amdgpu: fix error handling in amdgpu_cs_user_fence_chunk

2018-09-10 Thread Andrey Grodzovsky
Reviewed-by: Andrey Grodzovsky Andrey On 09/10/2018 09:54 AM, Christian König wrote: Slowly leaking memory one page at a time :) Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff

[PATCH] drm/amdgpu: fix error handling in amdgpu_cs_user_fence_chunk

2018-09-10 Thread Christian König
Slowly leaking memory one page at a time :) Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 23 +++ 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c

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

2018-09-10 Thread Christian König
Am 10.09.2018 um 15:05 schrieb Tom St Denis: On 2018-09-10 9:04 a.m., Christian König wrote: Hi Tom, I'm talking about adding new printks to figure out what the heck is going wrong here. Thanks, Christian. Hi Christian, Sure, if you want to send me a simple patch that adds more printk

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

2018-09-10 Thread Tom St Denis
On 2018-09-10 9:04 a.m., Christian König wrote: Hi Tom, I'm talking about adding new printks to figure out what the heck is going wrong here. Thanks, Christian. Hi Christian, Sure, if you want to send me a simple patch that adds more printk I'll gladly give it a try (doubly so since my

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

2018-09-10 Thread Christian König
Hi Tom, I'm talking about adding new printks to figure out what the heck is going wrong here. Thanks, Christian. Am 10.09.2018 um 14:59 schrieb Tom St Denis: Hi Christian, Are you adding new traces or turning on existing ones?  Would you like me to try them out in my setup? Tom On

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

2018-09-10 Thread Tom St Denis
Hi Christian, Are you adding new traces or turning on existing ones? Would you like me to try them out in my setup? Tom On 2018-09-10 8:49 a.m., Christian König wrote: Am 10.09.2018 um 14:05 schrieb Huang Rui: On Mon, Sep 10, 2018 at 05:25:48PM +0800, Koenig, Christian wrote: Am

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

2018-09-10 Thread Christian König
Am 10.09.2018 um 14:05 schrieb 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 pointer is only local to

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 pointer is only local to > >> the function. > >

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 pointer is only local to > >> the function. > >

Re: [PATCH v2] drm/amdgpu: Fix the dead lock issue.

2018-09-10 Thread Christian König
Am 10.09.2018 um 11:55 schrieb Deng, Emily: -Original Message- From: amd-gfx On Behalf Of Christian König Sent: Monday, September 10, 2018 5:49 PM To: Deng, Emily ; amd-gfx@lists.freedesktop.org Subject: Re: [PATCH v2] drm/amdgpu: Fix the dead lock issue. Am 10.09.2018 um 11:47 schrieb

RE: [PATCH v2] drm/amdgpu: Fix the dead lock issue.

2018-09-10 Thread Deng, Emily
>-Original Message- >From: amd-gfx On Behalf Of >Christian König >Sent: Monday, September 10, 2018 5:49 PM >To: Deng, Emily ; amd-gfx@lists.freedesktop.org >Subject: Re: [PATCH v2] drm/amdgpu: Fix the dead lock issue. > >Am 10.09.2018 um 11:47 schrieb Deng, Emily: >>> -Original

Re: [PATCH v2] drm/amdgpu: Fix the dead lock issue.

2018-09-10 Thread Christian König
Am 10.09.2018 um 11:47 schrieb Deng, Emily: -Original Message- From: Christian König Sent: Monday, September 10, 2018 5:41 PM To: Deng, Emily ; amd-gfx@lists.freedesktop.org Subject: Re: [PATCH v2] drm/amdgpu: Fix the dead lock issue. Am 10.09.2018 um 11:34 schrieb Emily Deng: It will

RE: [PATCH v2] drm/amdgpu: Fix the dead lock issue.

2018-09-10 Thread Deng, Emily
>-Original Message- >From: Christian König >Sent: Monday, September 10, 2018 5:41 PM >To: Deng, Emily ; amd-gfx@lists.freedesktop.org >Subject: Re: [PATCH v2] drm/amdgpu: Fix the dead lock issue. > >Am 10.09.2018 um 11:34 schrieb Emily Deng: >> It will ramdomly have the dead lock issue

Re: [PATCH] drm/amdgpu: move PSP init prior to IH in gpu reset

2018-09-10 Thread Huang Rui
On Mon, Sep 10, 2018 at 02:13:09PM +0800, Emily Deng wrote: > since we use PSP to program IH regs now > > Signed-off-by: Monk Liu Reviewed-by: Huang Rui > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git

Re: [PATCH 1/2] drm/amdgpu: Moved fault hash table to amdgpu vm

2018-09-10 Thread Christian König
Hi Felix & Oak, over the weekend I had the idea that we could just use the shadow BOs to have the current state in a page fault. They are GTT BOs and CPU accessible anyway. Regards, Christian. Am 08.09.2018 um 09:34 schrieb Christian König: Hi Felix, But why do you want to update page

Re: [PATCH v2] drm/amdgpu: Fix the dead lock issue.

2018-09-10 Thread Christian König
Am 10.09.2018 um 11:34 schrieb Emily Deng: It will ramdomly have the dead lock issue when test TDR: 1. amdgpu_device_handle_vram_lost gets the lock shadow_list_lock 2. amdgpu_bo_create locked the bo's resv lock 3. amdgpu_bo_create_shadow is waiting for the shadow_list_lock 4.

[PATCH v2] drm/amdgpu: Fix the dead lock issue.

2018-09-10 Thread Emily Deng
It will ramdomly have the dead lock issue when test TDR: 1. amdgpu_device_handle_vram_lost gets the lock shadow_list_lock 2. amdgpu_bo_create locked the bo's resv lock 3. amdgpu_bo_create_shadow is waiting for the shadow_list_lock 4. amdgpu_device_recover_vram_from_shadow is waiting for the bo's

Re: [PATCH libdrm] tests/amdgpu: add unaligned VM test

2018-09-10 Thread Christian König
Am 10.09.2018 um 04:44 schrieb Zhang, Jerry (Junwei): On 09/10/2018 02:04 AM, Christian König wrote: Make a VM mapping which is as unaligned as possible. Is it going to test unaligned address between BO allocation and BO mapping and skip huge page mapping? Yes and no. Huge page handling

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

2018-09-10 Thread Christian König
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 pointer is only local to the function. You're right. I narrowed it with gdb dump from ttm_bo_bulk_move_lru_tail+0x2b, the

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 11:00:04AM +0200, Christian König wrote: > Hi Ray, > > well those patches doesn't make sense, the pointer is only local to > the function. You're right. I narrowed it with gdb dump from ttm_bo_bulk_move_lru_tail+0x2b, the use-after-free should be in below codes: man =

Re: [drm:amdgpu_job_timedout [amdgpu]] *ERROR* ring gfx timeout

2018-09-10 Thread Michel Dänzer
On 2018-09-08 7:24 p.m., Dāvis Mosāns wrote: > Hello, > > With Radeon RX Vega 64 when launching LibreOffice (6.1.0.3) on Arch > Linux with 4.18.5 kernel then display freezes. > dmesg contains: > > [drm:amdgpu_job_timedout [amdgpu]] *ERROR* ring gfx timeout, signaled > seq=8322, emitted seq=8325

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

2018-09-10 Thread Christian König
Hi Ray, well those patches doesn't make sense, the pointer is only local to the function. Regards, 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 ---

[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 ---

[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 +

RE: [PATCH] drm/amdgpu: Fix the dead lock issue.

2018-09-10 Thread Deng, Emily
>-Original Message- >From: Koenig, Christian >Sent: Monday, September 10, 2018 3:23 PM >To: Deng, Emily ; amd-gfx@lists.freedesktop.org >Subject: Re: [PATCH] drm/amdgpu: Fix the dead lock issue. > >Am 10.09.2018 um 09:19 schrieb Deng, Emily: >>> -Original Message- >>> From:

Re: [PATCH] drm/amdgpu: Fix the dead lock issue.

2018-09-10 Thread Christian König
Am 10.09.2018 um 09:19 schrieb Deng, Emily: -Original Message- From: Christian König Sent: Monday, September 10, 2018 3:06 PM To: Deng, Emily ; amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amdgpu: Fix the dead lock issue. Am 10.09.2018 um 06:07 schrieb Emily Deng: It will

RE: [PATCH] drm/amdgpu: Fix the dead lock issue.

2018-09-10 Thread Deng, Emily
>-Original Message- >From: Christian König >Sent: Monday, September 10, 2018 3:06 PM >To: Deng, Emily ; amd-gfx@lists.freedesktop.org >Subject: Re: [PATCH] drm/amdgpu: Fix the dead lock issue. > >Am 10.09.2018 um 06:07 schrieb Emily Deng: >> It will ramdomly have the dead lock issue when

Re: [PATCH] drm/amdgpu: move PSP init prior to IH in gpu reset

2018-09-10 Thread Christian König
Am 10.09.2018 um 08:13 schrieb Emily Deng: since we use PSP to program IH regs now Signed-off-by: Monk Liu Acked-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH] drm/amdgpu: Fix the dead lock issue.

2018-09-10 Thread Christian König
Am 10.09.2018 um 06:07 schrieb Emily Deng: It will ramdomly have the dead lock issue when test TDR: 1. amdgpu_device_handle_vram_lost gets the lock shadow_list_lock 2. amdgpu_bo_create locked the bo's resv lock 3. amdgpu_bo_create_shadow is waiting for the shadow_list_lock 4.

Re: [PATCH 0/2] [radeon] Getting rid of GUP and use HMM for user ptr features.

2018-09-10 Thread Christian König
Am 10.09.2018 um 02:57 schrieb jgli...@redhat.com: From: Jérôme Glisse [This depends on some HMM patchset queued upstream see branch [1]] This is simple change to switch to use HMM for user ptr buffer object which conveniently avoid to pin pages. I have more things in the pipe to make HMM

Re: [PATCH] drm/amdgpu: set bulk_moveable to false when a per VM is released

2018-09-10 Thread Christian König
Am 10.09.2018 um 08:19 schrieb Huang Rui: On Sun, Sep 09, 2018 at 06:38:13PM +0800, StDenis, Tom wrote: On 2018-09-08 5:12 a.m., Huang Rui wrote: On Wed, Sep 05, 2018 at 05:08:26PM +0200, Christian König wrote: Otherwise we might run into a use after free during bulk move. Signed-off-by:

Re: [PATCH] drm/amdgpu: set bulk_moveable to false when a per VM is released

2018-09-10 Thread Huang Rui
On Sun, Sep 09, 2018 at 06:38:13PM +0800, StDenis, Tom wrote: > On 2018-09-08 5:12 a.m., Huang Rui wrote: > > On Wed, Sep 05, 2018 at 05:08:26PM +0200, Christian König wrote: > >> Otherwise we might run into a use after free during bulk move. > >> > >> Signed-off-by: Christian König > > > > Is

[PATCH] drm/amdgpu: move PSP init prior to IH in gpu reset

2018-09-10 Thread Emily Deng
since we use PSP to program IH regs now Signed-off-by: Monk Liu --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index 93476b8..acfc63e