[PATCH 4/6] drm/amdkfd: Use array to probe kfd2kgd_calls

2019-09-27 Thread Zhao, Yong
This is the same idea as the kfd device info probe and move all the probe control together for easy maintenance. Change-Id: I85c98bb08eb2a4a1a80c3b913c32691cc74602d1 Signed-off-by: Yong Zhao --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd.c| 65 +--

[PATCH 5/6] drm/amdgpu: Add the HDP flush support for Navi

2019-09-27 Thread Zhao, Yong
The HDP flush support code was missing in the nbio and nv files. Change-Id: I046ff52567676b56bf16dc1728b02481233acb61 Signed-off-by: Yong Zhao --- drivers/gpu/drm/amd/amdgpu/nbio_v2_3.c | 16 +--- drivers/gpu/drm/amd/amdgpu/nv.c| 9 + 2 files changed, 22

[PATCH 6/6] drm/amdkfd: Improve KFD IOCTL printing

2019-09-27 Thread Zhao, Yong
The code use hex define, so should the printing. Also, printf a message if there is a failure. Change-Id: Ia7cc7690553bb043915b3d8c0157216c64421a60 Signed-off-by: Yong Zhao --- drivers/gpu/drm/amd/amdkfd/kfd_chardev.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git

[PATCH 3/6] drm/amdkfd: Delete unnecessary function declarations

2019-09-27 Thread Zhao, Yong
Ajust the function sequences so that those function delcarations are not needed any more. Change-Id: I3a270ade7ac380cd083e90611177d7a45249823f Signed-off-by: Yong Zhao --- .../drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c| 115 + .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 118

[PATCH 1/6] drm/amdkfd: Update parameter type of pasid to uint16_t

2019-09-27 Thread Zhao, Yong
This is consistent with other code and registers in the code. Change-Id: I04dd12bdb465a43cfcd8936ed0f227a6546830e8 Signed-off-by: Yong Zhao --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c| 4 ++-- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 4 ++--

[PATCH 2/6] drm/amdgpu: Delete useless header file reference

2019-09-27 Thread Zhao, Yong
Those header file includes are not needed. Change-Id: I44aa7e4d0391f9b2c2be757765c1437b603688ae Signed-off-by: Yong Zhao --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v10.c | 6 -- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gfx_v7.c | 2 --

[PATCH] drm/amdgpu: Export setup_vm_pt_regs() logic for mmhub 2.0

2019-09-27 Thread Zhao, Yong
The KFD code will call this function later. Change-Id: I5993323603799963e9eb473852b6c72de2172ed6 Signed-off-by: Yong Zhao --- drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.c | 19 --- drivers/gpu/drm/amd/amdgpu/mmhub_v2_0.h | 2 ++ 2 files changed, 14 insertions(+), 7 deletions(-)

Re: [PATCH 3/6] drm/amdgpu/dm/mst: Use ->atomic_best_encoder

2019-09-27 Thread Alex Deucher
On Fri, Sep 27, 2019 at 1:56 PM Harry Wentland wrote: > > On 2019-09-26 6:51 p.m., Lyude Paul wrote: > > We are supposed to be atomic after all. We'll need this in a moment for > > the next commit. > > > > Signed-off-by: Lyude Paul > > Reviewed-by: Harry Wentland > Applied. Thanks! Alex >

Re: [PATCH 1/6] drm/amdgpu/dm/mst: Don't create MST topology managers for eDP ports

2019-09-27 Thread Alex Deucher
On Fri, Sep 27, 2019 at 1:48 PM Harry Wentland wrote: > > On 2019-09-26 6:51 p.m., Lyude Paul wrote: > > Signed-off-by: Lyude Paul > > Reviewed-by: Harry Wentland > Applied. Thanks! Alex > Harry > > > --- > > drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 4 > > 1 file

Re: [PATCH 3/6] drm/amdgpu/dm/mst: Use ->atomic_best_encoder

