[PATCH 16/18] drm/amdgpu: recover page tables after gpu reset

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

[PATCH 15/18] drm/amd: block entity

2016-08-11 Thread Chunming Zhou
Change-Id: Iba210e0d007a249a90f955f5ac9c3803cc40def2 Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 7 ++- drivers/gpu/drm/amd/scheduler/gpu_scheduler.h | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/scheduler/gpu_sch

[PATCH 06/18] drm/amdgpu: implement vm recovery function from shadow

2016-08-11 Thread Chunming Zhou
Change-Id: I46783043eecbe9fc9c2ce9230be1085aca3731bd Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 4 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 48 ++ 2 files changed, 52 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.

[PATCH 11/18] drm/amdgpu: link all vm clients

2016-08-11 Thread Chunming Zhou
Add vm client to list tail when creating it, move to head while submit to scheduler. Change-Id: I0625092f918853303a5ee97ea2eac87fb790ed69 Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 6 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 4 drivers/gpu/drm/

[PATCH 10/18] drm/amd: add last fence in sched entity

2016-08-11 Thread Chunming Zhou
Change-Id: I68f67da25c482ac9dbd26e186cb953a539555a74 Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 9 +++-- drivers/gpu/drm/amd/scheduler/gpu_scheduler.h | 1 + 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/scheduler/gpu_

[PATCH 18/18] drm/amdgpu: add backup condition for vm

2016-08-11 Thread Chunming Zhou
Change-Id: I73aa32cda17cd1039232125afa4aad299b264705 Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 30 ++ 1 file changed, 18 insertions(+), 12 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/am

[PATCH 14/18] drm/amdgpu: add shadow fence owner

2016-08-11 Thread Chunming Zhou
Normal cs doesn't need to care shadow jobs. Change-Id: I63f0a802438cafff336500656c5a367074e4182d Signed-off-by: Chunming Zhou Conflicts: drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_sync.c | 3 +++ driver

[PATCH 08/18] drm/amdgpu: update pd shadow bo

2016-08-11 Thread Chunming Zhou
Change-Id: I8d0c625c9f1c9a16b8e2e915831590be5a9a5242 Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 73 +++--- 2 files changed, 50 insertions(+), 24 deletions(-) diff --git a/drivers/gpu/drm/amd

[PATCH 00/18] shadow page table support V3

2016-08-11 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,

[PATCH 13/18] drm/amd: add block entity function

2016-08-11 Thread Chunming Zhou
Change-Id: Ia0378640962eef362569e0bbe090aea1ca083a55 Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 24 drivers/gpu/drm/amd/scheduler/gpu_scheduler.h | 3 +++ 2 files changed, 27 insertions(+) diff --git a/drivers/gpu/drm/amd/scheduler/

[PATCH 17/18] drm/amdgpu: add need backup function

2016-08-11 Thread Chunming Zhou
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 2 files changed, 9 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/drivers/gpu/drm/am

[PATCH 07/18] drm/amdgpu: add shadow_entity for shadow page table updates

2016-08-11 Thread Chunming Zhou
Change-Id: Id1bcb6701f1663e409b8ebe533ea9f8e7194227b Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 11 ++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h b/dr

[PATCH 12/18] drm/amdgpu: add vm_list_lock

2016-08-11 Thread Chunming Zhou
To lock adev->vm_list. Change-Id: I74d309eca9c22d190dd4072c69d26fa7fdea8884 Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_vm

[PATCH 04/18] drm/amdgpu: add shadow flag V2

2016-08-11 Thread Chunming Zhou
Indicate if need to sync between bo and shadow, where sync to where. V2: Rename to backup_shadow Change-Id: I74994dfad141da5c23a3598bb2e3df1253a195f7 Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 8 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/a

[PATCH 09/18] drm/amdgpu: update pt shadow

2016-08-11 Thread Chunming Zhou
Change-Id: I33b31cbe794c1c83b8e02e3069159c8204ac03e3 Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 108 + 1 file changed, 69 insertions(+), 39 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgp

[PATCH 01/18] drm/amdgpu: add shadow bo support V2

2016-08-11 Thread Chunming Zhou
shadow bo is the shadow of a bo, which is always in GTT, which can be used to backup the original bo. V2: reference shadow parent, shadow bo will be freed by who allocted him. Change-Id: Ia27d4225c47ff41d3053eb691276e29fb2d64026 Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu.

[PATCH 05/18] drm/amdgpu: sync bo and shadow

2016-08-11 Thread Chunming Zhou
Use shadow flag to judge which direction to sync. Change-Id: I9b540970d3a24c6aebeaa94c99f66a89134c663d Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 52 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 5 +++ 2 files changed, 57 inserti

[PATCH 03/18] drm/amdgpu: allocate shadow for pd/pt bo V2

