Re: [PATCH 0/2] drm/amd/amdgpu: locking fixes

2017-01-10 Thread Edward O'Callaghan
this series is, Reviewed-by: Edward O'Callaghan On 01/11/2017 06:31 PM, Nicolai Hähnle wrote: > Hi all, > > two fixes for locking issues that I noticed. > > The first one is something that I actually encountered live; it probably > only matters when lock debugging

[PATCH 1/2] drm/amd/amdgpu: lock reservation object while creating shadow bo

2017-01-10 Thread Nicolai Hähnle
From: Nicolai Hähnle ttm_bo_init checks that the reservation object is locked. This is the caller's responsibility when resv != NULL. Otherwise, the inline reservation object of the newly allocated buffer is used and must explicitly be locked. Using a trylock is fine,

[PATCH 0/2] drm/amd/amdgpu: locking fixes

2017-01-10 Thread Nicolai Hähnle
Hi all, two fixes for locking issues that I noticed. The first one is something that I actually encountered live; it probably only matters when lock debugging is enabled, but obviously needs to be fixed anyway. The second one I only noticed upon reading the code -- I haven't seen it fail live

[PATCH 2/2] drm/amd/amdgpu: fix locking in bo creation error path

2017-01-10 Thread Nicolai Hähnle
From: Nicolai Hähnle Unlock the resv lock only if we were the ones to lock it in the first place. Signed-off-by: Nicolai Hähnle --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git

Re: amdgpu_pm_info small nit