2019-09-27 Thread Harry Wentland
On 2019-09-26 6:51 p.m., Lyude Paul wrote: > We are supposed to be atomic after all. We'll need this in a moment for > the next commit. > > Signed-off-by: Lyude Paul Reviewed-by: Harry Wentland Harry > --- > .../drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c| 10 +- > 1 file

Re: [PATCH v2] drm/amdgpu: fix multiple memory leaks

2019-09-27 Thread Markus Elfring
> v2: moved the released into goto error handlings A better version comment should be moved below the triple dashes. Will the tag “Fixes” be added? > @@ -393,6 +395,16 @@ static int acp_hw_init(void *handle) > val &= ~ACP_SOFT_RESET__SoftResetAud_MASK; >

Re: [PATCH 5/6] drm/amdgpu/dm/mst: Report possible_crtcs incorrectly, for now

2019-09-27 Thread Sean Paul
On Thu, Sep 26, 2019 at 06:51:07PM -0400, Lyude Paul wrote: > This commit is seperate from the previous one to make it easier to > revert in the future. Basically, there's multiple userspace applications > that interpret possible_crtcs very wrong: > >

Re: [PATCH v2 27/27] drm/dp_mst: Add topology ref history tracking for debugging

2019-09-27 Thread Sean Paul
On Tue, Sep 03, 2019 at 04:46:05PM -0400, Lyude Paul wrote: > For very subtle mistakes with topology refs, it can be rather difficult > to trace them down with the debugging info that we already have. I had > one such issue recently while trying to implement suspend/resume > reprobing for MST, and

RE: [PATCH] drm/amdkfd: fix kgd2kfd_device_init() definition conflict error

2019-09-27 Thread Kasiviswanathan, Harish
Sorry missed it too. Thanks for fixing it. Best Regards, Harish -Original Message- From: Kuehling, Felix Sent: Friday, September 27, 2019 10:19 AM To: Liang, Prike ; amd-gfx@lists.freedesktop.org Cc: Kasiviswanathan, Harish ; Huang, Ray Subject: Re: [PATCH] drm/amdkfd: fix

Re: [PATCH] drm/amdgpu: return tcc_disabled_mask to userspace

2019-09-27 Thread Alex Deucher
On Wed, Sep 25, 2019 at 5:05 PM Marek Olšák wrote: > > I think TCCs are global, because all memory traffic from gfx engines+cp+sdma > has to go through TCCs, e.g. memory requests from different SEs accessing the > same memory address go to the same TCC. > I verified with the hw team. You

Re: [PATCH v2 26/27] drm/dp_mst: Also print unhashed pointers for malloc/topology references

2019-09-27 Thread Sean Paul
On Tue, Sep 03, 2019 at 04:46:04PM -0400, Lyude Paul wrote: > Currently we only print mstb/port pointer addresses in our malloc and > topology refcount functions using the hashed-by-default %p, but > unfortunately if you're trying to debug a use-after-free error caused by > a refcounting error

Re: [PATCH 2/2] drm/amd/powerplay: add sensor lock support for smu

2019-09-27 Thread Deucher, Alexander
That might be easier for swSMU as well since this is generally not performance sensitive. Alex From: Quan, Evan Sent: Thursday, September 26, 2019 9:18 PM To: Deucher, Alexander ; Wang, Kevin(Yang) ; amd-gfx@lists.freedesktop.org Cc: Huang, Ray ; Feng,

Re: [PATCH] drm/amdkfd: fix kgd2kfd_device_init() definition conflict error

2019-09-27 Thread Kuehling, Felix
On 2019-09-27 0:33, Liang, Prike wrote: > The patch c670707 drm/amd: Pass drm_device to kfd introduced this issue and > fix the following compiler error. > >CC [M] drivers/gpu/drm/amd/amdgpu//../powerplay/smumgr/fiji_smumgr.o > drivers/gpu/drm/amd/amdgpu//amdgpu_amdkfd.c:746:6: error:

Re: [PATCH 3/6] drm/amdgpu/dm/mst: Use ->atomic_best_encoder

