[PATCH] drm/amd/display: remove gcc warning Wunused-but-set-variable

2019-10-18 Thread Chen Wandun
From: Chenwandun drivers/gpu/drm/amd/display/dc/dce/dce_aux.c: In function dce_aux_configure_timeout: drivers/gpu/drm/amd/display/dc/dce/dce_aux.c: warning: variable timeout set but not used [-Wunused-but-set-variable] Signed-off-by: Chenwandun --- drivers/gpu/drm/amd/display/dc/dce/dce_aux.

RE: [PATCH v2] drm/amdkfd: kfd open return failed if device is locked

2019-10-18 Thread Zeng, Oak
In current implementation, even dqm is stopped, user can still create (and start) new queue. This is not correct. We should forbid user create/start new queue if dqm is stopped - stop means stopping the current executing queues and stop receiving new creating request. Regards, Oak -Origina

amdgpu dumping during boot in picasso

2019-10-18 Thread Ken Moffat
I recently upgraded the mobo in an old machine to now use a Ryzen 5 3400G (Picasso APU). With 5.3 kernels it seems to be running well, but an unrelated issue caused me to look at dmesg: it dumps during boot, and then there may be related dumps later, possibly from resuming from suspend or hibernati

Re: [PATCH v4] drm/amd/display: Add MST atomic routines

2019-10-18 Thread Lyude Paul
On Thu, 2019-10-17 at 12:52 -0400, mikita.lip...@amd.com wrote: > From: Mikita Lipski > > - Adding encoder atomic check to find vcpi slots for a connector > - Using DRM helper functions to calculate PBN > - Adding connector atomic check to release vcpi slots if connector > loses CRTC > - Calculat

[PATCH AUTOSEL 4.19 088/100] drm/amdgpu: fix memory leak

2019-10-18 Thread Sasha Levin
From: Nirmoy Das [ Upstream commit 083164dbdb17c5ea4ad92c1782b59c9d75567790 ] cleanup error handling code and make sure temporary info array with the handles are freed by amdgpu_bo_list_put() on idr_replace()'s failure. Signed-off-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Ale

[PATCH AUTOSEL 4.19 048/100] drm/amd/display: fix odm combine pipe reset

2019-10-18 Thread Sasha Levin
From: Dmytro Laktyushkin [ Upstream commit f25f06b67ba237b76092a6fc522b1a94e84bfa85 ] We fail to reset the second odm combine pipe. This change fixes odm pointer management. Signed-off-by: Dmytro Laktyushkin Reviewed-by: Tony Cheng Acked-by: Bhawanpreet Lakha Signed-off-by: Alex Deucher Sig

[PATCH AUTOSEL 5.3 68/89] drm/amdgpu: fix memory leak

2019-10-18 Thread Sasha Levin
From: Nirmoy Das [ Upstream commit 083164dbdb17c5ea4ad92c1782b59c9d75567790 ] cleanup error handling code and make sure temporary info array with the handles are freed by amdgpu_bo_list_put() on idr_replace()'s failure. Signed-off-by: Nirmoy Das Reviewed-by: Christian König Signed-off-by: Ale

Re: Stack out of bounds in KFD on Arcturus

2019-10-18 Thread Kuehling, Felix
On 2019-10-17 6:38 p.m., Grodzovsky, Andrey wrote: > Not that I aware of, is there a special Kconfig flag to determine stack > size ? I remember there used to be a Kconfig option to force a 4KB kernel stack. I don't see it in the current kernel any more. I don't have time to work on this myself.

Re: [PATCH] drm/amdgpu: revert calling smu msg in df callbacks

2019-10-18 Thread Kuehling, Felix
On 2019-10-18 4:29 p.m., Kim, Jonathan wrote: > reverting the following changes: > commit 7dd2eb31fcd5 ("drm/amdgpu: fix compiler warnings for df perfmons") > commit 54275cd1649f ("drm/amdgpu: disable c-states on xgmi perfmons") > > perf events use spin-locks. embedded smu messages have potential

[PATCH 2/4] drm/amd/powerplay: Add EEPROM I2C read/write support to Arcturus.

2019-10-18 Thread Andrey Grodzovsky
The communication is done through SMU table and hence the code is in powerplay. Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/amd/powerplay/arcturus_ppt.c | 229 +++ 1 file changed, 229 insertions(+) diff --git a/drivers/gpu/drm/amd/powerplay/arcturus_ppt.c b/dri

[PATCH 3/4] drm/amdgpu: Use ARCTURUS in RAS EEPROM.

2019-10-18 Thread Andrey Grodzovsky
Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras_eeprom.c index 20af0a1..7de16c0 100644 --- a/driv

[PATCH 1/4] drm/amd/powerplay: Add interface for I2C transactions to SMU.

