[PATCH 02/13] drm/amdgpu: add shadow bo support

2016-08-02 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. Change-Id: Ia27d4225c47ff41d3053eb691276e29fb2d64026 Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 36 +

[PATCH 03/13] drm/amdgpu: set shadow flag for pd/pt bo

2016-08-02 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. Change-Id: I31eeb581f203d1db0654a48745ef4e64ed40ed9b Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 16

[PATCH 04/13] drm/amdgpu: update shadow pt bo while update pt

2016-08-02 Thread Chunming Zhou
Change-Id: I8245cdad490d2a0b8cf4b9320e53e14db0b6add4 Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 16 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index

[PATCH 01/13] drm/amdgpu: irq resume should be immediately after gpu resume

2016-08-02 Thread Chunming Zhou
Change-Id: Icf64bf5964f0ef66c239ab0679d51275cc272699 Signed-off-by: Chunming Zhou --- 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 edbb3

[PATCH 00/13] shadow page table support

2016-08-02 Thread Chunming Zhou
Since we cannot make sure VRAM is safe after gpu reset, page table backup is neccessary, shadow page table is sense way to recovery page talbe when gpu reset happens. We need to allocate GTT bo as the shadow of VRAM bo when creating page table, and make them same. After gpu reset, we will need to u

[PATCH 11/13] drm/amd: wait neccessary dependency before running job

2016-08-02 Thread Chunming Zhou
Change-Id: Ibcc3558c2330caad1a2edb9902b3f21bd950d19f Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.c b/drivers/gpu/drm/amd/scheduler/gpu_scheduler

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

2016-08-02 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 06/13] drm/amdgpu: implement amdgpu_vm_recover_page_table_from_shadow

2016-08-02 Thread Chunming Zhou
Change-Id: I9957e726576289448911f5fb2ff7bcb9311a1906 Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 2 + drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 77 ++ 2 files changed, 79 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu.h

[PATCH 05/13] drm/amdgpu: update pd shadow while updating pd

2016-08-02 Thread Chunming Zhou
Change-Id: Icafa90a6625ea7b5ab3e360ba0d73544cda251b0 Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 68 +++--- 2 files changed, 48 insertions(+), 21 deletions(-) diff --git a/drivers/gpu/drm/amd

[PATCH 10/13] drm/amdgpu: recover page tables after gpu reset

2016-08-02 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 07/13] drm/amdgpu: link all vm clients

2016-08-02 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 08/13] drm/amdgpu: add vm_list_lock

2016-08-02 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 12/13] drm/amdgpu: add vm recover pt fence

2016-08-02 Thread Chunming Zhou
Before every job runs, we must make sure which's vm is recoverred completely. Change-Id: Ibe77a3c8f8206def280543fbb4195ad2ab9772e0 Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 5 + drivers/gpu/drm/amd/amdgpu/amdg

[PATCH 13/13] drm/amdgpu: add backup condition for shadow page table

2016-08-02 Thread Chunming Zhou
Change-Id: I5a8c0f4c1e9b65d2310ccb0f669b478884072a11 Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 71 +++--- 1 file changed, 48 insertions(+), 23 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgp

[PATCH 03/11] drm/amd: add recover run queue for scheduler

2016-08-02 Thread Chunming Zhou
Change-Id: I7171d1e3884aabe1263d8f7be18cadf2e98216a4 Signed-off-by: Chunming Zhou Reviewed-by: Edward O'Callaghan --- drivers/gpu/drm/amd/scheduler/gpu_scheduler.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/scheduler/gpu_scheduler.h b/drivers/gpu/d

[PATCH 04/11] drm/amdgpu: fix vm init error path

2016-08-02 Thread Chunming Zhou
Change-Id: Ie3d5440dc0d2d3a61d8e785ab08b8b91eda223db Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index 11c1263..1d58

[PATCH 00/11] add recovery entity and run queue

2016-08-02 Thread Chunming Zhou
every vm has itself recovery entity, which is used to reovery page table from their shadow. They don't need to wait front vm completed. And also using all pte rings can speed reovery. every scheduler has its own recovery entity, which is used to save hw jobs, and resubmit from it, which solves t

[PATCH 01/11] drm/amdgpu: hw ring should be empty when gpu reset