2016-08-11 Thread Chunming Zhou
The pd/pt shadow bo will be used to backup page table, when gpu reset happens, we can restore the page table by them. V2: Free shadow bo. Change-Id: I28e4a9178f59eccb215f7977b5475d36e593ee5f Signed-off-by: Chunming Zhou Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 1

[PATCH 02/18] drm/amdgpu: validate shadow as well when validating bo

2016-08-11 Thread Chunming Zhou
Change-Id: I64c3d8c56f7955e885cad242fd06a8676f278363 Signed-off-by: Chunming Zhou Reviewed-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 76 -- 1 file changed, 46 insertions(+), 30 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.

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

2016-08-11 Thread Deng, Emily
ping... Anybody could help to review it? > -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of > Emily Deng > Sent: Thursday, August 11, 2016 11:47 AM > To: amd-gfx@lists.freedesktop.org > Cc: Deng, Emily > Subject: [PATCH] drm/amdgpu: For virtua

Adjusting memory speed according to display

2016-08-11 Thread Jarkko Korpi
I have rx480 which I connect into 1920x1080 pc screen via DP and audio into external amplifier via HDMI. This causes rx480 to raise the memory speed to 2000 while doing really simple tasks like watching youtube. I really dont need thatkind of speed for memory. And I am not aware that it's possib

Re: [PATCH 3/4] drm/amd/amdgpu: VCE v2 register cleanup

2016-08-11 Thread zhoucm1
Agree with Tom. On 2016年08月12日 00:09, Deucher, Alexander wrote: I guess I don't really have a particularly strong opinion either way. If others are ok with it, I'm fine with it. Alex *From:*StDenis, Tom *Sent:* Thursday, August 11, 2016 11:48 AM *To:* Deucher, Alexander; amd-gfx@lists.free

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

