[PATCH] drm/amdgpu: resolve ras recovery vs smi race condition

2020-05-19 Thread Clements, John
[AMD Official Use Only - Internal Distribution Only] Submitting patch to block SMU access' via SMI during RAS recovery 0001-drm-amdgpu-resolve-ras-recovery-vs-smi-race-conditio.patch Description: 0001-drm-amdgpu-resolve-ras-recovery-vs-smi-race-conditio.patch

RE: [PATCH] drm/amdgpu: resolve ras recovery vs smi race condition

2020-05-19 Thread Zhang, Hawking
[AMD Official Use Only - Internal Distribution Only] Please only apply the check to arcturus - we don't need to check ras fatal error event on all the NV series. Regards, Hawking From: Clements, John Sent: Tuesday, May 19, 2020 17:15 To: amd-gfx@lists.freedesktop.org; Zhang, Hawking Subject:

Re: [PATCH AUTOSEL 5.6 33/50] drm/amdgpu: bump version for invalidate L2 before SDMA IBs

2020-05-19 Thread Deucher, Alexander
[AMD Public Use] Yes, please drop this patch for stable. Alex From: Marek Olšák Sent: Monday, May 18, 2020 6:35 PM To: Sasha Levin Cc: Linux Kernel Mailing List ; sta...@vger.kernel.org ; Pelloux-prayer, Pierre-eric ; Olsak, Marek ; amd-gfx mailing list ;

[PATCH 1/2] drm/amdgpu/jpeg2.5: Remove JPEG_ENC_MASK from clock ungating

2020-05-19 Thread James Zhu
Remove JPEG_ENC_MASK from clock ungating since MJPEG encoder hasn't been support yet. Signed-off-by: James Zhu --- drivers/gpu/drm/amd/amdgpu/jpeg_v2_5.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/jpeg_v2_5.c b/drivers/gpu/drm/amd/amdgpu/jpeg_v2_5.c index

Re: [PATCH] drm/amdkfd: Fix boolreturn.cocci warnings

2020-05-19 Thread Alex Deucher
On Mon, May 18, 2020 at 12:37 PM Aishwarya Ramakrishnan wrote: > > Return statements in functions returning bool should use > true/false instead of 1/0. > > drivers/gpu/drm/amd/amdkfd/kfd_int_process_v9.c:40:9-10: > WARNING: return of 0/1 in function 'event_interrupt_isr_v9' with return type >

[PATCH] dma-fence: add might_sleep annotation to _wait()

2020-05-19 Thread Daniel Vetter
Do it uncontionally, there's a separate peek function with dma_fence_is_signalled() which can be called from atomic context. v2: Consensus calls for an unconditional might_sleep (Chris, Christian) Full audit: - dma-fence.h: Uses MAX_SCHEDULE_TIMOUT, good chance this sleeps - dma-resv.c: Timeout

[PATCH 6/7] drm/amdgpu/sdma4: simplify the logic around powering up sdma

2020-05-19 Thread Alex Deucher
Just check if it's an APU. The checks for the ppfuncs are pointless because if we don't have them we can't power up sdma anyway so we shouldn't even be in this code in the first place. I'm not sure about the in_gpu_reset check. This probably needs to be double checked. The fini logic doesn't

[PATCH 2/7] drm/amdgpu/gfx10: add navi12 to gfxoff case

2020-05-19 Thread Alex Deucher
Looks like it should be handled here as well. Signed-off-by: Alex Deucher --- Can someone test this on navi12? drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c b/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c index

[PATCH 4/7] drm/amdgpu: simplify CZ/ST and KV/KB/ML checks

2020-05-19 Thread Alex Deucher
Just check for APU. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 drivers/gpu/drm/amd/amdgpu/dce_v11_0.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

[PATCH 3/7] drm/amdgpu: simplify raven and renoir checks

2020-05-19 Thread Alex Deucher
Just check for APU. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 3 +-- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/sdma_v4_0.c | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git

[PATCH 7/7] drm/amdgpu: put some case statments in family order

2020-05-19 Thread Alex Deucher
SI and CIK came before VI and newer asics. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 54 +++--- 1 file changed, 27 insertions(+), 27 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c