2016-08-02 Thread Chunming Zhou
Change-Id: I08ca5a805f590cc7aad0e9ccd91bd5925bb216e2 Signed-off-by: Chunming Zhou Reviewed-by: Edward O'Callaghan --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 11 +++ 3 files changed

[PATCH 02/11] drm/amdgpu: specify entity to amdgpu_copy_buffer

2016-08-02 Thread Chunming Zhou
Change-Id: Ib84621d8ab61bf2ca0719c6888cc403982127684 Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_benchmark.c | 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_test.c | 8 drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c

[PATCH 08/11] drm/amd: use scheduler to recover hw jobs

2016-08-02 Thread Chunming Zhou
The old way is trying to recover hw jobs directly, which will conflict with scheduler thread. Change-Id: I9e45abd43ae280a675b0b0d88a820106dea2716c Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 48 +-- 1 file changed, 16 insertions(+), 32

[PATCH 10/11] drm/amd: reset jobs to recover entity

2016-08-02 Thread Chunming Zhou
remove recover_entity for recover_rq when reset job. add recover_entity back when recover job Change-Id: Ic2e5cb6ab79d2abc49374e1770299487e327efe9 Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 19 ++- 1 file changed, 10 insertions(+), 9 deletion

[PATCH 11/11] drm/amdgpu: no need fence wait every time

2016-08-02 Thread Chunming Zhou
recover entities have handled very well for each dependency. Change-Id: I70a8d0e2753741c4b54d9e01085d00dd708b5c80 Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm

[PATCH 06/11] drm/amdgpu: use all pte rings to recover page table

2016-08-02 Thread Chunming Zhou
Change-Id: Ic74508ec9de0bf1c027313ce9574e6cb8ea9bb1d Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 34 ++ 1 file changed, 25 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/am

[PATCH 05/11] drm/amdgpu: add vm recover entity

2016-08-02 Thread Chunming Zhou
every vm uses itself recover entity to recovery page table from shadow. Change-Id: I93e37666cb3fb511311c96ff172b6e9ebd337547 Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 3 ++- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 22 +++--- 2 files changed, 17 i

[PATCH 07/11] drm/amd: add recover entity for every scheduler

2016-08-02 Thread Chunming Zhou
It will be used to recover hw jobs. Change-Id: I5508f5ffa04909b480ddd669dfb297e5059eba04 Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/scheduler/gpu_scheduler.c | 24 drivers/gpu/drm/amd/scheduler/gpu_scheduler.h | 1 + 2 files changed, 21 insertions(+), 4 deleti

[PATCH 09/11] drm/amd: hw job list should be exact

2016-08-02 Thread Chunming Zhou
hw job list should be exact, so deleting job node should be in irq handler instead of work thread. And Calculating time of next job should be immediate as well. Change-Id: I6d2686d84be3e7077300df7181c2a284fbcda9eb Signed-off-by: Chunming Zhou Reviewed-by: Edward O'Callaghan --- drivers/gpu/drm/

[PATCH 04/10] drm/amdgpu: abstract amdgpu_bo_create_shadow

2016-08-02 Thread Chunming Zhou
Change-Id: Id0e89f350a05f8668ea00e3fff8c0bd6f3049cec Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 40 -- drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 3 +++ 2 files changed, 30 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/d

[PATCH 01/10] drm/amdgpu: make need_backup generic

2016-08-02 Thread Chunming Zhou
It will be used other place. Change-Id: I213faf16e25a95bef4c45a65ab21f4d61db4ef41 Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu

[PATCH 00/10] GART table recovery

2016-08-02 Thread Chunming Zhou
gart table is stored in one bo which must be ready before gart init, but the shadow bo must be created after gart is ready, so they cannot be created at a same time. shado bo itself aslo is included in gart table, So shadow bo needs a synchronization after device init. After sync, the contents o

[PATCH 07/10] drm/amdgpu: implement gart recovery

2016-08-02 Thread Chunming Zhou
recover gart bo from its shadow bo. Change-Id: Idbb91d62b1c3cf73f7d90b5f2c650f2690e5a42b Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 31 +++ 2 files changed, 32 insertions(+) diff --git