2016-08-11 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Felix Kuehling > Sent: Thursday, August 11, 2016 3:52 PM > To: Michel Dänzer; Christian König > Cc: amd-gfx@lists.freedesktop.org > Subject: Reverted another change to fix buffer move hangs (w

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

2016-08-11 Thread Felix Kuehling
We had to revert another change on the KFD branch to fix a buffer move problem: 8b6b79f43801f00ddcdc10a4d5719eba4b2e32aa (drm/amdgpu: group BOs by log2 of the size on the LRU v2 We haven't looked into this change in detail yet, to understand the cause. Kent found it by bisecting on amd-staging-4.6

RE: [PATCH 3/4] drm/amd/amdgpu: VCE v2 register cleanup

2016-08-11 Thread Deucher, Alexander
I guess I don't really have a particularly strong opinion either way. If others are ok with it, I'm fine with it. Alex From: StDenis, Tom Sent: Thursday, August 11, 2016 11:48 AM To: Deucher, Alexander; amd-gfx@lists.freedesktop.org Subject: Re: [PATCH 3/4] drm/amd/amdgpu: VCE v2 register clean

RE: [PATCH 4/4] drm/amd/amdgpu: UVD v6 register cleanup

2016-08-11 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Tom St Denis > Sent: Thursday, August 11, 2016 10:33 AM > To: amd-gfx@lists.freedesktop.org > Cc: StDenis, Tom > Subject: [PATCH 4/4] drm/amd/amdgpu: UVD v6 register cleanup > > Signed-off-by

Re: [PATCH 3/4] drm/amd/amdgpu: VCE v2 register cleanup

2016-08-11 Thread StDenis, Tom
Just trying to make it easier to read. WREG32_FIELD(foo, FIELD, 1); Is easier to read than WREG32_P(foo, FOO__FIELD_MASK, ~FOO__FIELD_MASK); (also I already pushed them after getting a RB by Christian this morning so we might need to hold a different discussion). I agree it's not really

RE: [PATCH 3/4] drm/amd/amdgpu: VCE v2 register cleanup

2016-08-11 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Tom St Denis > Sent: Thursday, August 11, 2016 10:33 AM > To: amd-gfx@lists.freedesktop.org > Cc: StDenis, Tom > Subject: [PATCH 3/4] drm/amd/amdgpu: VCE v2 register cleanup > > Signed-off-by

Re: [PATCH 1/4] drm/amd/amdgpu: Cleanup register access in VCE v3

2016-08-11 Thread StDenis, Tom
Sorta. The switch from gate/ungate for instance is kinda mutually exclusive. The device won't be gated when calling gate or ungated when calling ungate. The other conditional writes are similar. Tom From: Deucher, Alexander Sent: Thursday, August 11, 2016 1

RE: [PATCH 2/4] drm/amd/amdgpu: add mutex in check_soft for VCE v3

2016-08-11 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Tom St Denis > Sent: Thursday, August 11, 2016 10:33 AM > To: amd-gfx@lists.freedesktop.org > Cc: StDenis, Tom > Subject: [PATCH 2/4] drm/amd/amdgpu: add mutex in check_soft for VCE v3 > > Si

RE: [PATCH 1/4] drm/amd/amdgpu: Cleanup register access in VCE v3

2016-08-11 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Tom St Denis > Sent: Thursday, August 11, 2016 10:33 AM > To: amd-gfx@lists.freedesktop.org > Cc: StDenis, Tom > Subject: [PATCH 1/4] drm/amd/amdgpu: Cleanup register access in VCE v3 > > Sig

Re: [PATCH 1/4] drm/amd/amdgpu: Cleanup register access in VCE v3

2016-08-11 Thread Christian König
Am 11.08.2016 um 16:32 schrieb Tom St Denis: Signed-off-by: Tom St Denis Reviewed-by: Christian König Regards, Christian. --- drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 145 ++ 1 file changed, 43 insertions(+), 102 deletions(-) diff --git a/drivers/gpu/drm/

[PATCH 1/4] drm/amd/amdgpu: Cleanup register access in VCE v3

2016-08-11 Thread Tom St Denis
Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 145 ++ 1 file changed, 43 insertions(+), 102 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c b/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c index 7e6bb45658f6..073cf9ed0674 100644 -

[PATCH 4/4] drm/amd/amdgpu: UVD v6 register cleanup

2016-08-11 Thread Tom St Denis
Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c | 27 +++ 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c b/drivers/gpu/drm/amd/amdgpu/uvd_v6_0.c index c11b97f8e376..7b7e82840c95 100644 --- a/driv

[PATCH 2/4] drm/amd/amdgpu: add mutex in check_soft for VCE v3

2016-08-11 Thread Tom St Denis
Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c b/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c index 073cf9ed0674..615b8b16ad04 100644 --- a/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c +++ b/driv

Various tidy-ups for VCE/UVD

2016-08-11 Thread Tom St Denis
Various cleanups using WREG32_FIELD as well as a bug fix in the soft_reset check for VCEv3 which didn't hold the GRBM lock around accessing GRBM_GFX_IDX. ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org https://lists.freedesktop.org/mailman/listi

[PATCH 3/4] drm/amd/amdgpu: VCE v2 register cleanup

2016-08-11 Thread Tom St Denis
Signed-off-by: Tom St Denis --- drivers/gpu/drm/amd/amdgpu/vce_v2_0.c | 39 +-- 1 file changed, 14 insertions(+), 25 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v2_0.c b/drivers/gpu/drm/amd/amdgpu/vce_v2_0.c index 80a37a602181..21ba219e943b 100644 --

Re: GRBM lock in vce_v3_0_check_soft_reset(void *handle)

2016-08-11 Thread StDenis, Tom
Ok I'll submit a patch in a bit. Tom From: Deucher, Alexander Sent: Thursday, August 11, 2016 09:53 To: StDenis, Tom; amd-gfx list Subject: RE: GRBM lock in vce_v3_0_check_soft_reset(void *handle) Yes, it sounds like a bug. It should take the mutex locally.

RE: GRBM lock in vce_v3_0_check_soft_reset(void *handle)

2016-08-11 Thread Deucher, Alexander
Yes, it sounds like a bug. It should take the mutex locally. From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of StDenis, Tom Sent: Thursday, August 11, 2016 9:42 AM To: amd-gfx list Subject: GRBM lock in vce_v3_0_check_soft_reset(void *handle) I'm working on tidying up v

GRBM lock in vce_v3_0_check_soft_reset(void *handle)

2016-08-11 Thread StDenis, Tom
I'm working on tidying up vce v3 and came across the function static int vce_v3_0_check_soft_reset(void *handle) Which writes to the GRBM_GFX_INDEX but doesn't take the mutex around it. Nor does the parent function in amdgpu_device.c which calls all of the check_soft_reset callbacks. Is th

Re: [PATCH 06/19] drm/amdgpu: implement vm recovery function from shadow

2016-08-11 Thread zhoucm1
On 2016年08月11日 16:39, Christian König wrote: Am 05.08.2016 um 11:38 schrieb Chunming Zhou: Change-Id: I46783043eecbe9fc9c2ce9230be1085aca3731bd Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 4 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 48 +++

Re: [PATCH 06/19] drm/amdgpu: implement vm recovery function from shadow

2016-08-11 Thread Christian König
Am 05.08.2016 um 11:38 schrieb Chunming Zhou: Change-Id: I46783043eecbe9fc9c2ce9230be1085aca3731bd Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 4 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 48 ++ 2 files changed, 52 insertions(