RE: [PATCH] drm/amdgpu/swsmu: don't bail early on hw_setup on resume

2021-03-25 Thread Liu, Zhan
[AMD Official Use Only - Internal Distribution Only] > -Original Message- > From: amd-gfx On Behalf Of Alex > Deucher > Sent: 2021/March/26, Friday 12:38 AM > To: amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander > Subject: [PATCH] drm/amdgpu/swsmu: don't bail early on hw_setup on

Re: [PATCH] drm/amdgpu/swsmu: don't bail early on hw_setup on resume

2021-03-25 Thread Wang, Kevin(Yang)
[AMD Official Use Only - Internal Distribution Only] Reviewed-by: Kevin Wang Best Regards, Kevin From: amd-gfx on behalf of Alex Deucher Sent: Friday, March 26, 2021 12:37 PM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander Subject: [PATCH]

[PATCH] drm/amdgpu/swsmu: don't bail early on hw_setup on resume

2021-03-25 Thread Alex Deucher
The SMU comes back up with DPM enabled by the sbios, but the driver still has to set up the SMU/driver mailbox, etc. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

[PATCH] drm: Update MST First Link Slot Information Based on Encoding Format

2021-03-25 Thread Fangzhi Zuo
8b/10b encoding format requires to reserve the first slot for recording metadata. Real data transmission starts from the second slot, with a total of available 63 slots available. In 128b/132b encoding format, metadata is transmitted separately in LLCP packet before MTP. Real data transmission

Re: [PATCH] drm/amdkfd: Fix cat debugfs hang_hws file causes system crash bug

2021-03-25 Thread Felix Kuehling
Am 2021-03-23 um 10:56 a.m. schrieb Alex Deucher: > Applied. Thanks! Thanks. I thought we fixed this before by making the file write-only. But I guess that's not sufficient to stop root from reading it: commit 2bdac179e217a0c0b548a8c60524977586621b19 Author: Felix Kuehling Date: Thu Dec 19

RE: [PATCH v3] drm/scheduler re-insert Bailing job to avoid memleak

2021-03-25 Thread Zhang, Jack (Jian)
[AMD Official Use Only - Internal Distribution Only] Hi, Andrey, >>how u handle non guilty singnaled jobs in drm_sched_stop, currently looks >>like you don't call put for them and just explicitly free them as before Good point, I missed that place. Will cover that in my next patch. >>Also

RE: [PATCH v3] drm/scheduler re-insert Bailing job to avoid memleak

2021-03-25 Thread Zhang, Jack (Jian)
[AMD Official Use Only - Internal Distribution Only] Hi, Steve, Thank you for your detailed comments. But currently the patch is not finalized. We found some potential race condition even with this patch. The solution is under discussion and hopefully we could find an ideal one. After that, I

Re: [PATCH v2] drm/mst: Enhance MST topology logging

2021-03-25 Thread Lyude Paul
Reviewed-by: Lyude Paul Let me know if you need me to push this to drm-misc-next for you On Thu, 2021-03-25 at 14:06 -0400, Eryk Brol wrote: > [why] > MST topology print was missing fec logging and pdt printed > as an int wasn't clear. vcpi and payload info was printed as an > arbitrary series

Re: [PATCH 2/2] drm/amdgpu: Introduce new SETUP_TMR interface

2021-03-25 Thread Zeng, Oak
Thank you Lijo. I added two macro to calculate a bo's physical address. I also used those macros to simplified driver a little bit. Please help review Regards, Oak On 2021-03-23, 10:15 AM, "Lazar, Lijo" wrote: [AMD Public Use] -Original Message- From: amd-gfx On

[PATCH v2] drm/mst: Enhance MST topology logging

2021-03-25 Thread Eryk Brol
[why] MST topology print was missing fec logging and pdt printed as an int wasn't clear. vcpi and payload info was printed as an arbitrary series of ints which requires user to know the ordering of the prints, making the logs difficult to use. [how] -add fec logging -add pdt parsing into strings

Re: [PATCH] drm/amd: Fix a typo in two different sentences

2021-03-25 Thread Alex Deucher
Applied. Thanks! Alex On Mon, Mar 22, 2021 at 6:45 PM Randy Dunlap wrote: > > On 3/22/21 2:06 PM, Bhaskar Chowdhury wrote: > > > > s/defintion/definition/ .two different places. > > > > Signed-off-by: Bhaskar Chowdhury > > Acked-by: Randy Dunlap > > > --- > >

