Re: [PATCH 1/2] drm/amdgpu: add kiq version interface for RREG32

2020-01-13 Thread Christian König
Am 14.01.20 um 05:20 schrieb Huang Rui: On Mon, Jan 13, 2020 at 11:56:46PM +0800, Huang Rui wrote: On Mon, Jan 13, 2020 at 06:16:21PM +0800, chen gong wrote: Reading some registers by mmio will result in hang when GPU is in "gfxoff" state. This problem can be solved by GPU in "ring command

Re: [PATCH 02/23] drm/amdgpu: Convert to struct drm_crtc_helper_funcs.get_scanout_position()

2020-01-13 Thread Thomas Zimmermann
Hi Am 13.01.20 um 19:52 schrieb Alex Deucher: > On Fri, Jan 10, 2020 at 4:21 AM Thomas Zimmermann wrote: >> >> The callback struct drm_driver.get_scanout_position() is deprecated in >> favor of struct drm_crtc_helper_funcs.get_scanout_position(). Convert >> amdgpu over. >> > > I would prefer to

Re: [PATCH 1/2] drm/amdgpu: add kiq version interface for RREG32

2020-01-13 Thread Huang Rui
On Mon, Jan 13, 2020 at 11:56:46PM +0800, Huang Rui wrote: > On Mon, Jan 13, 2020 at 06:16:21PM +0800, chen gong wrote: > > Reading some registers by mmio will result in hang when GPU is in > > "gfxoff" state. > > > > This problem can be solved by GPU in "ring command packages" way. > > > >

[PATCH] drm/amdgpu: modify packet size for pm4 flush tlbs

2020-01-13 Thread Alex Sierra
[Why] PM4 packet size for flush message was oversized. [How] Packet size adjusted to allocate flush + fence packets. Change-Id: I9a577d2118398b3139011829de12789b2a577a19 Signed-off-by: Alex Sierra --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 +- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 +-

RE: [PATCH 5/7] drm/amdgpu: export function to flush TLB via pasid

2020-01-13 Thread Sierra Guiza, Alejandro (Alex)
[AMD Official Use Only - Internal Distribution Only] Yes, both gfx_v10_0_ring_emit_fence and gfx_v9_0_ring_emit_fence have 8 ring writes. Plus 2 of the flush. Regards, Alejandro S. -Original Message- From: Kuehling, Felix Sent: Monday, January 13, 2020 6:55 PM To: Sierra Guiza,

RE: [PATCH] drm/amdgpu: check rlc_g firmware pointer is valid before using it

2020-01-13 Thread Zhang, Hawking
[AMD Official Use Only - Internal Distribution Only] Reviewed-by: Hawking Zhang Regards, Hawking -Original Message- From: amd-gfx On Behalf Of shaoyunl Sent: Tuesday, January 14, 2020 00:20 To: amd-gfx@lists.freedesktop.org Subject: Re: [PATCH] drm/amdgpu: check rlc_g firmware pointer

RE: [PATCH] drm/dp_mst: Have DP_Tx send one msg at a time

2020-01-13 Thread Lin, Wayne
[AMD Public Use] Thanks for your time and hope you get well soon! -Original Message- From: Lyude Paul Sent: Tuesday, January 14, 2020 1:59 AM To: Lin, Wayne ; dri-de...@lists.freedesktop.org; amd-gfx@lists.freedesktop.org Cc: Kazlauskas, Nicholas ; Wentland, Harry ; Zuo, Jerry

RE: [PATCH 1/2] drm/amdgpu/pm: properly handle runtime pm

2020-01-13 Thread Quan, Evan
Yes, 'ssize_t' is fine. But 'count' comes with type of 'size_t'. Although it should not bring any true problem. I'm not sure whether there will be compile warnings. Regards, Evan > -Original Message- > From: Alex Deucher > Sent: Tuesday, January 14, 2020 4:27 AM > To: Quan, Evan > Cc:

Re: [PATCH 5/7] drm/amdgpu: export function to flush TLB via pasid

2020-01-13 Thread Felix Kuehling
I noticed that the invalidate_tlbs_size in patch 3 was also wrong. That should only be 2 dwords, not 12. The code here should do     amdgpu_ring_alloc(ring, kiq->pmf->invalidate_tlbs_size + 8); I think 12 was too much in the original code. Flush + fence should only be 10 dwords, unless I