2019-09-27 Thread Alex Deucher
On Thu, Sep 26, 2019 at 6:52 PM Lyude Paul wrote: > > We are supposed to be atomic after all. We'll need this in a moment for > the next commit. > > Signed-off-by: Lyude Paul Acked-by: Alex Deucher > --- > .../drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c| 10 +- > 1 file

Re: [PATCH 2/6] drm/amdgpu/dm/mst: Remove unnecessary NULL check

2019-09-27 Thread Alex Deucher
On Thu, Sep 26, 2019 at 6:52 PM Lyude Paul wrote: > > kfree() checks this automatically. > > Signed-off-by: Lyude Paul Reviewed-by: Alex Deucher And applied. Thanks! Alex > --- > drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 6 ++ > 1 file changed, 2 insertions(+), 4

Re: [PATCH v2 25/27] drm/dp_mst: Add basic topology reprobing when resuming

2019-09-27 Thread Sean Paul
On Tue, Sep 03, 2019 at 04:46:03PM -0400, Lyude Paul wrote: > Finally! For a very long time, our MST helpers have had one very > annoying issue: They don't know how to reprobe the topology state when > coming out of suspend. This means that if a user has a machine connected > to an MST topology

Re: [PATCH v2 23/27] drm/amdgpu: Iterate through DRM connectors correctly

2019-09-27 Thread Alex Deucher
On Fri, Sep 13, 2019 at 4:45 PM Alex Deucher wrote: > > On Tue, Sep 3, 2019 at 4:49 PM Lyude Paul wrote: > > > > Currently, every single piece of code in amdgpu that loops through > > connectors does it incorrectly and doesn't use the proper list iteration > > helpers,

Re: [PATCH v2 03/27] drm/dp_mst: Destroy MSTBs asynchronously

2019-09-27 Thread Sean Paul
On Wed, Sep 25, 2019 at 04:08:22PM -0400, Lyude Paul wrote: > On Wed, 2019-09-25 at 14:16 -0400, Sean Paul wrote: > > On Tue, Sep 03, 2019 at 04:45:41PM -0400, Lyude Paul wrote: > > > When reprobing an MST topology during resume, we have to account for the > > > fact that while we were suspended

Re: [PATCH v2 16/27] drm/dp_mst: Refactor pdt setup/teardown, add more locking

2019-09-27 Thread Sean Paul
On Wed, Sep 25, 2019 at 05:00:00PM -0400, Lyude Paul wrote: > On Wed, 2019-09-25 at 15:27 -0400, Sean Paul wrote: > > On Tue, Sep 03, 2019 at 04:45:54PM -0400, Lyude Paul wrote: > > > Since we're going to be implementing suspend/resume reprobing very soon, > > > we need to make sure we are extra

Re: [PATCH v4] drm/amdgpu/dm: Resume short HPD IRQs before resuming MST topology

2019-09-27 Thread Alex Deucher
On Wed, Sep 25, 2019 at 5:53 PM Lyude Paul wrote: > > Since we're going to be reprobing the entire topology state on resume > now using sideband transactions, we need to ensure that we actually have > short HPD irqs enabled before calling drm_dp_mst_topology_mgr_resume(). > So, do that. > >

Re: [PATCH 1/3] drm/amdgpu: Export setup_vm_pt_regs() logic for gfxhub 2.0

2019-09-27 Thread Deucher, Alexander
Reviewed-by: Alex Deucher From: amd-gfx on behalf of Kuehling, Felix Sent: Thursday, September 26, 2019 6:26 PM To: Zhao, Yong ; amd-gfx@lists.freedesktop.org Subject: Re: [PATCH 1/3] drm/amdgpu: Export setup_vm_pt_regs() logic for gfxhub 2.0 For GFXv9 you

Re: [PATCH] drm/amd/powerplay: Protect backend resource when unload driver

2019-09-27 Thread Alex Deucher
On Fri, Sep 27, 2019 at 6:08 AM Jesse Zhang wrote: > > From: root Please fix your git setup to use your proper email. Alex > > Guest driver can be unloaded while engines still using some > backend resources. That would lead to use after free and then > cause guest driver failed. > > Need to

