Re: Random short freezes due to TTM buffer migrations

2016-08-16 Thread Christian König
One question: Will it be possible to share these split BOs as dmabufs? In theory yes, in practice I'm not sure. DMA-bufs are designed around scatter gather tables, those fortunately support buffers split over the whole address space. The problem is the importing device needs to be able to han

RE: Random short freezes due to TTM buffer migrations

2016-08-16 Thread Mao, David
It becomes regular for application to request a big chunk of memory and do the sub-allocation by itself. I agree Kernel should do better to provide fine grained paging granularity. I don't know whether 1/2 of vram is the biggest single allocation application would like to do, but it is better i

Re: [PATCH] drm/amdgpu: For virtual_display feature, the vblank_get_counter hook is always return 0 when there's no hardware frame counter which can be used.

2016-08-16 Thread Michel Dänzer
On 17/08/16 02:47 PM, Deng, Emily wrote: >> -Original Message- >> From: Michel Dänzer [mailto:mic...@daenzer.net] >> Sent: Wednesday, August 17, 2016 11:50 AM >> To: Deng, Emily >> Cc: amd-gfx@lists.freedesktop.org >> Subject: Re: [PATCH] drm/amdgpu: For virtual_display feature, the >> vbl

[PATCH 7/8] drm/amdgpu: implement recovery vram bo from shadow

2016-08-16 Thread Chunming Zhou
It will be used by gpu reset to recover vram bo. Change-Id: Id3d954a05438c667f6ebdc4a05365e7c244ecf40 Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 35 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 4 2 files changed, 39 inserti

[PATCH 8/8] drm/amdgpu: recover vram bo from shadow after gpu reset

2016-08-16 Thread Chunming Zhou
Change-Id: I963598ba6eb44bc8620d70e026c0175d1a1de120 Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 28 +++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgp

[PATCH 5/8] drm/amdgpu: update pt shadow while updating pt V2

2016-08-16 Thread Chunming Zhou
V2: move shadow parameter to amdgpu_pte_update_params. Change-Id: Ibc8fb4c5c9be38934ebd6d56f1cbd49cb82d53af Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgp

[PATCH 4/8] drm/amdgpu: update pd shadow while updating pd

2016-08-16 Thread Chunming Zhou
Change-Id: Ief33f9539c24e1ab696935e2bfedd3630c07fc67 Signed-off-by: Chunming Zhou Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 55 +++--- 2 files changed, 38 insertions(+), 18 deletions(-) di

[PATCH 3/8] drm/amdgpu: sync bo and shadow V2

2016-08-16 Thread Chunming Zhou
Use shadow flag to judge which direction to sync. V2: Don't need bo pin, so remove it. Change-Id: I9b540970d3a24c6aebeaa94c99f66a89134c663d Signed-off-by: Chunming Zhou Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 43 ++ drivers/gpu/d

[PATCH 2/8] drm/amdgpu: add direct submision option for copy_buffer

2016-08-16 Thread Chunming Zhou
Change-Id: I3acdcf24b0ccb86d5f2b0593ffcf3dad8b6ad29f Signed-off-by: Chunming Zhou Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_test.c | 4 ++-- drivers/gpu/d

[PATCH 6/8] drm/amdgpu: link all shadow bo

2016-08-16 Thread Chunming Zhou
Change-Id: I8af3b42e1b5d84ca04277f95aeca44cbc534ccb2 Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 5 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 14 +- 3 files changed, 21 insertions(+), 1 de

[PATCH 1/8] drm/amdgpu: add need backup function V2

2016-08-16 Thread Chunming Zhou
V2: add checking if need backup in amdgpu_bo_create. Change-Id: I76e2552078c9ae11b7f2a1769025230f61733659 Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 +-

[PATCH 0/8] shadow page table support V5 ---> shadow bo support