[PATCH 5/7] drm/amdgpu: simplify mec2 fw check

2020-05-19 Thread Alex Deucher
Check if mec2 fw exists rather than checking asic types. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c index

Re: slow rx 5600 xt fps

2020-05-19 Thread Javad Karabi
another tidbit: when in linux, the gpu's fans _never_ come on. even when i run 4 instances of glmark2, the fans do not come on :/ i see the temp hitting just below 50 deg c, and i saw some value that says that 50c was the max? isnt 50c low for a max gpu temp? On Tue, May 19, 2020 at 2:44 PM

Re: slow rx 5600 xt fps

2020-05-19 Thread Javad Karabi
just a couple more questions: - based on what you are aware of, the technical details such as "shared buffers go through system memory", and all that, do you see any issues that might exist that i might be missing in my setup? i cant imagine this being the case because the card works great in

regarding vcn

2020-05-19 Thread Javad Karabi
for a rx 5600 xt graphics card, is VCN supposed to be set to disabled? if i understand correctly, 5600 is navi10, which has vcn but i currently see VCN: disabled $ sudo grep VCN /sys/kernel/debug/dri/1/amdgpu_pm_info VCN: Disabled ___ amd-gfx mailing

Re: regarding vcn

2020-05-19 Thread Javad Karabi
thanks alex. i guess all the little things that i think are the problem, are really red herrings lol. i keep finding little things that i think might fix the 5600 issues im having but i guess theyre unrelated. ill make another post which simply defines the issues im having On Tue, May 19, 2020 at

Re: slow rx 5600 xt fps

2020-05-19 Thread Javad Karabi
im using Driver "amdgpu" in my xorg conf how does one verify which gpu is the primary? im assuming my intel card is the primary, since i have not done anything to change that. also, if all shared buffers have to go through system memory, then that means an eGPU amdgpu wont work very well in

[pull] amdgpu drm-next-5.8

2020-05-19 Thread Alex Deucher
Hi Dave, Daniel, Last few bits for 5.8. The following changes since commit 80c9b58e9503f33a707a23172b2dd8d015b8c036: Merge tag 'du-next-20200514' of git://linuxtv.org/pinchartl/media into drm-next (2020-05-14 13:41:51 +1000) are available in the Git repository at:

Re: slow rx 5600 xt fps

2020-05-19 Thread Alex Deucher
On Tue, May 19, 2020 at 2:59 PM Javad Karabi wrote: > > given this setup: > laptop -thunderbolt-> razer core x -> xfx rx 5600 xt raw 2 -hdmi-> monitor > DRI_PRIME=1 glxgears gears gives me ~300fps > > given this setup: > laptop -thunderbolt-> razer core x -> xfx rx 5600 xt raw 2 > laptop -hdmi->

Re: regarding vcn

2020-05-19 Thread Alex Deucher
On Tue, May 19, 2020 at 2:45 PM Javad Karabi wrote: > > for a rx 5600 xt graphics card, is VCN supposed to be set to disabled? > > if i understand correctly, 5600 is navi10, which has vcn > > but i currently see VCN: disabled > > $ sudo grep VCN /sys/kernel/debug/dri/1/amdgpu_pm_info > VCN:

slow rx 5600 xt fps

2020-05-19 Thread Javad Karabi
given this setup: laptop -thunderbolt-> razer core x -> xfx rx 5600 xt raw 2 -hdmi-> monitor DRI_PRIME=1 glxgears gears gives me ~300fps given this setup: laptop -thunderbolt-> razer core x -> xfx rx 5600 xt raw 2 laptop -hdmi-> monitor glx gears gives me ~1800fps this doesnt make sense to me

Re: [PATCH] dma-fence: add might_sleep annotation to _wait()

2020-05-19 Thread Chris Wilson
Quoting Daniel Vetter (2020-05-19 14:27:56) > Do it uncontionally, there's a separate peek function with > dma_fence_is_signalled() which can be called from atomic context. > > v2: Consensus calls for an unconditional might_sleep (Chris, > Christian) > > Full audit: > - dma-fence.h: Uses