[PATCH 2/2] drm/radeon: finally fix the racy VMA setup

2019-09-27 Thread Christian König
Finally clean up the VMA setup for radeon now that TTM exports the necessary functions. Not functional change, but only compile tested. Signed-off-by: Christian König --- drivers/gpu/drm/radeon/radeon_ttm.c | 29 ++--- 1 file changed, 14 insertions(+), 15 deletions(-)

[PATCH 1/2] drm/ttm: also export ttm_bo_vm_fault

2019-09-27 Thread Christian König
That is needed by at least a cleanup in radeon. Signed-off-by: Christian König --- drivers/gpu/drm/ttm/ttm_bo_vm.c | 3 ++- include/drm/ttm/ttm_bo_api.h| 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/ttm/ttm_bo_vm.c b/drivers/gpu/drm/ttm/ttm_bo_vm.c

Re: [PATCH] drm/amd/powerplay: Protect backend resource when unload driver

2019-09-27 Thread Christian König
Am 27.09.19 um 12:07 schrieb Jesse Zhang: From: root Guest driver can be unloaded while engines still using some backend resources. That would lead to use after free and then cause guest driver failed. Need to add mutex lock before backend resources free to make sure nobody is using it. Need

[PATCH] drm/amd/powerplay: Protect backend resource when unload driver

2019-09-27 Thread Jesse Zhang
From: root Guest driver can be unloaded while engines still using some backend resources. That would lead to use after free and then cause guest driver failed. Need to add mutex lock before backend resources free to make sure nobody is using it. Need to check backend data availablility before

RE: [PATCH] drm/amdkfd: fix kgd2kfd_device_init() definition conflict error

2019-09-27 Thread Quan, Evan
Acked-by: Evan Quan -Original Message- From: amd-gfx On Behalf Of Liang, Prike Sent: Friday, September 27, 2019 12:34 PM To: amd-gfx@lists.freedesktop.org Cc: Kuehling, Felix ; Huang, Ray ; Kasiviswanathan, Harish ; Liang, Prike Subject: [PATCH] drm/amdkfd: fix kgd2kfd_device_init()

Re: [PATCH] drm/amd/powerplay: initlialize smu->is_apu is false by default

2019-09-27 Thread Wang, Kevin(Yang)
this member should be initialize in smu driver. by default should be set "false". Best Regards, Kevin From: Liang, Prike Sent: Friday, September 27, 2019 4:37 PM To: Wang, Kevin(Yang) ; amd-gfx@lists.freedesktop.org Cc: Huang, Ray ; Feng, Kenneth Subject: RE:

RE: [PATCH] drm/amd/powerplay: initlialize smu->is_apu is false by default

2019-09-27 Thread Feng, Kenneth
Reviewed-by: Kenneth Feng -Original Message- From: Wang, Kevin(Yang) Sent: Friday, September 27, 2019 2:58 PM To: amd-gfx@lists.freedesktop.org Cc: Huang, Ray ; Feng, Kenneth ; Liang, Prike ; Wang, Kevin(Yang) Subject: [PATCH] drm/amd/powerplay: initlialize smu->is_apu is false by

RE: [PATCH] drm/amd/powerplay: initlialize smu->is_apu is false by default

2019-09-27 Thread Liang, Prike
Does use the default value (false) for the Boolean variable of is_apu not enough for identifying DGPU? Anyway, initialize the is_apu during smu early initialize also fine and the patch is Reviewed-by: Prike Liang Thanks, Prike > -Original Message- > From: Wang, Kevin(Yang) >

[PATCH] drm/amd/powerplay: initlialize smu->is_apu is false by default

2019-09-27 Thread Wang, Kevin(Yang)
the member of is_apu in smu_context need to initlialize by default. set default value is false (dGPU) for patch: drm/amd/powerplay: bypass dpm_context null pointer check guard for some smu series Signed-off-by: Kevin Wang --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c | 1 + 1