Re: [PATCH] drm/amd/amdgpu/gfx_v7_0: Trivial typo fixes

2021-03-25 Thread Alex Deucher
Applied. Thanks! Alex On Thu, Mar 25, 2021 at 5:26 AM Nirmoy wrote: > > > Reviewed-by: Nirmoy Das > > On 3/25/21 9:53 AM, Bhaskar Chowdhury wrote: > > s/acccess/access/ > > s/inferface/interface/ > > s/sequnce/sequence/ .two different places. > > s/retrive/retrieve/ > >

Re: [PATCH V2] drm/radeon/r600_cs: Few typo fixes

2021-03-25 Thread Alex Deucher
Applied. Thanks! Alex On Wed, Mar 24, 2021 at 7:46 PM Randy Dunlap wrote: > > On 3/24/21 4:29 PM, Bhaskar Chowdhury wrote: > > s/miror/mirror/ > > s/needind/needing/ > > s/informations/information/ > > > > Signed-off-by: Bhaskar Chowdhury > > Acked-by: Randy Dunlap > > Thanks. > > > --- > >

Re: [PATCH] amdgpu: securedisplay: simplify i2c hexdump output

2021-03-25 Thread Alex Deucher
Applied. Thanks! Alex On Wed, Mar 24, 2021 at 9:37 AM Arnd Bergmann wrote: > > From: Arnd Bergmann > > A previous fix I did left a rather complicated loop in > amdgpu_securedisplay_debugfs_write() for what could be expressed in a > simple sprintf, as Rasmus pointed out. > > This drops the

Re: [PATCH v2] drm/amdgpu: Ensure that the modifier requested is supported by plane.

2021-03-25 Thread Alex Deucher
On Wed, Mar 24, 2021 at 4:16 PM Mark Yacoub wrote: > > From: Mark Yacoub > > On initializing the framebuffer, call drm_any_plane_has_format to do a > check if the modifier is supported. drm_any_plane_has_format calls > dm_plane_format_mod_supported which is extended to validate that the >

[PATCH 4/4] drm/amdgpu: Introduce new SETUP_TMR interface

2021-03-25 Thread Oak Zeng
This new interface passes both virtual and physical address to PSP. It is backword compatible with old interface. v2: use a macro to simply tmr physical address calc (Lijo) Signed-off-by: Oak Zeng --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 12 +---

[PATCH 3/4] Revert "drm/amdgpu: workaround the TMR MC address issue (v2)"

2021-03-25 Thread Oak Zeng
This reverts commit 34a33d4683cba7ba63c894132efb1998c0217631. Signed-off-by: Oak Zeng --- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h | 9 - drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 10 -- drivers/gpu/drm/amd/amdgpu/gfxhub_v1_0.c | 21 ++---

[PATCH 1/4] drm/amdgpu: Macros for vram physical addr calculation

2021-03-25 Thread Oak Zeng
Add one macro to calculate BO's GPU physical address. And another one to calculate BO's CPU physical address. Signed-off-by: Oak Zeng Suggested-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.h | 3 +++ 1 file changed, 3 insertions(+) diff --git

[PATCH 2/4] drm/amdgpu: use macros to simplify codes

2021-03-25 Thread Oak Zeng
Use amdgpu_gmc_gpu_pa and amdgpu_gmc_cpu_pa to simplify codes. No logic change. Signed-off-by: Oak Zeng --- drivers/gpu/drm/amd/amdgpu/amdgpu_amdkfd_gpuvm.c | 3 +-- drivers/gpu/drm/amd/amdgpu/amdgpu_fb.c | 4 +--- drivers/gpu/drm/amd/amdgpu/amdgpu_gem.c | 4 +---

Re: [PATCH v3] drm/scheduler re-insert Bailing job to avoid memleak

2021-03-25 Thread Andrey Grodzovsky
There are a few issues here like - how u handle non guilty singnaled jobs in drm_sched_stop, currently looks like you don't call put for them and just explicitly free them as before. Also sched->free_guilty seems useless with the new approach. Do we even need the cleanup mechanism at

Re: Need to support mixed memory mappings with HMM

2021-03-25 Thread Felix Kuehling
Am 2021-03-25 um 12:22 p.m. schrieb Christian König: >> My idea is to change the amdgpu_vm_update_mapping interface to use >> some >> high-bit in the pages_addr array to indicate the page type. For the >> default page type (0) nothing really changes for the callers. The >>