RE: [PATCH 5/7] drm/amdgpu: export function to flush TLB via pasid

2020-01-13 Thread Sierra Guiza, Alejandro (Alex)
[AMD Official Use Only - Internal Distribution Only] I just pushed the series, but I'll go ahead and create a new patch for this. The .invalidate_tlbs_size, is it based on dword size? Currently is 12, should I need to drop it to 8 then? -Original Message- From: Kuehling, Felix Sent:

Re: [PATCH 3/7] drm/amdgpu: implement tlbs invalidate on gfx9 gfx10

2020-01-13 Thread Felix Kuehling
On 2020-01-13 3:26 p.m., Alex Sierra wrote: tlbs invalidate pointer function added to kiq_pm4_funcs struct. This way, tlb flush can be done through kiq member. TLBs invalidatation implemented for gfx9 and gfx10. Change-Id: I1b77b364f3ae0038ff3e70e869be5f2ef6e6d293 Signed-off-by: Alex Sierra

Re: [PATCH 5/7] drm/amdgpu: export function to flush TLB via pasid

2020-01-13 Thread Felix Kuehling
Sorry, I already said, Reviewed-by, but realized there was one more problem. If you haven't submitted yet, please fix that first. Otherwise, please make it a follow-up patch. See inline ... On 2020-01-13 3:26 p.m., Alex Sierra wrote: This can be used directly from amdgpu and amdkfd to

Re: [PATCH 3/7] drm/amdgpu: implement tlbs invalidate on gfx9 gfx10

2020-01-13 Thread Felix Kuehling
The series is Reviewed-by: Felix Kuehling On 2020-01-13 3:26 p.m., Alex Sierra wrote: tlbs invalidate pointer function added to kiq_pm4_funcs struct. This way, tlb flush can be done through kiq member. TLBs invalidatation implemented for gfx9 and gfx10. Change-Id:

Re: [PATCH 1/2] drm/amdgpu/pm: properly handle runtime pm

2020-01-13 Thread Alex Deucher
On Sun, Jan 12, 2020 at 10:35 PM Quan, Evan wrote: > > The "count" from amdgpu_set_pp_feature_status() seems with type of size_t. > Then assignment "count = -EINVAL" may be improper. It's fine. ssize_t is signed. We've been doing it long before this patch. Alex > With that confirmed, the

[PATCH 3/7] drm/amdgpu: implement tlbs invalidate on gfx9 gfx10

2020-01-13 Thread Alex Sierra
tlbs invalidate pointer function added to kiq_pm4_funcs struct. This way, tlb flush can be done through kiq member. TLBs invalidatation implemented for gfx9 and gfx10. Change-Id: I1b77b364f3ae0038ff3e70e869be5f2ef6e6d293 Signed-off-by: Alex Sierra --- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h |

[PATCH 5/7] drm/amdgpu: export function to flush TLB via pasid

2020-01-13 Thread Alex Sierra
This can be used directly from amdgpu and amdkfd to invalidate TLB through pasid. It supports gmc v7, v8, v9 and v10. Change-Id: I6563a8eba2e42d1a67fa2547156c20da41d1e490 Signed-off-by: Alex Sierra --- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h | 6 ++ drivers/gpu/drm/amd/amdgpu/gmc_v10_0.c | 74

[PATCH 4/7] drm/amdgpu: replace kcq enable/disable functions on gfx_v9

2020-01-13 Thread Alex Sierra
[Why] There are HW-indpendent functions that enables and disables kcq. These functions use the kiq_pm4_funcs implementation. [How] Local kcq enable and disable functions removed and replace it by the generic kcq enable under amdgpu_gfx Change-Id: I7709bdba93742c234941a5936c82eb67e346077c

Re: [PATCH 17/23] drm/radeon: Convert to CRTC VBLANK callbacks

2020-01-13 Thread Alex Deucher
On Fri, Jan 10, 2020 at 4:22 AM Thomas Zimmermann wrote: > > VBLANK callbacks in struct drm_driver are deprecated in favor of > their equivalents in struct drm_crtc_funcs. Convert radeon over. > > Signed-off-by: Thomas Zimmermann Reviewed-by: Alex Deucher > --- >

Re: [PATCH 12/23] drm/amdgpu: Convert to CRTC VBLANK callbacks