RE: [PATCH 2/2] drm/amdgpu/vcn2.5: Remove old DPG workaround

2020-05-19 Thread Liu, Leo
The 2 patches are: Reviewed-by: Leo Liu -Original Message- From: amd-gfx On Behalf Of James Zhu Sent: May 19, 2020 10:42 AM To: amd-gfx@lists.freedesktop.org Cc: Zhu, James Subject: [PATCH 2/2] drm/amdgpu/vcn2.5: Remove old DPG workaround SCRATCH2 is used to keep decode wptr as a

Re: slow rx 5600 xt fps

2020-05-19 Thread Alex Deucher
On Tue, May 19, 2020 at 3:44 PM Javad Karabi wrote: > > just a couple more questions: > > - based on what you are aware of, the technical details such as > "shared buffers go through system memory", and all that, do you see > any issues that might exist that i might be missing in my setup? i >

Re: slow rx 5600 xt fps

2020-05-19 Thread Alex Deucher
On Tue, May 19, 2020 at 4:01 PM Javad Karabi wrote: > > another tidbit: > when in linux, the gpu's fans _never_ come on. > > even when i run 4 instances of glmark2, the fans do not come on :/ > i see the temp hitting just below 50 deg c, and i saw some value that > says that 50c was the max? >

[PATCH 2/2] drm/amdgpu: drop navi pcie bw callback

2020-05-19 Thread Alex Deucher
It's not implemented yet so just drop it so the sysfs pcie bw file returns an appropriate error instead of garbage. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/nv.c | 8 1 file changed, 8 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/nv.c

[PATCH 1/2] drm/amdgpu: improve error handling in pcie_bw

2020-05-19 Thread Alex Deucher
1. Initialize the counters to 0 in case the callback fails to initialize them. 2. The counters don't exist on APUs so return an error for them. 3. Return an error if the callback doesn't exist. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_pm.c | 8 +++- 1 file

[PATCH] drm/amdgpu/smu10: Replace one-element array and use struct_size() helper

2020-05-19 Thread Gustavo A. R. Silva
The current codebase makes use of one-element arrays in the following form: struct something { int length; u8 data[1]; }; struct something *instance; instance = kmalloc(sizeof(*instance) + size, GFP_KERNEL); instance->length = size; memcpy(instance->data, source, size); but the

Re: slow rx 5600 xt fps

2020-05-19 Thread Alex Deucher
On Tue, May 19, 2020 at 3:20 PM Javad Karabi wrote: > > im using Driver "amdgpu" in my xorg conf > > how does one verify which gpu is the primary? im assuming my intel > card is the primary, since i have not done anything to change that. > Check your xorg log. > also, if all shared buffers have

Re: slow rx 5600 xt fps

2020-05-19 Thread Javad Karabi
lol youre quick! "Windows has supported peer to peer DMA for years so it already has a numbers of optimizations that are only now becoming possible on Linux" whoa, i figured linux would be ahead of windows when it comes to things like that. but peer-to-peer dma is something that is only recently

Re: slow rx 5600 xt fps

2020-05-19 Thread Alex Deucher
On Tue, May 19, 2020 at 5:22 PM Javad Karabi wrote: > > lol youre quick! > > "Windows has supported peer to peer DMA for years so it already has a > numbers of optimizations that are only now becoming possible on Linux" > > whoa, i figured linux would be ahead of windows when it comes to > things

Re: [PATCH] drm/amdgpu fix incorrect sysfs remove behavior for xgmi

2020-05-19 Thread Zhang, Jack (Jian)
[AMD Official Use Only - Internal Distribution Only] ping Outlook for Android From: Jack Zhang Sent: Monday, May 18, 2020 5:00:53 PM To: amd-gfx@lists.freedesktop.org Cc: Zhang, Jack (Jian) Subject: [PATCH] drm/amdgpu fix incorrect

Re: slow rx 5600 xt fps

2020-05-19 Thread Javad Karabi
s/Monitor0/MonitorA (the Monitor0 and Monitor1 are actually Monitor4 (for the laptop) and Montor0 (for the hdmi output), atleast i think that was the numbers.) they were autogenerated Monitor identifiers by xorg, so i dont remember the exact numbers, but either way, for some reason the radeon's