2016-08-16 Thread Chunming Zhou
Since we cannot ensure VRAM is consistent after a GPU reset, page table shadowing is necessary. Shadowed page tables are, in a sense, a method to recover the consistent state of the page tables before the reset occurred. We need to allocate GTT bo as the shadow of VRAM bo when creating page table,

RE: [PATCH] drm/amdgpu: For virtual_display feature, the vblank_get_counter hook is always return 0 when there's no hardware frame counter which can be used.

2016-08-16 Thread Deng, Emily
> -Original Message- > From: Michel Dänzer [mailto:mic...@daenzer.net] > Sent: Wednesday, August 17, 2016 11:50 AM > To: Deng, Emily > Cc: amd-gfx@lists.freedesktop.org > Subject: Re: [PATCH] drm/amdgpu: For virtual_display feature, the > vblank_get_counter hook is always return 0 when the

Re: [PATCH] drm/amdgpu: For virtual_display feature, the vblank_get_counter hook is always return 0 when there's no hardware frame counter which can be used.

2016-08-16 Thread Michel Dänzer
On 16/08/16 07:15 PM, Emily Deng wrote: > Signed-off-by: Emily Deng Please change the shortlog to be no longer than ~72 characters. Maybe something like this for the commit log: drm/amdgpu: Hardcode virtual DCE vblank / scanout position return values By hardcoding 0 for the vblank counter and -

RE: [PATCH] drm/amdgpu: For virtual_display feature, the vblank_get_counter hook is always return 0 when there's no hardware frame counter which can be used.

2016-08-16 Thread Deng, Emily
Ping ... Hi Michel, Could you please help to review this? Thanks very much. Best Wishes, Emily Deng > -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of > Emily Deng > Sent: Tuesday, August 16, 2016 6:15 PM > To: amd-gfx@lists.freedesktop.o

RE: Random short freezes due to TTM buffer migrations

2016-08-16 Thread Zhou, David(ChunMing)
Add his email. > -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Zhou, David(ChunMing) > Sent: Wednesday, August 17, 2016 9:57 AM > To: Kuehling, Felix ; Christian König > ; Marek Olšák ; amd- > g...@lists.freedesktop.org > Subject: RE: Rand

RE: Random short freezes due to TTM buffer migrations

2016-08-16 Thread Zhou, David(ChunMing)
+David Mao, Well, our Vulcan stack aslo encountered this problem before, the performance is very low when migration is often. At that moment, we want to add some algorithm for eviction LRU, but failed to find an appropriate generic way. Then UMD decreased some VRAM usage at last. Hope we can g

Re: Random short freezes due to TTM buffer migrations

2016-08-16 Thread Felix Kuehling
Very nice. I'm looking forward to this for KFD as well. One question: Will it be possible to share these split BOs as dmabufs? Regards, Felix On 16-08-16 11:27 AM, Christian König wrote: > Hi Marek, > > I'm already working on this. > > My current approach is to use a custom BO manager for VRA

Re: Reverted another change to fix buffer move hangs (was Re: [PATCH] drm/ttm: partial revert "cleanup ttm_tt_(unbind|destroy)" v2)

2016-08-16 Thread Felix Kuehling
Thank you. Sorry, I already pushed it with Alex's R-B, without yours. On 16-08-16 03:53 AM, Christian König wrote: > Am 15.08.2016 um 23:03 schrieb Alex Deucher: >> On Mon, Aug 15, 2016 at 3:06 PM, Felix Kuehling >> wrote: >>> Patch against current amd-staging-4.6 is attached. >> Reviewed-by: Al

underclocking support rx480

2016-08-16 Thread Jarkko Korpi
I haven't tried yet the overclocking feature that's limited 20% at command line. But please make it possible to downlock too. ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/amd-gfx

RE: underclocking support rx480

2016-08-16 Thread Deucher, Alexander
You can already limit the clock levels as I described previously. Alex From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of Jarkko Korpi Sent: Tuesday, August 16, 2016 2:37 PM To: amd-gfx@lists.freedesktop.org Subject: underclocking support rx480 I haven't tried yet the ov