[PATCH 06/10] drm/amdgpu: make recover_bo_from_shadow be generic

2016-08-02 Thread Chunming Zhou
Change-Id: I74758b9ca84058f3f2db5509822d8aad840d283e Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 40 + drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 6 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 48 -- 3

[PATCH 05/10] drm/amdgpu: shadow gart table support

2016-08-02 Thread Chunming Zhou
allocate gart shadow bo, and using shadow bo to backup gart table. Change-Id: Ib2beae9cea1ad1314c57f0fcdcc254816f39b9b2 Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 47 +++- drivers/gpu/d

[PATCH 08/10] drm/amdgpu: recover gart table first when full reset

2016-08-02 Thread Chunming Zhou
Change-Id: Iad7a90646dbb5df930a8ba177ce6bdc48415ff7d Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index b7b4cf8..16ba37d 10

[PATCH 03/10] drm/amdgpu: add gart_late_init/fini to gmc V7/8

2016-08-02 Thread Chunming Zhou
Change-Id: I47b132d1ac5ed57f5805f759d5698948c35721ba Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 24 drivers/gpu/drm/amd/amdgpu/gmc_v8_0.c | 24 2 files changed, 40 insertions(+), 8 deletions(-) diff --git a/drivers/g

[PATCH 09/10] drm/amdgpu: sync gart table before initialization completed

2016-08-02 Thread Chunming Zhou
Since the shadow is in GTT, shadow itslef pte isn't in shadow, We need to do sync before initialization is completed Change-Id: I29b433da6c71fc790a32ef202dd85a72ab6b5787 Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 + drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 4

[PATCH 02/10] drm/amdgpu: implement gart late_init/fini

2016-08-02 Thread Chunming Zhou
add recovery entity to gart. Change-Id: Ieb400c8a731ef25619ea3c0b5198a6e7ce56580e Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_gart.c | 18 ++ 2 files changed, 21 insertions(+) diff --git a/drivers/gpu/drm/

[PATCH 10/10] drm/amdgpu: fix memory leak of sched fence

2016-08-02 Thread Chunming Zhou
amdgpu_job_free_resources is already called by submit_job. If it is called in run_job, the sched fence could be got twice in sa bo free, then memory leak happens. Change-Id: I833612e31cf22b62174f3f76546fd11c9ea38780 Signed-off-by: Chunming Zhou --- drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 2 +-

[PATCH xf86-video-ati] Keep track of damage event related flushes per-client v2

2016-08-02 Thread Michel Dänzer
From: Michel Dänzer This further reduces the compositing slowdown due to flushing overhead, by only flushing when the X server actually sends XDamageNotify events to a client, and there hasn't been a flush yet in the meantime. v2: Use ScreenPrivateKey, fixes invalid memory access with GPU screen

cz_clockpowergating.c powerplay unused functions

2016-08-02 Thread StDenis, Tom
Are there plans for the functions *_phm_*() at the top of cz_clockpowergating.c? They seem to be copy/pasted from other drivers and likewise are not hooked up to anything (nor complete). Tom ___ amd-gfx mailing list amd-gfx@lists.freedesktop.org http

答复: [PATCH v2 3/3] drm/amdgpu: update golden setting of polaris10

2016-08-02 Thread Wang, Ken
Reviewed-by: Ken Wang 发件人: Huang Rui 发送时间: 2016年8月2日 13:23:34 收件人: amd-gfx@lists.freedesktop.org; Deucher, Alexander 抄送: Wang, Ken; Huan, Alvin; Huang, Ray 主题: [PATCH v2 3/3] drm/amdgpu: update golden setting of polaris10 Signed-off-by: Huang Rui --- drivers/g

答复: [PATCH v2 2/3] drm/amdgpu: update golden setting of polaris11

2016-08-02 Thread Wang, Ken
Reviewed-by: Ken Wang 发件人: Huang Rui 发送时间: 2016年8月2日 13:23:33 收件人: amd-gfx@lists.freedesktop.org; Deucher, Alexander 抄送: Wang, Ken; Huan, Alvin; Huang, Ray 主题: [PATCH v2 2/3] drm/amdgpu: update golden setting of polaris11 Signed-off-by: Huang Rui --- drivers/g