Re: Need to support mixed memory mappings with HMM

2021-03-25 Thread Christian König
Am 25.03.21 um 17:20 schrieb Felix Kuehling: Am 2021-03-25 um 12:16 p.m. schrieb Christian König: Am 25.03.21 um 17:14 schrieb Felix Kuehling: Am 2021-03-25 um 12:10 p.m. schrieb Christian König: Am 25.03.21 um 17:03 schrieb Felix Kuehling: Hi, This is a long one with a proposal for a

Re: [PATCH drm/amdgpu 0/2] Convert sysfs sprintf/snprintf family to sysfs_emit

2021-03-25 Thread Alex Deucher
Applied the series. Thanks! Alex On Wed, Mar 24, 2021 at 5:17 AM Tian Tao wrote: > > Use the generic sysfs_emit() function to take place of > snprintf/scnprintf, to avoid buffer overrun. > > Tian Tao (2): > drm/amdgpu: Convert sysfs sprintf/snprintf family to sysfs_emit > drm/amd/pm:

Re: Need to support mixed memory mappings with HMM

2021-03-25 Thread Felix Kuehling
Am 2021-03-25 um 12:16 p.m. schrieb Christian König: > Am 25.03.21 um 17:14 schrieb Felix Kuehling: >> Am 2021-03-25 um 12:10 p.m. schrieb Christian König: >>> >>> Am 25.03.21 um 17:03 schrieb Felix Kuehling: Hi, This is a long one with a proposal for a pretty significant

Re: Need to support mixed memory mappings with HMM

2021-03-25 Thread Christian König
Am 25.03.21 um 17:14 schrieb Felix Kuehling: Am 2021-03-25 um 12:10 p.m. schrieb Christian König: Am 25.03.21 um 17:03 schrieb Felix Kuehling: Hi, This is a long one with a proposal for a pretty significant redesign of how we handle migrations and VRAM management with HMM. This is based on

Re: Need to support mixed memory mappings with HMM

2021-03-25 Thread Felix Kuehling
Am 2021-03-25 um 12:10 p.m. schrieb Christian König: > > > Am 25.03.21 um 17:03 schrieb Felix Kuehling: >> Hi, >> >> This is a long one with a proposal for a pretty significant redesign of >> how we handle migrations and VRAM management with HMM. This is based on >> my own debugging and reading of

Re: Color mode exposed to user space?

2021-03-25 Thread Alex Deucher
+ dri-devel I don't think it's currently exposed anywhere. Alex On Wed, Mar 24, 2021 at 5:11 AM Werner Sembach wrote: > > Hello, > > is the information which color mode is currently in used for a display (RGB, > YCbCr444, or YCbCr420) exposed to user space somewhere? > > If no: Where would be

Re: Need to support mixed memory mappings with HMM

2021-03-25 Thread Christian König
Am 25.03.21 um 17:03 schrieb Felix Kuehling: Hi, This is a long one with a proposal for a pretty significant redesign of how we handle migrations and VRAM management with HMM. This is based on my own debugging and reading of the migrate_vma helpers, as well as Alex's problems with migrations

Re: [PATCH] drm/radeon/radeon_pm: Convert sysfs sprintf/snprintf family to sysfs_emit

2021-03-25 Thread Alex Deucher
On Wed, Mar 24, 2021 at 2:47 AM Tian Tao wrote: > > Fix the following coccicheck warning: > drivers/gpu//drm/radeon/radeon_pm.c:521:9-17: WARNING: use scnprintf or > sprintf > drivers/gpu//drm/radeon/radeon_pm.c:475:8-16: WARNING: use scnprintf or > sprintf >

Need to support mixed memory mappings with HMM

2021-03-25 Thread Felix Kuehling
Hi, This is a long one with a proposal for a pretty significant redesign of how we handle migrations and VRAM management with HMM. This is based on my own debugging and reading of the migrate_vma helpers, as well as Alex's problems with migrations on A+A. I hope we can discuss this next Monday

Re: drm/ttm: switch to per device LRU lock

2021-03-25 Thread Christian König
Thanks! Just a copy issue. Patch to fix this is on the mailing list. Christian. Am 25.03.21 um 16:00 schrieb Colin Ian King: Hi, Static analysis with Coverity in linux-next has detected an issue in drivers/gpu/drm/ttm/ttm_bo.c with the follow commit: commit