Re: Random short freezes due to TTM buffer migrations

2016-08-16 Thread Alex Deucher
On Tue, Aug 16, 2016 at 11:58 AM, Christian König wrote: > Am 16.08.2016 um 17:50 schrieb Alex Deucher: >> >> On Tue, Aug 16, 2016 at 11:27 AM, Christian König >> wrote: >>> >>> Hi Marek, >>> >>> I'm already working on this. >>> >>> My current approach is to use a custom BO manager for VRAM with

Re: Random short freezes due to TTM buffer migrations

2016-08-16 Thread Christian König
Am 16.08.2016 um 17:56 schrieb Marek Olšák: On Tue, Aug 16, 2016 at 5:27 PM, Christian König wrote: Hi Marek, I'm already working on this. My current approach is to use a custom BO manager for VRAM with TTM and so split allocations into chunks of 4MB. Large BOs are still swapped out as one,

Re: Random short freezes due to TTM buffer migrations

2016-08-16 Thread Christian König
Am 16.08.2016 um 17:50 schrieb Alex Deucher: On Tue, Aug 16, 2016 at 11:27 AM, Christian König wrote: Hi Marek, I'm already working on this. My current approach is to use a custom BO manager for VRAM with TTM and so split allocations into chunks of 4MB. How about handling vram in fragment s

Re: Random short freezes due to TTM buffer migrations

2016-08-16 Thread Marek Olšák
On Tue, Aug 16, 2016 at 5:27 PM, Christian König wrote: > Hi Marek, > > I'm already working on this. > > My current approach is to use a custom BO manager for VRAM with TTM and so > split allocations into chunks of 4MB. > > Large BOs are still swapped out as one, but it makes it much more likely t

Re: Random short freezes due to TTM buffer migrations

2016-08-16 Thread Alex Deucher
On Tue, Aug 16, 2016 at 11:27 AM, Christian König wrote: > Hi Marek, > > I'm already working on this. > > My current approach is to use a custom BO manager for VRAM with TTM and so > split allocations into chunks of 4MB. > How about handling vram in fragment size pages (64k) or does the overhead

Re: Random short freezes due to TTM buffer migrations

2016-08-16 Thread Christian König
Hi Marek, I'm already working on this. My current approach is to use a custom BO manager for VRAM with TTM and so split allocations into chunks of 4MB. Large BOs are still swapped out as one, but it makes it much more likely to that you can allocate 1/2 of VRAM as one buffer. Give me till

Random short freezes due to TTM buffer migrations

2016-08-16 Thread Marek Olšák
Hi, I'm seeing random temporary freezes (up to 2 seconds) under memory pressure. Before I describe the exact circumstances, I'd like to say that this is a serious issue affecting playability of certain AAA Linux games. In order to reproduce this, an application should: - allocate a few very large

Re: DCE wait for idle

2016-08-16 Thread Alex Deucher
On Tue, Aug 16, 2016 at 7:53 AM, StDenis, Tom wrote: > In these functions > > > static bool dce_v11_0_is_idle(void *handle) > { > return true; > } > > static int dce_v11_0_wait_for_idle(void *handle) > { > return 0; > } > > Shouldn't they wait on the GUI bit of the GRBM_STATUS register? There is

DCE wait for idle

2016-08-16 Thread StDenis, Tom
In these functions static bool dce_v11_0_is_idle(void *handle) { return true; } static int dce_v11_0_wait_for_idle(void *handle) { return 0; } Shouldn't they wait on the GUI bit of the GRBM_STATUS register? Tom ___ amd-gfx mailing list amd-gfx@list

[PATCH] drm/amdgpu: For virtual_display feature, the vblank_get_counter hook is always return 0 when there's no hardware frame counter which can be used.

2016-08-16 Thread Emily Deng
Signed-off-by: Emily Deng --- drivers/gpu/drm/amd/amdgpu/dce_virtual.c | 16 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/dce_virtual.c b/drivers/gpu/drm/amd/amdgpu/dce_virtual.c index 2ce5f90..85f14a6 100644 --- a/drivers/gpu/drm/amd