2020-01-13 Thread Alex Deucher
On Fri, Jan 10, 2020 at 4:22 AM Thomas Zimmermann wrote: > > VBLANK callbacks in struct drm_driver are deprecated in favor of > their equivalents in struct drm_crtc_funcs. Convert amdgpu over. I think I'd prefer to just update the signatures of the relevant functions rather than wrapping them.

Re: [PATCH 1/8] drm/amdgpu: drop amdgpu_job.owner

2020-01-13 Thread Felix Kuehling
I replied with one question about patch 4. Other than that the series is Reviewed-by: Felix Kuehling On 2020-01-13 9:40 a.m., Christian König wrote: Entirely unused. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_job.c

RE: [PATCH] drm/amdgpu/df3.6: remove unused variable

2020-01-13 Thread Liu, Zhan
> -Original Message- > From: amd-gfx On Behalf Of Alex > Deucher > Sent: 2020/January/13, Monday 1:42 PM > To: amd-gfx list > Cc: Deucher, Alexander > Subject: Re: [PATCH] drm/amdgpu/df3.6: remove unused variable > > Ping? > > Alex > > On Fri, Jan 10, 2020 at 7:22 PM Alex Deucher

Re: [PATCH 05/23] drm/radeon: Convert to struct drm_crtc_helper_funcs.get_scanout_position()

2020-01-13 Thread Alex Deucher
On Fri, Jan 10, 2020 at 4:22 AM Thomas Zimmermann wrote: > > The callback struct drm_driver.get_scanout_position() is deprecated in > favor of struct drm_crtc_helper_funcs.get_scanout_position(). Convert > radeon over. > I'd prefer to just change the signature of radeon_get_crtc_scanoutpos() to

Re: [PATCH 02/23] drm/amdgpu: Convert to struct drm_crtc_helper_funcs.get_scanout_position()

2020-01-13 Thread Alex Deucher
On Fri, Jan 10, 2020 at 4:21 AM Thomas Zimmermann wrote: > > The callback struct drm_driver.get_scanout_position() is deprecated in > favor of struct drm_crtc_helper_funcs.get_scanout_position(). Convert > amdgpu over. > I would prefer to just change the signature of

Re: [PATCH] drm/amdgpu/df3.6: remove unused variable

2020-01-13 Thread Alex Deucher
Ping? Alex On Fri, Jan 10, 2020 at 7:22 PM Alex Deucher wrote: > > Unused so drop it. > > Signed-off-by: Alex Deucher > --- > drivers/gpu/drm/amd/amdgpu/df_v3_6.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/df_v3_6.c >

Re: [PATCH] drm/dp_mst: Have DP_Tx send one msg at a time

2020-01-13 Thread Lyude Paul
Hey! Haven't taken a look at this patch yet but just wanted to let you know I'm going to try to get to most of the stuff you've got pending for me. I came down with a really nasty cold last week so sorry if you've had any other patches waiting until now! On Mon, 2020-01-13 at 17:36 +0800, Wayne

Re: [PATCH 4/8] drm/amdgpu: rework job synchronization

2020-01-13 Thread Felix Kuehling
On 2020-01-13 9:40 a.m., Christian König wrote: For unlocked page table updates we need to be able to sync to fences of a specific VM. Signed-off-by: Christian König --- .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 6 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c| 8 +--

Re: [PATCH 39/43] drm/amd/display: Use udelay to avoid context switch

2020-01-13 Thread Rodrigo Siqueira
On 01/11, Christian König wrote: > Am 10.01.20 um 22:30 schrieb Harry Wentland: > > On 2020-01-10 4:16 p.m., Harry Wentland wrote: > > > On 2020-01-10 1:47 p.m., Liu, Zhan wrote: > > > > > > > > > -Original Message- > > > > > From: amd-gfx On Behalf Of > > > > > Christian König > > > > >

Re: [PATCH] drm/amdgpu/display: Use u64 divide macro for round up division