2019-10-18 Thread Andrey Grodzovsky
Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h b/drivers/gpu/drm/amd/powerplay/inc/amdgpu_smu.h index bf13bf3..24244eb 100644 --- a/drivers/gpu/drm/amd

[PATCH 4/4] drm/amdgpu: Move amdgpu_ras_recovery_init to after SMU ready.

2019-10-18 Thread Andrey Grodzovsky
For Arcturus the I2C traffic is done through SMU tables and so we must postpone RAS recovery init to after they are ready which is in amdgpu_device_ip_hw_init_phase2. Signed-off-by: Andrey Grodzovsky --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 13 + drivers/gpu/drm/amd/amdgpu/am

[PATCH 0/4] Add RAS EEPROM table support for Arcturus.

2019-10-18 Thread Andrey Grodzovsky
This patch set adds support for Arcturus EEPROM to store RAS errors which rise during run time so on next driver load those errors can be retrieved and action taken on them (e.g. Reserve bad memory pages to disallow their usage by the GPU). The I2C communication is done through SMU table which

Re: [PATCH hmm 00/15] Consolidate the mmu notifier interval_tree and locking

2019-10-18 Thread Jason Gunthorpe
On Thu, Oct 17, 2019 at 04:47:20PM +, Koenig, Christian wrote: > > get_user_pages/hmm_range_fault() and invalidate_range_start() both are > > called while holding mm->map_sem, so they are always serialized. > > Not even remotely. > > For calling get_user_pages()/hmm_range_fault() you only ne

[PATCH] drm/amdgpu: revert calling smu msg in df callbacks

2019-10-18 Thread Kim, Jonathan
reverting the following changes: commit 7dd2eb31fcd5 ("drm/amdgpu: fix compiler warnings for df perfmons") commit 54275cd1649f ("drm/amdgpu: disable c-states on xgmi perfmons") perf events use spin-locks. embedded smu messages have potential long response times and potentially deadlocks the syste

Re: [PATCH][next] drm/amdgpu/psp: fix spelling mistake "initliaze" -> "initialize"

2019-10-18 Thread Alex Deucher
On Fri, Oct 18, 2019 at 4:15 AM Colin King wrote: > > From: Colin Ian King > > There is a spelling mistake in a DRM_ERROR error message. Fix it. > > Signed-off-by: Colin Ian King Applied. thanks! Alex > --- > drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 +- > 1 file changed, 1 insertion(+),

Re: [PATCH 2/2] Revert "drm/amdgpu: disable c-states on xgmi perfmons"

2019-10-18 Thread Kuehling, Felix
You can squash the two reverts into a single commit so you avoid reintroducing a broken intermediate state. Mention both reverted commits in the squashed commit description. Checkpatch.pl prefers a different format for quoting reverted commits. Run checkpatch.pl on your commit to see a proper e

Re: [PATCH v2] drm/amdkfd: kfd open return failed if device is locked

2019-10-18 Thread Kuehling, Felix
On 2019-10-18 1:36 p.m., Yang, Philip wrote: > If device is locked for suspend and resume, kfd open should return > failed -EAGAIN without creating process, otherwise the application exit > to release the process will hang to wait for resume is done if the suspend > and resume is stuck somewhere. T

[PATCH 2/2] Revert "drm/amdgpu: disable c-states on xgmi perfmons"

2019-10-18 Thread Kim, Jonathan
This reverts commit 54275cd1649f4034c6450b6c5a8358fcd4f7dda6. incomplete solution to df c-state race condition. smu msg in perf events causes deadlock. Change-Id: Ia85179df2bd167657e42a2d828c4a7c475c392ff Signed-off-by: Jonathan Kim --- drivers/gpu/drm/amd/amdgpu/df_v3_6.c | 36 +--

[PATCH] Revert "drm/amdgpu: fix compiler warnings for df perfmons"

2019-10-18 Thread Kim, Jonathan
This reverts commit 7dd2eb31fcd564574e8efea6bf23cf504f9e2fd7. revert fix of compiler warning on incomplete df-cstate race condition handling solution i.e. smu msg cannot be sent within perfevents Change-Id: Ia09dd24ef91ef75a79a223f72f0cb6a86cd08667 Signed-off-by: Jonathan Kim --- drivers/gpu/dr

RE: [PATCH 1/2] Revert "drm/amdgpu: fix compiler warnings for df perfmons"

2019-10-18 Thread Russell, Kent
I think the first thing that Alex will say is "please include a commit description". Why did you revert it? Kent -Original Message- From: amd-gfx On Behalf Of Kim, Jonathan Sent: Friday, October 18, 2019 1:31 PM To: amd-gfx@lists.freedesktop.org Cc: Kuehling, Felix ; Kim, Jonathan S

[PATCH v2] drm/amdkfd: kfd open return failed if device is locked