Re: slow rx 5600 xt fps

2020-05-19 Thread Bridgman, John
[AMD Official Use Only - Internal Distribution Only] Suggest you use something more demanding that glxgears as a test - part of the problem is that glxgears runs so fast normally (30x faster than your display) that even a small amount of overhead copying a frame from one place to another makes

Re: slow rx 5600 xt fps

2020-05-19 Thread Alex Deucher
On Tue, May 19, 2020 at 9:16 PM Javad Karabi wrote: > > thanks for the answers alex. > > so, i went ahead and got a displayport cable to see if that changes > anything. and now, when i run monitor only, and the monitor connected > to the card, it has no issues like before! so i am thinking that >

[PATCH 2/2] drm/amd/powerplay: remove the support of vega20 from swsmu

2020-05-19 Thread Kevin Wang
by default, vega20 will use legacy powerplay driver. in order to maintain the code conveniently in the future, remove the support of vega20 from swsmu. Signed-off-by: Kevin Wang --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c|9 +- drivers/gpu/drm/amd/powerplay/inc/smu_v11_0.h |1 -

[PATCH 1/2] drm/amd/powerplay: remove the support of xgmi pstate on vega20 from swsmu

2020-05-19 Thread Kevin Wang
the vega20 asic uses legacy powerplay driver by default. 1. cleanup is_support_sw_smu_xgmi() function. (ony use for vega20 xgmi pstate check) 2. by default, the vega20 set xgmi pstate by legacy powerplay routine. Signed-off-by: Kevin Wang --- drivers/gpu/drm/amd/amdgpu/amdgpu_dpm.c| 4

[PATCH v1 13/25] dma-buf: Use sequence counter with associated wound/wait mutex

2020-05-19 Thread Ahmed S. Darwish
A sequence counter write side critical section must be protected by some form of locking to serialize writers. If the serialization primitive is not disabling preemption implicitly, preemption has to be explicitly disabled before entering the sequence counter write side critical section. The

RE: [PATCH] drm/amdgpu: add condition to set MP1 state on gpu reset

2020-05-19 Thread Quan, Evan
[AMD Official Use Only - Internal Distribution Only] Reviewed-by: Evan Quan -Original Message- From: Gao, Likun Sent: Monday, May 18, 2020 6:35 PM To: amd-gfx@lists.freedesktop.org Cc: Zhang, Hawking ; Quan, Evan ; Clements, John ; Gao, Likun Subject: [PATCH] drm/amdgpu: add

Re: slow rx 5600 xt fps

2020-05-19 Thread Javad Karabi
thanks for the answers alex. so, i went ahead and got a displayport cable to see if that changes anything. and now, when i run monitor only, and the monitor connected to the card, it has no issues like before! so i am thinking that somethings up with either the hdmi cable, or some hdmi related

Re: slow rx 5600 xt fps

2020-05-19 Thread Javad Karabi
John, yea, totally agree with you. one other thing i havent mentioned is that, each time, ive also been testing everything by running dota 2 with graphics settings all the way up. and the behavior in dota2 has been consistent its funny: when i run dota 2, it consistently hovers at 40fps, but the

RE: [PATCH] drm/amdgpu: resolve ras recovery vs smi race condition

2020-05-19 Thread Clements, John
[AMD Official Use Only - Internal Distribution Only] Thank you Hawking, I have updated/tested the patch based of your recommendation. From: Zhang, Hawking Sent: Tuesday, May 19, 2020 6:27 PM To: Clements, John ; amd-gfx@lists.freedesktop.org Subject: RE: [PATCH] drm/amdgpu: resolve ras

RE: [PATCH] drm/amdgpu: resolve ras recovery vs smi race condition

2020-05-19 Thread Zhang, Hawking
[AMD Official Use Only - Internal Distribution Only] Reviewed-by: Hawking Zhang Regards, Hawking From: Clements, John Sent: Wednesday, May 20, 2020 10:26 To: Zhang, Hawking ; amd-gfx@lists.freedesktop.org Subject: RE: [PATCH] drm/amdgpu: resolve ras recovery vs smi race condition [AMD