2020-01-13 Thread Ville Syrjälä
On Mon, Jan 13, 2020 at 08:20:42AM -0500, mikita.lip...@amd.com wrote: > From: Mikita Lipski > > [why] > Fix compilation warnings on i386 architecture: > undefined reference to `__udivdi3' > [how] > Switch DIV_ROUND_UP to DIV64_U64_ROUND_UP > > Reported-by: Randy Dunlap > Signed-off-by: Mikita

Re: [PATCH 2/7] drm/amdgpu: kiq pm4 function implementation for gfx_v9

2020-01-13 Thread Felix Kuehling
On 2020-01-11 1:39 p.m., Alex Sierra wrote: Functions implemented from kiq_pm4_funcs struct members for gfx_v9 version. Change-Id: I8fd3e160c4bd58f19d35d29e39517db967063afe Signed-off-by: Alex Sierra Reviewed-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 115

Re: [PATCH 6/7] drm/amdgpu: GPU TLB flush API moved to amdgpu_amdkfd

2020-01-13 Thread Felix Kuehling
On 2020-01-11 1:39 p.m., Alex Sierra wrote: [Why] TLB flush method has been deprecated using kfd2kgd interface. This implementation is now on the amdgpu_amdkfd API. [How] TLB flush functions now implemented in amdgpu_amdkfd. Change-Id: Ic51cccdfe6e71288d78da772b6e1b6ced72f8ef7 Signed-off-by:

Re: [PATCH 4/7] drm/amdgpu: replace kcq enable function on gfx_v9

2020-01-13 Thread Felix Kuehling
Can you include kcq_disable in the patch as well? Thanks,   Felix On 2020-01-11 1:39 p.m., Alex Sierra wrote: [Why] There's a HW-indpendent function that enables kcq. This function uses the kiq_pm4_funcs implementation. [How] Local kcq enable function removed and replace it by the generic kcq

Re: [PATCH 5/7] drm/amdgpu: export function to flush TLB via pasid

2020-01-13 Thread Felix Kuehling
On 2020-01-11 1:39 p.m., Alex Sierra wrote: This can be used directly from amdgpu and amdkfd to invalidate TLB through pasid. It supports gmc v7, v8, v9 and v10. Change-Id: I6563a8eba2e42d1a67fa2547156c20da41d1e490 Signed-off-by: Alex Sierra --- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h | 6

Re: [PATCH] drm/amdgpu/display: Use u64 divide macro for round up division

2020-01-13 Thread Harry Wentland
On 2020-01-13 8:20 a.m., mikita.lip...@amd.com wrote: > From: Mikita Lipski > > [why] > Fix compilation warnings on i386 architecture: > undefined reference to `__udivdi3' > [how] > Switch DIV_ROUND_UP to DIV64_U64_ROUND_UP > > Reported-by: Randy Dunlap > Signed-off-by: Mikita Lipski

Re: [PATCH 3/7] drm/amdgpu: implement tlbs invalidate on gfx9 gfx10

2020-01-13 Thread Felix Kuehling
On 2020-01-11 1:39 p.m., Alex Sierra wrote: tlbs invalidate pointer function added to kiq_pm4_funcs struct. This way, tlb flush can be done through kiq member. TLBs invalidatation implemented for gfx9 and gfx10. Change-Id: I1b77b364f3ae0038ff3e70e869be5f2ef6e6d293 Signed-off-by: Alex Sierra

Re: [PATCH] drm/amdgpu: fix a warning in get_sdma_rlc_reg_offset

2020-01-13 Thread Felix Kuehling
On 2020-01-08 11:51 p.m., Alex Deucher wrote: If a user specifies a non-existant sdma instance, warn and return the offset for instance 0. Signed-off-by: Alex Deucher Reviewed-by: Felix Kuehling --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_arcturus.c | 7 +-- 1 file changed, 5

Re: [PATCH] drm/amdgpu: check rlc_g firmware pointer is valid before using it

2020-01-13 Thread shaoyunl
ping. On 2020-01-10 1:33 p.m., shaoyunl wrote: In SRIOV, rlc_g firmware is loaded by host, guest driver won't load it which will cause the rlc_fw pointer is null Change-Id: Id16f65171dd427d623af4c5bc75f674019e63dec Signed-off-by: shaoyunl --- drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 9

Re: [PATCH 2/2] drm/amdgpu: reading CP_MEM_SLP_CNTL register using RREG32_KIQ macro

2020-01-13 Thread Huang Rui
On Mon, Jan 13, 2020 at 06:16:22PM +0800, chen gong wrote: > Reading CP_MEM_SLP_CNTL register with RREG32_SOC15 macro will lead to > hang when GPU is in "gfxoff" state. > > Signed-off-by: chen gong > --- > drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 +- > 1 file changed, 1 insertion(+), 1