2017-01-10 Thread Huang Rui
On Wed, Jan 11, 2017 at 03:01:12AM +0800, StDenis, Tom wrote: > Hi Ray, > > > Small nit but I saw this in the output > > > + {AMD_CG_SUPPORT_GFX_CGTS, "Graphics Coarse Grain Tree Shader Light > Sleep"}, > + {AMD_CG_SUPPORT_GFX_CGTS_LS, "Graphics Coarse Grain Tree Shader Light >

[PATCH] drm/amdgpu: fix vm_fault_stop on gfx6

2017-01-10 Thread Flora Cui
Change-Id: I9fcdb4bc69e5f5c80eadb1e5fd31570802b0ce70 Signed-off-by: Flora Cui --- drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c | 23 +-- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v6_0.c

[PATCH 2/2] drm/amdgpu: fix program vce instance logic error.

2017-01-10 Thread Rex Zhu
need to clear bit31-29 in GRBM_GFX_INDEX, then the program can be valid. Change-Id: I6f59b4fd53b4a1ea00c60139924cfaffd0cfe968 Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 25 - 1 file changed, 16 insertions(+), 9 deletions(-) diff

[PATCH 1/2] drm/amdgpu: fix bug set incorrect value to vce register

2017-01-10 Thread Rex Zhu
Change-Id: I1495894d01ca10e5d496e71f5d4b1a93a12336f3 Signed-off-by: Rex Zhu --- drivers/gpu/drm/amd/amdgpu/vce_v3_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c b/drivers/gpu/drm/amd/amdgpu/vce_v3_0.c index

答复: [V2 04/11] drm/amdgpu/virt: use kiq to access registers

2017-01-10 Thread Liu, Monk
> + mutex_lock(>virt.lock); > + amdgpu_ring_alloc(ring, 32); > + amdgpu_ring_emit_hdp_flush(ring); > + amdgpu_ring_emit_rreg(ring, reg); > + amdgpu_ring_emit_hdp_invalidate(ring); > + amdgpu_fence_emit(ring, ); > + fence_get(f); > + amdgpu_ring_commit(ring); > +

[PATCH 2/3] drm/amdgpu:add new file for SRIOV

2017-01-10 Thread Monk Liu
for SRIOV usage, CSA is only used per device and each VM will map on it. Change-Id: Ibc63d87be59d7d89b96117e4d1b7e970a872580d Signed-off-by: Monk Liu --- drivers/gpu/drm/amd/amdgpu/Makefile | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 95

[PATCH 3/3] drm/amdgpu:invoke CSA functions

2017-01-10 Thread Monk Liu
Change-Id: I528c2f324830aaa21ab8d8250bc80a2a6bab33bd Signed-off-by: Monk Liu --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 14 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 12 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c| 11 +++

答复: [V2 04/11] drm/amdgpu/virt: use kiq to access registers

2017-01-10 Thread Liu, Monk
> + fence_get(f); > + amdgpu_ring_commit(ring); > + mutex_unlock(>virt.lock); > + > + r = fence_wait(f, false); > + fence_put(f); Why do you grab and release an extra fence reference here? Christian. [ML] e.g. without those grab/release pare, if fence is signaled right

[PATCH 1/3] drm/amdgpu:new field members for SRIOV

2017-01-10 Thread Monk Liu
and implement CSA functions in this file Change-Id: Ife0eff7b13b8b5946f005a39f6ecb8db1cb72c38 Signed-off-by: Monk Liu --- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 8 drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 3 +++ 2 files changed, 11 insertions(+) diff --git

[PATCH 0/3] CSA patches

2017-01-10 Thread Monk Liu
*** BLURB HERE *** Monk Liu (3): drm/amdgpu:new field members for SRIOV drm/amdgpu:add new file for SRIOV drm/amdgpu:invoke CSA functions drivers/gpu/drm/amd/amdgpu/Makefile| 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 14 + drivers/gpu/drm/amd/amdgpu/amdgpu_device.c |

[PATCH] drm/amdgpu: fix typo of CGTS

2017-01-10 Thread Huang Rui
Fixes: 9e8590861e9 ('drm/amdgpu: add parse clock gating state') Reported-by: Tom StDenis Signed-off-by: Huang Rui --- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

RE: [PATCH] drm/amd/powerplay: fix vce cg logic error.

2017-01-10 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Rex Zhu > Sent: Tuesday, January 10, 2017 6:43 AM > To: amd-gfx@lists.freedesktop.org > Cc: Zhu, Rex > Subject: [PATCH] drm/amd/powerplay: fix vce cg logic error. > > can fix Bug 191281: vce

RE: [PATCH] drm/amd/powerplay: refine vce dpm update code on Cz.

2017-01-10 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Rex Zhu > Sent: Tuesday, January 10, 2017 8:28 AM > To: amd-gfx@lists.freedesktop.org > Cc: Zhu, Rex > Subject: [PATCH] drm/amd/powerplay: refine vce dpm update code on Cz. > > Program

amdgpu_pm_info small nit

2017-01-10 Thread StDenis, Tom
Hi Ray, Small nit but I saw this in the output + {AMD_CG_SUPPORT_GFX_CGTS, "Graphics Coarse Grain Tree Shader Light Sleep"}, + {AMD_CG_SUPPORT_GFX_CGTS_LS, "Graphics Coarse Grain Tree Shader Light Sleep"}, The first you probably want to remove "Light Sleep" from otherwise the

Re: [PATCH] drm/amd/display: drop min/max wrappers

2017-01-10 Thread Harry Wentland
Reviewed-by: Harry Wentland On 2017-01-09 08:36 PM, Edward O'Callaghan wrote: Reviewed-by: Edward O'Callaghan On 01/10/2017 09:35 AM, Dave Airlie wrote: From: Dave Airlie These aren't needed, and aren't really used

Re: [PATCH] drm/amd/display: start using linux hdmi header

2017-01-10 Thread Harry Wentland
On 2017-01-10 10:20 AM, Cheng, Tony wrote: Ack. Just give Harry a few days to do the require work to make sure everything still work with our other OS / environments. Reviewed-by: Harry Wentland You should see this land in Alex's public tree in a few days. Harry

RE: [V2 02/11] drm/amdgpu/gfx8: implement emit_rreg/wreg function

2017-01-10 Thread Yu, Xiangliang
> -Original Message- > From: Deucher, Alexander > Sent: Tuesday, January 10, 2017 11:35 PM > To: Yu, Xiangliang ; amd- > g...@lists.freedesktop.org > Cc: Yu, Xiangliang > Subject: RE: [V2 02/11] drm/amdgpu/gfx8: implement emit_rreg/wreg >

RE: [V2 10/11] drm/amdgpu/virt: disable dc

2017-01-10 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Xiangliang Yu > Sent: Tuesday, January 10, 2017 5:01 AM > To: amd-gfx@lists.freedesktop.org > Cc: Yu, Xiangliang > Subject: [V2 10/11] drm/amdgpu/virt: disable dc > > Virtualization don't

RE: [V2 09/11] drm/amdgpu/virt: enable virtual display

2017-01-10 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Xiangliang Yu > Sent: Tuesday, January 10, 2017 5:01 AM > To: amd-gfx@lists.freedesktop.org > Cc: Yu, Xiangliang > Subject: [V2 09/11] drm/amdgpu/virt: enable virtual display > > Virtual

RE: [V2 08/11] drm/amdgpu/vi: add support virtualization

2017-01-10 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Xiangliang Yu > Sent: Tuesday, January 10, 2017 5:01 AM > To: amd-gfx@lists.freedesktop.org > Cc: Yu, Xiangliang > Subject: [V2 08/11] drm/amdgpu/vi: add support virtualization > > Call VI

RE: [V2 07/11] drm/amdgpu: request/release full gpu access if device is vf

2017-01-10 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Xiangliang Yu > Sent: Tuesday, January 10, 2017 5:01 AM > To: amd-gfx@lists.freedesktop.org > Cc: Yu, Xiangliang > Subject: [V2 07/11] drm/amdgpu: request/release full gpu access if device is

RE: [V2 06/11] drm/amdgpu/virt: implement VI virt operation interfaces

2017-01-10 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Xiangliang Yu > Sent: Tuesday, January 10, 2017 5:01 AM > To: amd-gfx@lists.freedesktop.org > Cc: Yu, Xiangliang > Subject: [V2 06/11] drm/amdgpu/virt: implement VI virt operation interfaces

RE: [V2 05/11] drm/amdgpu/virt: add high level interfaces for virt

2017-01-10 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Xiangliang Yu > Sent: Tuesday, January 10, 2017 5:01 AM > To: amd-gfx@lists.freedesktop.org > Cc: Yu, Xiangliang > Subject: [V2 05/11] drm/amdgpu/virt: add high level interfaces for virt > >

RE: [V2 02/11] drm/amdgpu/gfx8: implement emit_rreg/wreg function

2017-01-10 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Xiangliang Yu > Sent: Tuesday, January 10, 2017 5:01 AM > To: amd-gfx@lists.freedesktop.org > Cc: Yu, Xiangliang > Subject: [V2 02/11] drm/amdgpu/gfx8: implement emit_rreg/wreg function > >

RE: [V2 03/11] drm/amdgpu/virt: add runtime flag

2017-01-10 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Xiangliang Yu > Sent: Tuesday, January 10, 2017 5:01 AM > To: amd-gfx@lists.freedesktop.org > Cc: Yu, Xiangliang > Subject: [V2 03/11] drm/amdgpu/virt: add runtime flag > > Add new flag to

RE: [V2 11/11] drm/amdgpu: do not reset gpu for virtualization

2017-01-10 Thread Deucher, Alexander
> -Original Message- > From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf > Of Yu, Xiangliang > Sent: Tuesday, January 10, 2017 8:36 AM > To: Christian König; amd-gfx@lists.freedesktop.org > Cc: Liu, Monk > Subject: RE: [V2 11/11] drm/amdgpu: do not reset gpu for

RE: [PATCH] drm/amd/display: start using linux hdmi header

2017-01-10 Thread Cheng, Tony
Ack. Just give Harry a few days to do the require work to make sure everything still work with our other OS / environments. -Original Message- From: amd-gfx [mailto:amd-gfx-boun...@lists.freedesktop.org] On Behalf Of Dave Airlie Sent: Monday, January 9, 2017 6:34 PM To:

RE: [V2 05/11] drm/amdgpu/virt: add high level interfaces for virt

2017-01-10 Thread Yu, Xiangliang
> -Original Message- > From: Christian König [mailto:deathsim...@vodafone.de] > Sent: Tuesday, January 10, 2017 9:59 PM > To: Yu, Xiangliang ; amd- > g...@lists.freedesktop.org > Subject: Re: [V2 05/11] drm/amdgpu/virt: add high level interfaces for virt > > Am

RE: [V2 06/11] drm/amdgpu/virt: implement VI virt operation interfaces

2017-01-10 Thread Yu, Xiangliang
> -Original Message- > From: Christian König [mailto:deathsim...@vodafone.de] > Sent: Tuesday, January 10, 2017 10:06 PM > To: Yu, Xiangliang ; amd- > g...@lists.freedesktop.org > Subject: Re: [V2 06/11] drm/amdgpu/virt: implement VI virt operation > interfaces > >

RE: [V2 04/11] drm/amdgpu/virt: use kiq to access registers

2017-01-10 Thread Yu, Xiangliang
> -Original Message- > From: Christian König [mailto:deathsim...@vodafone.de] > Sent: Tuesday, January 10, 2017 10:08 PM > To: Yu, Xiangliang ; amd- > g...@lists.freedesktop.org > Subject: Re: [V2 04/11] drm/amdgpu/virt: use kiq to access registers > > Am 10.01.2017

Re: [V2 04/11] drm/amdgpu/virt: use kiq to access registers

2017-01-10 Thread Christian König
Am 10.01.2017 um 15:01 schrieb Yu, Xiangliang: -Original Message- From: Christian König [mailto:deathsim...@vodafone.de] Sent: Tuesday, January 10, 2017 9:09 PM To: Yu, Xiangliang ; amd- g...@lists.freedesktop.org Subject: Re: [V2 04/11] drm/amdgpu/virt: use kiq to

Re: [V2 06/11] drm/amdgpu/virt: implement VI virt operation interfaces

2017-01-10 Thread Christian König
Am 10.01.2017 um 14:43 schrieb Yu, Xiangliang: -Original Message- From: Christian König [mailto:deathsim...@vodafone.de] Sent: Tuesday, January 10, 2017 9:30 PM To: Yu, Xiangliang ; amd- g...@lists.freedesktop.org Subject: Re: [V2 06/11] drm/amdgpu/virt: implement

RE: [V2 04/11] drm/amdgpu/virt: use kiq to access registers

2017-01-10 Thread Yu, Xiangliang
> -Original Message- > From: Christian König [mailto:deathsim...@vodafone.de] > Sent: Tuesday, January 10, 2017 9:09 PM > To: Yu, Xiangliang ; amd- > g...@lists.freedesktop.org > Subject: Re: [V2 04/11] drm/amdgpu/virt: use kiq to access registers > > Am 10.01.2017

Re: [V2 05/11] drm/amdgpu/virt: add high level interfaces for virt

2017-01-10 Thread Christian König
Am 10.01.2017 um 14:33 schrieb Yu, Xiangliang: -Original Message- From: Christian König [mailto:deathsim...@vodafone.de] Sent: Tuesday, January 10, 2017 9:12 PM To: Yu, Xiangliang ; amd- g...@lists.freedesktop.org Subject: Re: [V2 05/11] drm/amdgpu/virt: add high

RE: [V2 06/11] drm/amdgpu/virt: implement VI virt operation interfaces

2017-01-10 Thread Yu, Xiangliang
> -Original Message- > From: Christian König [mailto:deathsim...@vodafone.de] > Sent: Tuesday, January 10, 2017 9:30 PM > To: Yu, Xiangliang ; amd- > g...@lists.freedesktop.org > Subject: Re: [V2 06/11] drm/amdgpu/virt: implement VI virt operation > interfaces > >

RE: [V2 11/11] drm/amdgpu: do not reset gpu for virtualization

2017-01-10 Thread Yu, Xiangliang
> -Original Message- > From: Christian König [mailto:deathsim...@vodafone.de] > Sent: Tuesday, January 10, 2017 9:19 PM > To: Yu, Xiangliang ; amd- > g...@lists.freedesktop.org > Cc: Liu, Monk > Subject: Re: [V2 11/11] drm/amdgpu: do not reset gpu

RE: [V2 06/11] drm/amdgpu/virt: implement VI virt operation interfaces

2017-01-10 Thread Yu, Xiangliang
> -Original Message- > From: Christian König [mailto:deathsim...@vodafone.de] > Sent: Tuesday, January 10, 2017 9:16 PM > To: Yu, Xiangliang ; amd- > g...@lists.freedesktop.org > Subject: Re: [V2 06/11] drm/amdgpu/virt: implement VI virt operation > interfaces > >

Re: [V2 06/11] drm/amdgpu/virt: implement VI virt operation interfaces

2017-01-10 Thread Christian König
Am 10.01.2017 um 14:20 schrieb Yu, Xiangliang: -Original Message- From: Christian König [mailto:deathsim...@vodafone.de] Sent: Tuesday, January 10, 2017 9:16 PM To: Yu, Xiangliang ; amd- g...@lists.freedesktop.org Subject: Re: [V2 06/11] drm/amdgpu/virt: implement

Re: [V2 06/11] drm/amdgpu/virt: implement VI virt operation interfaces

2017-01-10 Thread Christian König
Unrelated to the patch, but what editor and settings do you use? See this code for example + reg = REG_SET_FIELD(reg, MAILBOX_CONTROL, +TRN_MSG_VALID, val ? 1 : 0); The indentation seems to be incorrect. Not much of a problem, but if we add this like it

Re: [V2 05/11] drm/amdgpu/virt: add high level interfaces for virt

2017-01-10 Thread Christian König
Am 10.01.2017 um 11:00 schrieb Xiangliang Yu: Add high level interfaces that is not relate to specific asic. So asic files just need to implement the interfaces to support virtualization. Signed-off-by: Xiangliang Yu --- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 57

Re: [V2 04/11] drm/amdgpu/virt: use kiq to access registers

2017-01-10 Thread Christian König
Am 10.01.2017 um 11:00 schrieb Xiangliang Yu: For virtualization, it is must for driver to use KIQ to access registers when it is out of GPU full access mode. Signed-off-by: Xiangliang Yu --- drivers/gpu/drm/amd/amdgpu/Makefile| 2 +-

Re: 答复: 答复: [PATCH 2/7] drm/amdgpu:new field members for SRIOV

2017-01-10 Thread Christian König
NAH, for AI/VI the gds_addr is the bottom half of CSA area (8kb), but we don't know for later chips ... In this case we shouldn't store the offset anywhere, but rather just calculate it in the chip specific code from the CSA address when it is needed. I prefer keep a member field in the

Re: 答复: 答复: [PATCH 7/7] drm/amdgpu:map/unmap static csa accordingly

2017-01-10 Thread Christian König
Do you suggest that rip out of amdgpu_map_csa() routine totally, Yes, mapping the CSA is not something specific to virtualization, so we shouldn't put that into amdgpu_virt.c. and manually call "amdgpu_vm_bo_map" as well as "amdgpu_vm_bo_update" in sequence in "amdgpu_vm_bo_update" ? No,

[PATCH] drm/amd/powerplay: fix vce cg logic error.

2017-01-10 Thread Rex Zhu
can fix Bug 191281: vce ib test failed. when vce idle, set vce clock gate, so the clock in vce domain will be disabled. when need to encode, disable vce clock gate, enable the clocks to vce engine. Change-Id: Ic60eced7be0c1e09faca596d39ebdfde244657a2 Signed-off-by: Rex Zhu ---

[PATCH 4/4] drm/amdgpu:without unmap_csa, we need manually do cleanup

2017-01-10 Thread Monk Liu
free bo_va and put fence right before VM finish Change-Id: I56967e424c888c0df0b12c522e6720a1d11ab790 Signed-off-by: Monk Liu --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c

[PATCH 0/3] static CSA patches

2017-01-10 Thread Monk Liu
allocate/deallocate static CSA per device and map CSA per VM no need to unmap CSA when VM die. *** BLURB HERE *** Monk Liu (3): drm/amdgpu:new field members for SRIOV drm/amdgpu:add new file for SRIOV drm/amdgpu:invoke CSA functions drivers/gpu/drm/amd/amdgpu/Makefile| 2 +-

[PATCH 3/3] drm/amdgpu:invoke CSA functions

2017-01-10 Thread Monk Liu
Change-Id: I110af93c4f17ab18d1be199c6ebe9ee965483a66 Signed-off-by: Monk Liu --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 14 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 12 drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c| 6 ++

[PATCH 2/3] drm/amdgpu:add new file for SRIOV

2017-01-10 Thread Monk Liu
for SRIOV usage, CSA is only used per device and each VM will map on it. Change-Id: Ibc63d87be59d7d89b96117e4d1b7e970a872580d Signed-off-by: Monk Liu --- drivers/gpu/drm/amd/amdgpu/Makefile | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 105

[PATCH 1/3] drm/amdgpu:new field members for SRIOV

2017-01-10 Thread Monk Liu
and implement CSA functions in this file Change-Id: Ife0eff7b13b8b5946f005a39f6ecb8db1cb72c38 Signed-off-by: Monk Liu --- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 14 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_vm.h | 2 ++ 2 files changed, 16 insertions(+) diff

答复: [V2 11/11] drm/amdgpu: do not reset gpu for virtualization

2017-01-10 Thread Liu, Monk
Xiangliang, the comments of yours is a little inappropriate, please change the comments to something like: amdgpu_gpu_reset() only works on bare-metal case and for SRIOV many inside it need re-work to adapt to VF device so currently just don't do it. 发件人:

答复: [PATCH 6/7] drm/amdgpu:alloc/dealloc csa accordingly

2017-01-10 Thread Liu, Monk
Yeah, make sense thanks BR Monk 发件人: Nils Wallménius 发送时间: 2017年1月10日 15:56:36 收件人: Liu, Monk 抄送: amd-gfx@lists.freedesktop.org 主题: Re: [PATCH 6/7] drm/amdgpu:alloc/dealloc csa accordingly Hi Monk, a comment below. Den 9 jan.

答复: 答复: [PATCH 2/7] drm/amdgpu:new field members for SRIOV

2017-01-10 Thread Liu, Monk
NAH, for AI/VI the gds_addr is the bottom half of CSA area (8kb), but we don't know for later chips ... I prefer keep a member field in the struct for flexibility ... regards with put those member into amdgpu_vm structure, if you really prefer that way I'm fine by moving them, not too

[V2 04/11] drm/amdgpu/virt: use kiq to access registers

2017-01-10 Thread Xiangliang Yu
For virtualization, it is must for driver to use KIQ to access registers when it is out of GPU full access mode. Signed-off-by: Xiangliang Yu --- drivers/gpu/drm/amd/amdgpu/Makefile| 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 6 +++

[V2 08/11] drm/amdgpu/vi: add support virtualization

2017-01-10 Thread Xiangliang Yu
Call VI virtualization functions if device is Vf. Signed-off-by: Xiangliang Yu --- drivers/gpu/drm/amd/amdgpu/vi.c | 34 -- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/vi.c

[V2 11/11] drm/amdgpu: do not reset gpu for virtualization

2017-01-10 Thread Xiangliang Yu
Current job timeout setting is not fit for virtualization, so it will cause job timeout sometimes. Add workaround for this when timeout happen. Signed-off-by: Monk Liu Signed-off-by: Xiangliang Yu --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++

RE: [PATCH 1/4] drm/amd/powerplay: Configuring DIDT blocks only SQ enabled on Polaris11.

2017-01-10 Thread Zhu, Rex
Hi Alex, >>> This will set the caps on Polaris10 as well? Intended? Rex: Yes, Currently, New didt messages were only supported on Polaris11. Best Regards Rex -Original Message- From: Deucher, Alexander Sent: Monday, January 09, 2017 10:12 PM To: Zhu, Rex;

[V2 10/11] drm/amdgpu/virt: disable dc

2017-01-10 Thread Xiangliang Yu
Virtualization don't need the dc, disable it. Signed-off-by: Xiangliang Yu --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index

[V2 03/11] drm/amdgpu/virt: add runtime flag

2017-01-10 Thread Xiangliang Yu
Add new flag to define gpu runtime that is out of full gpu access. Signed-off-by: Xiangliang Yu --- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 4 1 file changed, 4 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h

[V2 07/11] drm/amdgpu: request/release full gpu access if device is vf

2017-01-10 Thread Xiangliang Yu
For gpu vf device, first need to request full gpu access before accessing gpu registers, and release full gpu access after the access is done. Signed-off-by: Xiangliang Yu --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 +

[V2 09/11] drm/amdgpu/virt: enable virtual display

2017-01-10 Thread Xiangliang Yu
Virtual display is default setting for virtualization, enable it. Signed-off-by: Xiangliang Yu --- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c

[V2 02/11] drm/amdgpu/gfx8: implement emit_rreg/wreg function

2017-01-10 Thread Xiangliang Yu
Implement emit_rreg/wreg function for kiq ring. Signed-off-by: Xiangliang Yu --- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 3 ++- drivers/gpu/drm/amd/amdgpu/gfx_v8_0.c| 37 2 files changed, 39 insertions(+), 1 deletion(-) diff --git

[V2 06/11] drm/amdgpu/virt: implement VI virt operation interfaces

2017-01-10 Thread Xiangliang Yu
VI has asic specific virt support, which including mailbox and golden registers init. Signed-off-by: Xiangliang Yu --- drivers/gpu/drm/amd/amdgpu/Makefile | 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.h | 3 + drivers/gpu/drm/amd/amdgpu/mxgpu_vi.c| 592

[V2 01/11] drm/amdgpu/ring: add two interfaces to support r/w registers with kiq

2017-01-10 Thread Xiangliang Yu
During virtual runtime, need to send command to kiq ring to read/write GPU registers. Add two interface to support the two actions. Signed-off-by: Xiangliang Yu --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_ring.h | 2 ++ 2 files

[V2 00/11] Add support AMD GPU virtualization soultion

2017-01-10 Thread Xiangliang Yu
This patch series will enable AMD GPU virtualization and wires it into amdgpu modules. Changes in V2: 1. define new high level interface for non-asic specific; 2. add asic specific file to support specific asic; 3. not include KIQ patch as it has been merged into kernel; 4. not include CSA patch

[V2 05/11] drm/amdgpu/virt: add high level interfaces for virt

2017-01-10 Thread Xiangliang Yu
Add high level interfaces that is not relate to specific asic. So asic files just need to implement the interfaces to support virtualization. Signed-off-by: Xiangliang Yu --- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 57

答复: 答复: [PATCH 7/7] drm/amdgpu:map/unmap static csa accordingly

2017-01-10 Thread Liu, Monk
then what about "amdgpu_vm_bo_map" ? we need call it first before call "amdgpu_vm_bo_update" in "amdgpu_bo_vm_update_pte" , correct ? otherwise we even not create PT bo for the CSA ... Do you suggest that rip out of amdgpu_map_csa() routine totally, and manually call "amdgpu_vm_bo_map" as

Re: 答复: [PATCH 2/7] drm/amdgpu:new field members for SRIOV

2017-01-10 Thread Christian König
Am 10.01.2017 um 04:03 schrieb Liu, Monk: > + /* virtual MC address of CSA & GDS for each VM */ > + uint64_t vm_csa_addr; > + uint64_t vm_gds_addr; That should be constant, shouldn't it? [ML] do you mean "const uint64_t vm_csa_addr" ? of cause not if that's your point ...

Re: 答复: [PATCH 2/7] drm/amdgpu:new field members for SRIOV

2017-01-10 Thread Christian König
We don't need the validate buffer and even when you need it putting it into the VM structure is illegal, because it can be used by more than one thread at the same time. This leaves only the csa_bo_va in the amdgpu_vm_virt structure and having a structure with only one field is rather

Re: 答复: [PATCH 7/7] drm/amdgpu:map/unmap static csa accordingly

2017-01-10 Thread Christian König
Adding the BO and it's mapping is VM specific code, we should initialize that directly in amdgpu_vm_init() and not call any helper to delegate the work. Especially don't call from the VM code into the virt code and back into the VM code. If you really want to keep that in amdgpu_virt. an