RE: [PATCH] drm/amdgpu: For virtual_display feature, define a variable for vblank count of cpu vsync timer.

2016-08-16 Thread Deng, Emily
Hi Michel and Daniel, I just tryed Michel's advice: return 0 in vblank_get_counter, and set dev->max_vblank_count = 0 , and found the adev->ddev->vblank[crtc].count also can increase which makes the 3D app with vsync can work properly as well. But I don't know the principle. Anyway I will ta

RE: [PATCH] drm/amdgpu: For virtual_display feature, define a variable for vblank count of cpu vsync timer.

2016-08-16 Thread Deng, Emily
Hi Michel and Daniel, Return the fake vblank count or return 0 in vblank_get_counter is only the virtual display feature's behavior, and the virtual display feature need to be enabled by set module parameter, so won't affect normal case. And I think the vblank counter will be increased ev

Re: [PATCH 00/10] shadow page table support V4

2016-08-16 Thread Christian König
Patch #1, #2 and #4 are Reviewed-by: Christian König . For patch #5: static void amdgpu_vm_update_ptes(struct amdgpu_pte_update_params *params, struct amdgpu_vm *vm, uint64_t start, uint64_t end, -

Re: fix possible bad kref_put in amdgpu_uvd_ring_end_use

2016-08-16 Thread Christian König
NAK, we already merged a patch to avoid the fence_put() in general when the ring test fails. Regards, Christian. Am 16.08.2016 um 08:33 schrieb Matthew Macy: Clang identified this when I was merging up 4.8-rc1/rc2. I usually just disable warnings as they pop up as I treat the drivers as vendo

Re: Reverted another change to fix buffer move hangs (was Re: [PATCH] drm/ttm: partial revert "cleanup ttm_tt_(unbind|destroy)" v2)

2016-08-16 Thread Christian König
Am 15.08.2016 um 23:03 schrieb Alex Deucher: On Mon, Aug 15, 2016 at 3:06 PM, Felix Kuehling wrote: Patch against current amd-staging-4.6 is attached. Reviewed-by: Alex Deucher Reviewed-by: Christian König . Regards, Felix On 16-08-13 05:25 AM, Christian König wrote: Am 13.08.2016

Re: [PATCH] drm/amdgpu: For virtual_display feature, define a variable for vblank count of cpu vsync timer.

2016-08-16 Thread Daniel Vetter
On Tue, Aug 16, 2016 at 03:43:07PM +0900, Michel Dänzer wrote: > On 16/08/16 03:28 PM, Deng, Emily wrote: > >> From: Michel Dänzer [mailto:mic...@daenzer.net] > >> Sent: Tuesday, August 16, 2016 12:01 PM > >> On 16/08/16 12:49 PM, Deng, Emily wrote: > >>> Hi Michel, Thanks, I still couldn't see the

Re: [PATCH] drm/amdgpu: For virtual_display feature, define a variable for vblank count of cpu vsync timer.

2016-08-16 Thread Michel Dänzer
On 16/08/16 04:00 PM, Deng, Emily wrote: >> From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of >> Michel D?nzer >> Sent: Tuesday, August 16, 2016 2:43 PM >> On 16/08/16 03:28 PM, Deng, Emily wrote: From: Michel Dänzer [mailto:mic...@daenzer.net] Sent: Tuesday, Augus

RE: [PATCH] drm/amdgpu: For virtual_display feature, define a variable for vblank count of cpu vsync timer.

2016-08-16 Thread Deng, Emily
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of > Michel D?nzer > Sent: Tuesday, August 16, 2016 2:43 PM > To: Deng, Emily > Cc: dri-de...@lists.freedesktop.org; amd-gfx@lists.freedesktop.org > Subject: Re: [PATCH] drm/amdgpu: For virtual_di