Re: [PATCH 1/2] drm/amdgpu: add kiq version interface for RREG32

2020-01-13 Thread Huang Rui
On Mon, Jan 13, 2020 at 06:16:21PM +0800, chen gong wrote: > Reading some registers by mmio will result in hang when GPU is in > "gfxoff" state. > > This problem can be solved by GPU in "ring command packages" way. > > Signed-off-by: chen gong Acked-by: Huang Rui > --- >

[PATCH 3/8] drm/amdgpu: use the VM as job owner

2020-01-13 Thread Christian König
For HMM we need to rework how VM synchronization works, so instead of the filp use VM as job owner. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c

[PATCH 2/8] drm/amdgpu: explicitly sync VM update to PDs/PTs

2020-01-13 Thread Christian König
Explicitly sync VM updates to the moving fence in PDs and PTs. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm_cpu.c | 7 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c | 5 + 2 files changed, 12 insertions(+) diff --git

[PATCH 5/8] drm/amdgpu: rework synchronization of VM updates v2

2020-01-13 Thread Christian König
If provided we only sync to the BOs reservation object and no longer to the root PD. v2: update comment, cleanup amdgpu_bo_sync_wait_resv Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 37 +++- drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 3

[PATCH 7/8] drm/amdgpu: drop unnecessary restriction for huge root PDEs

2020-01-13 Thread Christian König
The root PD can also contain huge PDEs. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 25 + 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c index

[PATCH 1/8] drm/amdgpu: drop amdgpu_job.owner

2020-01-13 Thread Christian König
Entirely unused. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_job.c | 1 - drivers/gpu/drm/amd/amdgpu/amdgpu_job.h | 1 - 3 files changed, 3 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c

[PATCH 4/8] drm/amdgpu: rework job synchronization

2020-01-13 Thread Christian König
For unlocked page table updates we need to be able to sync to fences of a specific VM. Signed-off-by: Christian König --- .../gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 6 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_cs.c| 8 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c| 3 +-

[PATCH 8/8] drm/amdgpu: make sure to never allocate PDs/PTs for invalidations

2020-01-13 Thread Christian König
Make sure that we never allocate a page table for an invalidation operation. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 22 +- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c

[PATCH 6/8] drm/amdgpu: stop using amdgpu_bo_gpu_offset in the VM backend

2020-01-13 Thread Christian König
We need to update page tables without any lock held. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_sdma.c

[PATCH] drm/amdgpu/display: Use u64 divide macro for round up division