re: drm/ttm: switch to per device LRU lock

2021-03-25 Thread Colin Ian King
Hi, Static analysis with Coverity in linux-next has detected an issue in drivers/gpu/drm/ttm/ttm_bo.c with the follow commit: commit a1f091f8ef2b680a5184db065527612247cb4cae Author: Christian König Date: Tue Oct 6 17:26:42 2020 +0200 drm/ttm: switch to per device LRU lock Instead of

Re: [PATCH] drm/amd/pm: no need to force MCLK to highest when no display connected

2021-03-25 Thread Deucher, Alexander
[AMD Official Use Only - Internal Distribution Only] Reviewed-by: Alex Deucher Tested-by: Alex Deucher From: amd-gfx on behalf of Evan Quan Sent: Thursday, March 25, 2021 12:18 AM To: amd-gfx@lists.freedesktop.org Cc: Quan, Evan Subject: [PATCH]

[PATCH] drm/amd/amdgpu/gfx_v7_0: Trivial typo fixes

2021-03-25 Thread Bhaskar Chowdhury
s/acccess/access/ s/inferface/interface/ s/sequnce/sequence/ .two different places. s/retrive/retrieve/ s/sheduling/scheduling/ s/independant/independent/ s/wether/whether/ ..two different places. s/emmit/emit/ s/synce/sync/ Signed-off-by: Bhaskar Chowdhury ---

RE: [PATCH 2/2] drm/amd/pm: unify the interface for gfx state setting

2021-03-25 Thread Lazar, Lijo
[AMD Public Use] Series is Reviewed-by: Lijo Lazar -Original Message- From: amd-gfx On Behalf Of Evan Quan Sent: Thursday, March 25, 2021 4:12 PM To: amd-gfx@lists.freedesktop.org Cc: Quan, Evan Subject: [PATCH 2/2] drm/amd/pm: unify the interface for gfx state setting No

RE: [PATCH 2/2] drm/amd/pm: fix missing static declarations

2021-03-25 Thread Lazar, Lijo
[AMD Public Use] Series is Reviewed-by: Lijo Lazar -Original Message- From: amd-gfx On Behalf Of Evan Quan Sent: Thursday, March 25, 2021 9:51 AM To: amd-gfx@lists.freedesktop.org Cc: Quan, Evan Subject: [PATCH 2/2] drm/amd/pm: fix missing static declarations Add "static"

[PATCH 1/2] drm/amd/pm: unify the interface for power gating

2021-03-25 Thread Evan Quan
No need to have special handling for swSMU supported ASICs. Change-Id: I7292c1064c3a1c75dc9f91d7c5318eab4f407241 Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/pm/amdgpu_dpm.c | 9 - drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h | 3 --- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 6

[PATCH 2/2] drm/amd/pm: unify the interface for gfx state setting

2021-03-25 Thread Evan Quan
No need to have special handling for swSMU supported ASICs. Change-Id: I029414efa63c130a1a3aaba908bbf3857c5873ff Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 16 ++-- drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h | 2 --

RE: [PATCH v3] drm/scheduler re-insert Bailing job to avoid memleak

2021-03-25 Thread Zhang, Jack (Jian)
[AMD Official Use Only - Internal Distribution Only] Hi, Andrey Thank you for your good opinions. I literally agree with you that the refcount could solve the get_clean_up_up cocurrent job gracefully, and no need to re-insert the job back anymore. I quickly made a draft for this idea as

Re: [PATCH] drm/amd/amdgpu/gfx_v7_0: Trivial typo fixes

2021-03-25 Thread Nirmoy
Reviewed-by: Nirmoy Das On 3/25/21 9:53 AM, Bhaskar Chowdhury wrote: s/acccess/access/ s/inferface/interface/ s/sequnce/sequence/ .two different places. s/retrive/retrieve/ s/sheduling/scheduling/ s/independant/independent/ s/wether/whether/ ..two different places. s/emmit/emit/

Re: [PATCH] drm/amdgpu/pm: bail on sysfs/debugfs queries during platform suspend

2021-03-25 Thread Christian König
Am 25.03.21 um 04:29 schrieb Quan, Evan: [AMD Public Use] Maybe we can have an API like is_hw_access_blocked(). So that we can put all those checks below within it. if (amdgpu_in_reset(adev)) return -EPERM; + if (adev->in_suspend && !adev->in_runpm) +