答复: [PATCH v2 1/3] drm/amdgpu: update golden setting of tonga

2016-08-02 Thread Wang, Ken
Reviewed-by: Ken Wang 发件人: Huang Rui 发送时间: 2016年8月2日 13:23:32 收件人: amd-gfx@lists.freedesktop.org; Deucher, Alexander 抄送: Wang, Ken; Huan, Alvin; Huang, Ray 主题: [PATCH v2 1/3] drm/amdgpu: update golden setting of tonga Signed-off-by: Huang Rui --- drivers/gpu/d

答复: [PATCH 2/2] drm/amdgpu: use the kernel zone memory size as the max remote memory in amdgpu

2016-08-02 Thread Wang, Ken
Yeah, that's could be an issue, I have changed the logic and send the review again. 发件人: Alex Deucher 发送时间: 2016年8月2日 12:56:07 收件人: Wang, Ken 抄送: amd-gfx list 主题: Re: [PATCH 2/2] drm/amdgpu: use the kernel zone memory size as the max remote memory in amdgpu On

Re: [PATCH 2/2] drm/amdgpu: use the kernel zone memory size as the max remote memory in amdgpu

2016-08-02 Thread Alex Deucher
On Tue, Aug 2, 2016 at 1:19 AM, Ken Wang wrote: > Change-Id: Ibf193cc2d9e20c3aefa1ce8ff24241dfbb6768ff > Signed-off-by: Ken Wang > --- > drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++ > drivers/gpu/drm/amd/amdgpu/amdgpu_ttm.c | 12 +++- > drivers/gpu/drm/amd/amdgpu/gmc_v7_0.c | 7 ++

RE: [PATCH] Add freesync ioctl interface

2016-08-02 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Zhang, Hawking > Sent: Tuesday, August 02, 2016 12:14 AM > To: Michel Dänzer > Cc: amd-gfx@lists.freedesktop.org > Subject: RE: [PATCH] Add freesync ioctl interface > > The kernel branch has

Re: [PATCH 00/10] GART table recovery

2016-08-02 Thread Christian König
Well you have been hardworking during my vacation :) Looks pretty good to me, but hope that I can get a closer look tomorrow. Is there any particular order the three sets must be applied? Regards, Christian. Am 02.08.2016 um 10:00 schrieb Chunming Zhou: gart table is stored in one bo which mu

Re: [PATCH 1/2] drm/ttm: add interface to export kernel_zone max memory size in ttm

2016-08-02 Thread Christian König
Am 02.08.2016 um 06:57 schrieb Alex Deucher: On Wed, Jul 27, 2016 at 7:21 AM, Ken Wang wrote: Change-Id: I9f30b54365492b234a7f0887dd0c67a9817c3705 Signed-off-by: Ken Wang Adding dri-devel as well since ttm is a common component. Reviewed-by: Alex Deucher A bit commit message would be nice

Re: status of MST ?

2016-08-02 Thread Kenneth Johansson
On 2016-08-01 18:25, Alex Deucher wrote: On Mon, Aug 1, 2016 at 12:17 PM, Kenneth Johansson wrote: On 2016-08-01 17:12, Alex Deucher wrote: On Fri, Jul 29, 2016 at 8:51 AM, Kenneth Johansson wrote: I have a 30" Dell MST monitor and It only uses 30HZ refresh rate when I use my R9 card. both t

Re: [PATCH] Add freesync ioctl interface

2016-08-02 Thread Dave Airlie
On 2 August 2016 at 12:26, Hawking Zhang wrote: > Change-Id: I38cb3a80e75a904cee875ae47bc0a39a3d471aca > Signed-off-by: Hawking Zhang > --- > include/drm/amdgpu_drm.h | 15 +++ > 1 file changed, 15 insertions(+) > > diff --git a/include/drm/amdgpu_drm.h b/include/drm/amdgpu_drm.h > i

Re: [PATCH 00/10] GART table recovery

2016-08-02 Thread zhoucm1
On 2016年08月02日 23:15, Christian König wrote: Well you have been hardworking during my vacation :) Looks pretty good to me, but hope that I can get a closer look tomorrow. Is there any particular order the three sets must be applied? they are depending on my development order: 1. [PATCH 00/13