2020-01-13 Thread mikita.lipski
From: Mikita Lipski [why] Fix compilation warnings on i386 architecture: undefined reference to `__udivdi3' [how] Switch DIV_ROUND_UP to DIV64_U64_ROUND_UP Reported-by: Randy Dunlap Signed-off-by: Mikita Lipski --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c | 2 +- 1 file

Re: [PATCH] drm/amdkfd: Fix a compiling warning

2020-01-13 Thread Deucher, Alexander
[AMD Official Use Only - Internal Distribution Only] FWIW: https://patchwork.freedesktop.org/patch/347923/ Alex From: amd-gfx on behalf of Yong Zhao Sent: Friday, January 10, 2020 7:40 PM To: amd-gfx@lists.freedesktop.org Cc: Zhao, Yong Subject: [PATCH]

Re: [PATCH 7/7] drm/amdgpu: flush TLB functions removal from kfd2kgd interface

2020-01-13 Thread Christian König
Am 11.01.20 um 19:39 schrieb Alex Sierra: [Why] kfd2kgd interface will be deprecated. This removal only covers TLB invalidation for now. They have been replaced in amdgpu_amdkfd API. [How] TLB invalidate functions removed from the different amdkfd_gfx_v* versions. Change-Id:

Re: [PATCH 6/7] drm/amdgpu: GPU TLB flush API moved to amdgpu_amdkfd

2020-01-13 Thread Christian König
Am 11.01.20 um 19:39 schrieb Alex Sierra: [Why] TLB flush method has been deprecated using kfd2kgd interface. This implementation is now on the amdgpu_amdkfd API. [How] TLB flush functions now implemented in amdgpu_amdkfd. Change-Id: Ic51cccdfe6e71288d78da772b6e1b6ced72f8ef7 Signed-off-by:

Re: [PATCH 5/7] drm/amdgpu: export function to flush TLB via pasid

2020-01-13 Thread Christian König
Am 11.01.20 um 19:39 schrieb Alex Sierra: This can be used directly from amdgpu and amdkfd to invalidate TLB through pasid. It supports gmc v7, v8, v9 and v10. Change-Id: I6563a8eba2e42d1a67fa2547156c20da41d1e490 Signed-off-by: Alex Sierra Flushing by pasid is in principle racy, but I don't

Re: [PATCH 4/7] drm/amdgpu: replace kcq enable function on gfx_v9

2020-01-13 Thread Christian König
Am 11.01.20 um 19:39 schrieb Alex Sierra: [Why] There's a HW-indpendent function that enables kcq. This function uses the kiq_pm4_funcs implementation. [How] Local kcq enable function removed and replace it by the generic kcq enable under amdgpu_gfx Change-Id:

Re: [PATCH 3/7] drm/amdgpu: implement tlbs invalidate on gfx9 gfx10

2020-01-13 Thread Christian König
Am 11.01.20 um 19:39 schrieb Alex Sierra: tlbs invalidate pointer function added to kiq_pm4_funcs struct. This way, tlb flush can be done through kiq member. TLBs invalidatation implemented for gfx9 and gfx10. Change-Id: I1b77b364f3ae0038ff3e70e869be5f2ef6e6d293 Signed-off-by: Alex Sierra

Re: [PATCH 2/7] drm/amdgpu: kiq pm4 function implementation for gfx_v9

2020-01-13 Thread Christian König
Am 11.01.20 um 19:39 schrieb Alex Sierra: Functions implemented from kiq_pm4_funcs struct members for gfx_v9 version. Change-Id: I8fd3e160c4bd58f19d35d29e39517db967063afe Signed-off-by: Alex Sierra Acked-by: Christian König --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 115

Re: [PATCH 1/7] drm/amdgpu: Avoid reclaim fs while eviction lock

2020-01-13 Thread Christian König
Am 11.01.20 um 19:39 schrieb Alex Sierra: [Why] Avoid reclaim filesystem while eviction lock is held called from MMU notifier. [How] Setting PF_MEMALLOC_NOFS flags while eviction mutex is locked. Using memalloc_nofs_save / memalloc_nofs_restore API. Change-Id:

Re: [RFC PATCH] drm/scheduler: use idle time to do better loadbalance

2020-01-13 Thread Christian König
Am 12.01.20 um 02:25 schrieb Nirmoy Das: This patch adds required fields to drm_sched_job and drm_gpu_scheduler structure to cumulatively calculate amount of time a drm_gpu_scheduler spend on serving a job. Using least used drm scheduler to choose a run queue improves

[PATCH 1/2] drm/amdgpu: add kiq version interface for RREG32

2020-01-13 Thread chen gong
Reading some registers by mmio will result in hang when GPU is in "gfxoff" state. This problem can be solved by GPU in "ring command packages" way. Signed-off-by: chen gong --- drivers/gpu/drm/amd/amdgpu/amdgpu.h| 3 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +- 2 files

[PATCH 2/2] drm/amdgpu: reading CP_MEM_SLP_CNTL register using RREG32_KIQ macro

2020-01-13 Thread chen gong
Reading CP_MEM_SLP_CNTL register with RREG32_SOC15 macro will lead to hang when GPU is in "gfxoff" state. Signed-off-by: chen gong --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c

[PATCH] drm/dp_mst: Have DP_Tx send one msg at a time

2020-01-13 Thread Wayne Lin
[Why] Noticed this while testing MST with the 4 ports MST hub from StarTech.com. Sometimes can't light up monitors normally and get the error message as 'sideband msg build failed'. Look into aux transactions, found out that source sometimes will send out another down request before receiving the

Re: [PATCH 4/5] drm/amdkfd: use map_queues for hiq on gfx v10 as well

2020-01-13 Thread Huang Rui
On Sat, Jan 11, 2020 at 07:08:42AM +0800, Kuehling, Felix wrote: > On 2020-01-10 1:37 a.m., Huang Rui wrote: > > To align with gfx v9, we use the map_queues packet to load hiq MQD. > > > > Signed-off-by: Huang Rui > > Please make sure you test this on a GFXv10 GPU. > > Reviewed-by: Felix