2019-10-18 Thread Yang, Philip
If device is locked for suspend and resume, kfd open should return failed -EAGAIN without creating process, otherwise the application exit to release the process will hang to wait for resume is done if the suspend and resume is stuck somewhere. This is backtrace: v2: fix processes that were create

Re: [PATCH] drm/amdkfd: kfd open return failed if device is locked

2019-10-18 Thread Yang, Philip
On 2019-10-18 11:40 a.m., Kuehling, Felix wrote: > On 2019-10-18 10:27 a.m., Yang, Philip wrote: >> If device is locked for suspend and resume, kfd open should return >> failed -EAGAIN without creating process, otherwise the application exit >> to release the process will hang to wait for resume

[PATCH 1/2] Revert "drm/amdgpu: fix compiler warnings for df perfmons"

2019-10-18 Thread Kim, Jonathan
This reverts commit 7dd2eb31fcd564574e8efea6bf23cf504f9e2fd7. Signed-off-by: Jonathan Kim --- drivers/gpu/drm/amd/amdgpu/df_v3_6.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/df_v3_6.c b/drivers/gpu/drm/amd/amdgpu/df_v3_6.c index e1cf7e9c61

[PATCH 2/2] Revert "drm/amdgpu: disable c-states on xgmi perfmons"

2019-10-18 Thread Kim, Jonathan
This reverts commit 54275cd1649f4034c6450b6c5a8358fcd4f7dda6. Signed-off-by: Jonathan Kim --- drivers/gpu/drm/amd/amdgpu/df_v3_6.c | 36 +--- 1 file changed, 1 insertion(+), 35 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/df_v3_6.c b/drivers/gpu/drm/amd/amdgpu/d

Re: [PATCH 3/3] drm/amd/powerplay: clear the swSMU code layer

2019-10-18 Thread Alex Deucher
Nice cleanup. As a next step, it would be nice to converge on a single set of ppt functions so we could clean up all the call sites to have one path regardless of powerplay or swSMU as the backend implementation. Acked-by: Alex Deucher On Fri, Oct 18, 2019 at 10:57 AM Quan, Evan wrote: > > With

Re: [PATCH 2/3] drm/amd/powerplay: split out those internal used swSMU APIs

2019-10-18 Thread Alex Deucher
On Fri, Oct 18, 2019 at 10:57 AM Quan, Evan wrote: > > Those swSMU APIs used internally are moved to smu_cmn.h while > others are kept in amdgpu_smu.h. > Maybe call this smu_internal.h so it's clear these are internal SMU interfaces. Alex > Change-Id: Ib726ef7f65dee46e47a07680b71e6e043e459f42 >

Re: [PATCH] drm/amdkfd: kfd open return failed if device is locked

2019-10-18 Thread Kuehling, Felix
On 2019-10-18 10:27 a.m., Yang, Philip wrote: > If device is locked for suspend and resume, kfd open should return > failed -EAGAIN without creating process, otherwise the application exit > to release the process will hang to wait for resume is done if the suspend > and resume is stuck somewhere.

Re: [RFC] drm: Add AMD GFX9+ format modifiers.

2019-10-18 Thread Bas Nieuwenhuizen
On Thu, Oct 17, 2019 at 9:50 PM Marek Olšák wrote: > > On Wed, Oct 16, 2019 at 9:48 AM Bas Nieuwenhuizen > wrote: >> >> This adds initial format modifiers for AMD GFX9 and newer GPUs. >> >> This is particularly useful to determine if we can use DCC, and whether >> we need an extra display compat

Re: [PATCH] drm/amd/powerplay: add lock protection for swSMU APIs

2019-10-18 Thread Grodzovsky, Andrey
On 10/18/19 1:00 AM, Quan, Evan wrote: > > -Original Message- > From: Grodzovsky, Andrey > Sent: Thursday, October 17, 2019 10:22 PM > To: Quan, Evan ; amd-gfx@lists.freedesktop.org > Subject: Re: [PATCH] drm/amd/powerplay: add lock protection for swSMU APIs > > > On 10/16/19 11:55 PM, Qu

[PATCH 1/3] drm/amd/powerplay: add lock protection for swSMU APIs V2

2019-10-18 Thread Quan, Evan
This is a quick and low risk fix. Those APIs which are exposed to other IPs or to support sysfs/hwmon interfaces or DAL will have lock protection. Meanwhile no lock protection is enforced for swSMU internal used APIs. Future optimization is needed. V2: strip the lock protection for all swSMU inter

[PATCH 3/3] drm/amd/powerplay: clear the swSMU code layer

2019-10-18 Thread Quan, Evan
With this cleanup, the APIs from amdgpu_smu.c will map to ASIC specific ones directly. Those can be shared around all SMU V11/V12 ASICs will be put in smu_v11_0.c and smu_v12_0.c respectively. Change-Id: I9b98eb5ace5df19896de4b05c37255a38d1079ce Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/a

[PATCH 2/3] drm/amd/powerplay: split out those internal used swSMU APIs

2019-10-18 Thread Quan, Evan
Those swSMU APIs used internally are moved to smu_cmn.h while others are kept in amdgpu_smu.h. Change-Id: Ib726ef7f65dee46e47a07680b71e6e043e459f42 Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/powerplay/amdgpu_smu.c| 1 + drivers/gpu/drm/amd/powerplay/arcturus_ppt.c | 1 + .../gpu/d

Re: Spontaneous reboots when using RX 560

2019-10-18 Thread Sylvain Munaut
Hi Alex, > Does disabling the IOMMU help? E.g., append IOMMU=off or IOMMU=pt on > the kernel command line in grub. Good suggestion, I should have tried that earlier, unfortunately it doesn't change anything :/ I tried both independently and also combining with pci=noats and cg/pg mask=0. Same

[PATCH] drm/amdkfd: kfd open return failed if device is locked

2019-10-18 Thread Yang, Philip
If device is locked for suspend and resume, kfd open should return failed -EAGAIN without creating process, otherwise the application exit to release the process will hang to wait for resume is done if the suspend and resume is stuck somewhere. This is backtrace: [Thu Oct 17 16:43:37 2019] INFO: t

Re: Spontaneous reboots when using RX 560

2019-10-18 Thread Alex Deucher
Does disabling the IOMMU help? E.g., append IOMMU=off or IOMMU=pt on the kernel command line in grub. Alex On Fri, Oct 18, 2019 at 8:06 AM Sylvain Munaut <246...@gmail.com> wrote: > > Hi Christian, > > > > I would also test if disabling power features helps as well, try to add > > amdgpu.pg_mask

Re: Spontaneous reboots when using RX 560

2019-10-18 Thread Sylvain Munaut
Hi Christian, > I would also test if disabling power features helps as well, try to add > amdgpu.pg_mask=0 and amdgpu.cg_mask=0 to the kernel command line for > example. Thanks for the suggestion. Just tried this, no luck. Also tried 'runpm=0' (but apparently that's for laptop only so ...) Even

[PATCH] drm/ttm: use the parent resv for ghost objects v2

2019-10-18 Thread Christian König
This way the TTM is destroyed with the correct dma_resv object locked and we can even pipeline imported BO evictions. v2: Limit this to only cases when the parent object uses a separate reservation object as well. This fixes another OOM problem. Signed-off-by: Christian König --- drivers/gp

Re: radeon backtrace on fedora 31

2019-10-18 Thread Christian König
Looks like just another race condition during suspend/resume to me. Is that reproducible? Christian. Am 18.10.19 um 06:24 schrieb Dave Airlie: 5.3.4-300.fc31.x86_64 seems to be new. https://retrace.fedoraproject.org/faf/reports/2726149/ Dave. _

Re: [PATCH 2/2] drm/amdgpu/psp11: fix typo in comment

2019-10-18 Thread Xu, Feifei
Series is reviewed by Feifei Xu > 在 2019年10月18日,18:59,Yuan, Xiaojie 写道: > > Signed-off-by: Xiaojie Yuan > --- > drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c > b/drivers/gpu/drm/amd/amdg

[PATCH 2/2] drm/amdgpu/psp11: fix typo in comment

2019-10-18 Thread Yuan, Xiaojie
Signed-off-by: Xiaojie Yuan --- drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c b/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c index dfe85a1d79a5..4eb5bacb55f7 100644 --- a/drivers/gpu/drm/amd/amdgpu/psp_

[PATCH 1/2] drm/amdgpu/psp11: wait for sOS ready for ring creation

2019-10-18 Thread Yuan, Xiaojie
Signed-off-by: Xiaojie Yuan --- drivers/gpu/drm/amd/amdgpu/psp_v11_0.c | 8 1 file changed, 8 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c b/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c index e8e70b74ea5b..dfe85a1d79a5 100644 --- a/drivers/gpu/drm/amd/amdgpu/psp_v11_0.c

Re: Spontaneous reboots when using RX 560

2019-10-18 Thread Koenig, Christian
Am 17.10.19 um 22:12 schrieb Sylvain Munaut: > So a bit more testing. > > I was using a bit of "unusual" config I guess, having 2 GPUs and some > other pcie cards (10G, ..). > So I simplified and went to the most standard thing I could think of, > _just_ the RX 560 card plugged into the main PCIe 1

[PATCH][next] drm/amdgpu/psp: fix spelling mistake "initliaze" -> "initialize"

2019-10-18 Thread Colin King
From: Colin Ian King There is a spelling mistake in a DRM_ERROR error message. Fix it. Signed-off-by: Colin Ian King --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c b/drivers/gpu/drm/amd/am