[PATCH] drm/amd/display: add missing NULL check for DML2

2023-10-09 Thread Bob Zhou
Recently, the driver introduce DML2 for future ASIC support. But, some ASIC's hubbub pointer is null before calling. It cause the below null pointer issue, so add null check to fix it. BUG: kernel NULL pointer dereference, address: RIP: 0010:dc_create_resource_pool+0xc1/0x2c0

RE: [PATCH] drm/amd/pm: wait for completion of the EnableGfxImu command

2023-10-09 Thread Zhang, Yifan
[AMD Official Use Only - General] I'm wondering why it is "without waiting" in the first place ? It doesn't make sense to continue driver loading if power up GFX fails. Can we apply the change regardless of load types ? -Original Message- From: Huang, Tim Sent: Tuesday, October 10,

Re: [PATCH v3 3/3] drm/amd/pm: Use gpu_metrics_v1_4 for SMUv13.0.6

2023-10-09 Thread Lazar, Lijo
On 10/9/2023 8:23 PM, Asad Kamal wrote: Use gpu_metrics_v1_4 for SMUv13.0.6 to fill gpu metric info v3: Removed filling gpu metric instantaneous pcie bw Signed-off-by: Asad Kamal A special note inline. Series is- Reviewed-by: Lijo Lazar ---

[PATCH] drm/amd/pm: wait for completion of the EnableGfxImu command

2023-10-09 Thread Tim Huang
Wait for completion of sending the EnableGfxImu message when using the PSP FW loading. Signed-off-by: Tim Huang --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c

Re: [PATCH] drm/amdgpu: Return -EINVAL when MMSCH init status incorrect

2023-10-09 Thread Chen, JingWen (Wayne)
Reviewed-by: Jingwen Chen -- Best Regards, JingWen Chen On 2023/10/8 18:06, Lin.Cao wrote: Return -EINVAL when MMSCH init fail which can be handle by function amdgpu_device_reset_sriov correctly. Signed-off-by: Lin.Cao --- drivers/gpu/drm/amd/amdgpu/jpeg_v4_0.c | 5 - 1 file changed,

RE: [PATCH] drm/amd/pm: Fix a memory leak on an error path

2023-10-09 Thread Wang, Yang(Kevin)
Fixes: 511a95552ec8 ("drm/amd/pm: Add SMU 13.0.6 support") Please add above information into your patch commit message. Reviewed-by: Yang Wang Best Regards, Kevin -Original Message- From: Kunwu.Chan Sent: Tuesday, October 10, 2023 10:19 AM To: evan.q...@amd.com; Deucher, Alexander ;

RE: [PATCH] drm/amdgpu:Check gfx poweron when skip flush_gpu_tlb

2023-10-09 Thread Xu, Feifei
[AMD Official Use Only - General] Yes, adev->gfx.is_poweron check will be applied in gmc_v11 callback, which will be called after the generic gmc part: amdgpu_gmc_flush_gpu_tlb() function. But in commit: d0c860f33553 ("drm/amdgpu: rework lock handling for flush_tlb v2"), the flush is moved at a

Re: [PATCH 2/3] drm/amdgpu/umsch: power on/off UMSCH by DLDO

2023-10-09 Thread Lang Yu
On 10/10/ , Deucher, Alexander wrote: > [Public] > > > -Original Message- > > From: Yu, Lang > > Sent: Saturday, October 7, 2023 4:54 AM > > To: amd-gfx@lists.freedesktop.org > > Cc: Deucher, Alexander ; Zhang, Yifan > > ; Gopalakrishnan, Veerabadhran (Veera) > > ; Yu, Lang > > Subject:

Re: [PATCH 2/3] drm/amdgpu/umsch: power on/off UMSCH by DLDO

2023-10-09 Thread Lang Yu
On 10/10/ , Deucher, Alexander wrote: > [Public] > > > -Original Message- > > From: Yu, Lang > > Sent: Saturday, October 7, 2023 4:54 AM > > To: amd-gfx@lists.freedesktop.org > > Cc: Deucher, Alexander ; Zhang, Yifan > > ; Gopalakrishnan, Veerabadhran (Veera) > > ; Yu, Lang > > Subject:

Re: [PATCH] drm/amd/display: Enable fast plane updates on DCN3.2 and above when state->allow_modeset = true

2023-10-09 Thread Mario Limonciello
On 10/7/2023 00:41, Tianci Yin wrote: From: tiancyin [why] When cursor moves across screen boarder, lag cursor observed, since subvp settings need to sync up with vblank, that cause cursor updates being delayed. [how] Enable fast plane updates on DCN3.2 to fix it. Signed-off-by: tiancyin

RE: [PATCH 2/3] drm/amdgpu/umsch: power on/off UMSCH by DLDO

2023-10-09 Thread Deucher, Alexander
[Public] > -Original Message- > From: Yu, Lang > Sent: Saturday, October 7, 2023 4:54 AM > To: amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander ; Zhang, Yifan > ; Gopalakrishnan, Veerabadhran (Veera) > ; Yu, Lang > Subject: [PATCH 2/3] drm/amdgpu/umsch: power on/off UMSCH by DLDO

RE: [PATCH 2/3] drm/amdgpu/umsch: power on/off UMSCH by DLDO

2023-10-09 Thread Deucher, Alexander
[Public] > -Original Message- > From: Yu, Lang > Sent: Saturday, October 7, 2023 4:54 AM > To: amd-gfx@lists.freedesktop.org > Cc: Deucher, Alexander ; Zhang, Yifan > ; Gopalakrishnan, Veerabadhran (Veera) > ; Yu, Lang > Subject: [PATCH 2/3] drm/amdgpu/umsch: power on/off UMSCH by DLDO

Re: [PATCH] drm/amdgpu: fix SI failure due to doorbells allocation

2023-10-09 Thread Alex Deucher
Applied. Thanks! On Mon, Oct 9, 2023 at 5:27 AM Sharma, Shashank wrote: > > [AMD Official Use Only - General] > > Reviewed-by: Shashank Sharma > > Regards > Shashank > -Original Message- > From: Icenowy Zheng > Sent: Sunday, October 8, 2023 8:47 AM > To: Deucher, Alexander ; Koenig,

Re: [PATCH v6 4/7] drm/amd: Capture errors in amdgpu_switcheroo_set_state()

2023-10-09 Thread Mario Limonciello
On 10/9/2023 13:40, Alex Deucher wrote: On Mon, Oct 9, 2023 at 12:52 PM Mario Limonciello wrote: amdgpu_switcheroo_set_state() calls lots of functions that could fail under memory pressure or for other reasons. Don't assume everything can successfully run sequentially, and check return codes

Re: [PATCH v6 4/7] drm/amd: Capture errors in amdgpu_switcheroo_set_state()

2023-10-09 Thread Alex Deucher
On Mon, Oct 9, 2023 at 12:52 PM Mario Limonciello wrote: > > amdgpu_switcheroo_set_state() calls lots of functions that could > fail under memory pressure or for other reasons. Don't assume > everything can successfully run sequentially, and check return codes > for everything that returns one.

[PATCH] drm/amdgpu: enable GFX IP v11.5.0 CG and PG support

2023-10-09 Thread Alex Deucher
From: Li Ma Add CG support for GFX/MC/HDP/ATHUB/IH/BIF. Add PG support for GFX. Signed-off-by: Li Ma Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/athub_v3_0.c | 1 + drivers/gpu/drm/amd/amdgpu/gfx_v11_0.c | 3 +++ drivers/gpu/drm/amd/amdgpu/soc21.c | 22

[PATCH 3/3] drm/amdgpu: add support to power up/down UMSCH by SMU

2023-10-09 Thread Alex Deucher
From: Lang Yu Power up/down UMSCH by SMU. Signed-off-by: Lang Yu Acked-by: Leo Liu Acked-by: Veerabadhran Gopalakrishnan Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 26 +++ drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 1 + 2 files

[PATCH 1/3] drm/amdgpu: add support to powerup VPE by SMU

2023-10-09 Thread Alex Deucher
From: Lang Yu Powerup VPE by SMU. Signed-off-by: Lang Yu Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/pm/amdgpu_dpm.c | 1 + drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 29 +++ drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 1 + 3 files changed, 31

[PATCH 2/3] drm/amdgpu: add power up/down UMSCH ppt callback

2023-10-09 Thread Alex Deucher
From: Lang Yu Add ppt callback to power up/down UMSCH. v2: squash in updates (Alex) Signed-off-by: Lang Yu Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 6 ++ drivers/gpu/drm/amd/pm/swsmu/inc/smu_types.h| 6 +-

[PATCH 4/5] drm/amd/swsmu: add smu14 ip support

2023-10-09 Thread Alex Deucher
From: Kenneth Feng Add initial swSMU support for smu 14 series ASIC. v2: squash in build fixes and updates (Li Ma) fix warnings (Alex) v3: squash in updates (Alex) v4: squash in updates (Alex) v5: squash in avg/current power updates (Alex) Signed-off-by: Li Ma Signed-off-by: Kenneth Feng

[PATCH 5/5] drm/amdgpu/discovery: add SMU 14 support

2023-10-09 Thread Alex Deucher
From: Li Ma add smu 14 into the IP discovery list. Signed-off-by: Li Ma Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 3 +++ drivers/gpu/drm/amd/include/kgd_pp_interface.h | 1 + drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 8 3 files changed,

[PATCH 2/5] drm/amd/swsmu: add smu v14_0_0 ppsmc file

2023-10-09 Thread Alex Deucher
From: Li Ma Add initial smu v14_0_0 ppsmc file v2: squash in updates (Alex) v3: squash in updates (Alex) Signed-off-by: Li Ma Signed-off-by: Alex Deucher --- .../pm/swsmu/inc/pmfw_if/smu_v14_0_0_ppsmc.h | 142 ++ 1 file changed, 142 insertions(+) create mode 100644

[PATCH 3/5] drm/amd/swsmu: add smu v14_0_0 pmfw if file

2023-10-09 Thread Alex Deucher
From: Li Ma Add initial smu v14_0_0 pmfw if file v2: squash in updates (Alex) Signed-off-by: Li Ma Signed-off-by: Alex Deucher --- .../pm/swsmu/inc/pmfw_if/smu_v14_0_0_pmfw.h | 156 ++ 1 file changed, 156 insertions(+) create mode 100644

[PATCH 1/5] drm/amdgpu/swsmu: add smu v14_0_0 driver if file

2023-10-09 Thread Alex Deucher
From: Li Ma Add initial smu v14_0_0 driver if file v2: squash in updates (Alex) v3: update interface (Alex) Signed-off-by: Li Ma Signed-off-by: Alex Deucher --- .../inc/pmfw_if/smu14_driver_if_v14_0_0.h | 281 ++ 1 file changed, 281 insertions(+) create mode 100644

[PATCH 0/5] Add SMU 14.0 support

2023-10-09 Thread Alex Deucher
This adds support for SMU 14.0 support. SMU is the IP block which runs PMFW and manages power for the GPU. Kenneth Feng (1): drm/amd/swsmu: add smu14 ip support Li Ma (4): drm/amdgpu/swsmu: add smu v14_0_0 driver if file drm/amd/swsmu: add smu v14_0_0 ppsmc file drm/amd/swsmu: add smu

Re: [PATCH AUTOSEL 5.10 13/22] drm/amdgpu: install stub fence into potential unused fence pointers

2023-10-09 Thread Greg KH
On Mon, Oct 09, 2023 at 02:46:40PM +0200, Christian König wrote: > Am 07.10.23 um 11:50 schrieb Greg KH: > > On Sun, Sep 10, 2023 at 03:43:01PM -0500, Bryan Jennings wrote: > > > This is also causing log spam on 5.15. It was included in 5.15.128 as > > > commit

Re: [PATCH v2] drm/amdgpu: Address member 'gart_placement' not described in 'amdgpu_gmc_gart_location'

2023-10-09 Thread Alex Deucher
On Mon, Oct 9, 2023 at 12:17 PM Srinivasan Shanmugam wrote: > > Fixes the below: > drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c:274: warning: Function parameter or > member 'gart_placement' not described in 'amdgpu_gmc_gart_location' > > Cc: Christian König > Cc: Alex Deucher > Cc: "Pan, Xinhui" >

[PATCH v6 6/7] drm/amd/display: Destroy DC context while keeping DML and DML2

2023-10-09 Thread Mario Limonciello
If there is memory pressure at suspend time then dynamically allocating a large structure as part of DC suspend code will fail. Instead re-use the same structures and clear all members except those that should be maintained. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2362 Acked-by:

[PATCH v6 7/7] drm/amd/display: make dc_set_power_state() return type `void` again

2023-10-09 Thread Mario Limonciello
As dc_set_power_state() no longer allocates memory, it's not necessary to have return types and check return code as it can't fail anymore. Change it back to `void`. Reviewed-by: Alex Deucher Signed-off-by: Mario Limonciello --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 17

[PATCH v6 5/7] drm/amd/display: Catch errors from drm_atomic_helper_suspend()

2023-10-09 Thread Mario Limonciello
drm_atomic_helper_suspend() can return PTR_ERR(), in which case the error gets stored into `dm->cached_state`. This can cause failures during resume. Catch the error during suspend and fail the suspend instead. Link: https://gitlab.freedesktop.org/drm/amd/-/issues/2362 Acked-by: Christian König

[PATCH v6 4/7] drm/amd: Capture errors in amdgpu_switcheroo_set_state()

2023-10-09 Thread Mario Limonciello
amdgpu_switcheroo_set_state() calls lots of functions that could fail under memory pressure or for other reasons. Don't assume everything can successfully run sequentially, and check return codes for everything that returns one. Acked-by: Christian König Signed-off-by: Mario Limonciello ---

[PATCH v6 3/7] drm/amd: Split up UVD suspend into prepare and suspend steps

2023-10-09 Thread Mario Limonciello
amdgpu_uvd_suspend() allocates memory and copies objects into that allocated memory. This fails under memory pressure. Instead move majority of this code into a prepare step when swap can still be allocated. Reviewed-by: Christian König Signed-off-by: Mario Limonciello --- v5->v6: * Drop

[PATCH v6 2/7] drm/amd: Add concept of running prepare_suspend() sequence for IP blocks

2023-10-09 Thread Mario Limonciello
If any IP blocks allocate memory during their hw_fini() sequence this can cause the suspend to fail under memory pressure. Introduce a new phase that IP blocks can use to allocate memory before suspend starts so that it can potentially be evicted into swap instead. Reviewed-by: Christian König

[PATCH v6 1/7] drm/amd: Evict resources during PM ops prepare() callback

2023-10-09 Thread Mario Limonciello
Linux PM core has a prepare() callback run before suspend. If the system is under high memory pressure, the resources may need to be evicted into swap instead. If the storage backing for swap is offlined during the suspend() step then such a call may fail. So move this step into prepare() to

[PATCH v6 0/7] Better handle memory pressure at suspend

2023-10-09 Thread Mario Limonciello
At suspend time if there is memory pressure then dynamically allocating memory will cause failures that don't clean up properly when trying suspend a second time. Move the bigger memory allocations into Linux PM prepare() callback, drop allocations that aren't really needed in DC code and report

[PATCH v2] drm/amdgpu: Address member 'gart_placement' not described in 'amdgpu_gmc_gart_location'

2023-10-09 Thread Srinivasan Shanmugam
Fixes the below: drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c:274: warning: Function parameter or member 'gart_placement' not described in 'amdgpu_gmc_gart_location' Cc: Christian König Cc: Alex Deucher Cc: "Pan, Xinhui" Signed-off-by: Srinivasan Shanmugam --- v2: - s/in/around

RE: [PATCH 3/3] drm/amdgpu/umsch: enable doorbell for umsch

2023-10-09 Thread Gopalakrishnan, Veerabadhran (Veera)
[AMD Official Use Only - General] Reviewed-by: Veerabadhran Gopalakrishnan -Veera -Original Message- From: Yu, Lang Sent: Saturday, October 7, 2023 2:24 PM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Zhang, Yifan ; Gopalakrishnan, Veerabadhran (Veera) ; Yu, Lang

RE: [PATCH 2/3] drm/amdgpu/umsch: power on/off UMSCH by DLDO

2023-10-09 Thread Gopalakrishnan, Veerabadhran (Veera)
[AMD Official Use Only - General] Reviewed-by: Veerabadhran Gopalakrishnan -Veera -Original Message- From: Yu, Lang Sent: Saturday, October 7, 2023 2:24 PM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Zhang, Yifan ; Gopalakrishnan, Veerabadhran (Veera) ; Yu, Lang

RE: [PATCH 1/3] drm/amdgpu/umsch: fix psp frontdoor loading

2023-10-09 Thread Gopalakrishnan, Veerabadhran (Veera)
[AMD Official Use Only - General] Reviewed-by: Veerabadhran Gopalakrishnan -Veera -Original Message- From: Yu, Lang Sent: Saturday, October 7, 2023 2:24 PM To: amd-gfx@lists.freedesktop.org Cc: Deucher, Alexander ; Zhang, Yifan ; Gopalakrishnan, Veerabadhran (Veera) ; Yu, Lang

[PATCH] drm/amdgpu: Address member 'gart_placement' not described in 'amdgpu_gmc_gart_location'

2023-10-09 Thread Srinivasan Shanmugam
Fixes the below: drivers/gpu/drm/amd/amdgpu/amdgpu_gmc.c:274: warning: Function parameter or member 'gart_placement' not described in 'amdgpu_gmc_gart_location' Cc: Christian König Cc: Alex Deucher Cc: "Pan, Xinhui" Signed-off-by: Srinivasan Shanmugam ---

[PATCH v3 2/3] drm/amd/pm: Add gpu_metrics_v1_4

2023-10-09 Thread Asad Kamal
Add new gpu_metrics_v1_4 to acquire XGMI data transfer, pcie bandwidth & Clock lock status v2: Add pcie error counter to gpu metric table v1_4 Signed-off-by: Asad Kamal --- .../gpu/drm/amd/include/kgd_pp_interface.h| 76 +++ drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c|

[PATCH v3 3/3] drm/amd/pm: Use gpu_metrics_v1_4 for SMUv13.0.6

2023-10-09 Thread Asad Kamal
Use gpu_metrics_v1_4 for SMUv13.0.6 to fill gpu metric info v3: Removed filling gpu metric instantaneous pcie bw Signed-off-by: Asad Kamal --- .../drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 65 --- 1 file changed, 41 insertions(+), 24 deletions(-) diff --git

[PATCH v3 1/3] drm/amd/pm: Update metric table for smu v13_0_6

2023-10-09 Thread Asad Kamal
Update pmfw metric table to include xgmi transfer data and pci instantaneous bandwidth for smu v13_0_6 v2: Updated metric table version v3: Removed inst pcie bw with alignment to metrics table version 8 Signed-off-by: Asad Kamal --- .../gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_pmfw.h|

Re: [PATCH v5 6/7] drm/amd/display: Destroy DC context while keeping DML and DML2

2023-10-09 Thread Alex Deucher
On Sat, Oct 7, 2023 at 3:47 AM Mario Limonciello wrote: > > If there is memory pressure at suspend time then dynamically > allocating a large structure as part of DC suspend code will > fail. > > Instead re-use the same structures and clear all members except > those that should be maintained. >

Re: [PATCH v5 5/7] drm/amd/display: Catch errors from drm_atomic_helper_suspend()

2023-10-09 Thread Alex Deucher
On Sun, Oct 8, 2023 at 6:57 PM Mario Limonciello wrote: > > drm_atomic_helper_suspend() can return PTR_ERR(), in which case the > error gets stored into `dm->cached_state`. This can cause failures > during resume. Catch the error during suspend and fail the suspend > instead. > > Link:

Re: [PATCH v5 3/7] drm/amd: Split up UVD suspend into prepare and suspend steps

2023-10-09 Thread Alex Deucher
On Fri, Oct 6, 2023 at 3:07 PM Mario Limonciello wrote: > > amdgpu_uvd_suspend() allocates memory and copies objects into that > allocated memory. This fails under memory pressure. Instead move > majority of this code into a prepare step when swap can still be > allocated. > > Signed-off-by:

Re: [PATCH v5 1/7] drm/amd: Evict resources during PM ops prepare() callback

2023-10-09 Thread Alex Deucher
On Fri, Oct 6, 2023 at 3:17 PM Mario Limonciello wrote: > > Linux PM core has a prepare() callback run before suspend. > > If the system is under high memory pressure, the resources may need > to be evicted into swap instead. If the storage backing for swap > is offlined during the suspend()

Re: [PATCH v5 2/7] drm/amd: Add concept of running prepare() sequence for IP blocks

2023-10-09 Thread Alex Deucher
On Fri, Oct 6, 2023 at 2:51 PM Mario Limonciello wrote: > > If any IP blocks allocate memory during their sw_fini() sequence > this can cause the suspend to fail under memory pressure. Introduce > a new phase that IP blocks can use to allocate memory before suspend > starts so that it can

RE: [PATCH v2 3/3] drm/amd/pm: Use gpu_metrics_v1_4 for SMUv13.0.6

2023-10-09 Thread Kamal, Asad
[AMD Official Use Only - General] -Original Message- From: Lazar, Lijo Sent: Monday, October 9, 2023 7:59 PM To: Kamal, Asad ; amd-gfx@lists.freedesktop.org Cc: Ma, Le ; Zhang, Morris ; Zhang, Hawking Subject: Re: [PATCH v2 3/3] drm/amd/pm: Use gpu_metrics_v1_4 for SMUv13.0.6 On

Re: [PATCH v2 3/3] drm/amd/pm: Use gpu_metrics_v1_4 for SMUv13.0.6

2023-10-09 Thread Lazar, Lijo
On 10/9/2023 5:28 PM, Lazar, Lijo wrote: On 10/6/2023 8:11 PM, Asad Kamal wrote: Use gpu_metrics_v1_4 for SMUv13.0.6 to fill gpu metric info Signed-off-by: Asad Kamal Series is: Reviewed-by: Lijo Lazar On a second thought, since there is no FW release yet with FW metrics

Re: [PATCH v2 4/4] drm/amd/pm: Add sysfs attribute to get pm log

2023-10-09 Thread Alex Deucher
On Mon, Oct 9, 2023 at 4:41 AM Christian König wrote: > > Am 06.10.23 um 16:24 schrieb Alex Deucher: > > On Fri, Oct 6, 2023 at 4:32 AM Christian König > > wrote: > >> Am 06.10.23 um 07:21 schrieb Lijo Lazar: > >>> Add sysfs attribute to read power management log. A snapshot is > >>> captured to

Re: [PATCH v2 06/16] platform/x86/amd/pmf: Add support to get inputs from other subsystems

2023-10-09 Thread Ilpo Järvinen
On Mon, 9 Oct 2023, Shyam Sundar S K wrote: > On 10/4/2023 5:44 PM, Ilpo Järvinen wrote: > > On Sat, 30 Sep 2023, Shyam Sundar S K wrote: > > > >> PMF driver sends changing inputs from each subystem to TA for evaluating > >> the conditions in the policy binary. > >> > >> Add initial support of

Re: [PATCH v2 01/16] platform/x86/amd/pmf: Add PMF TEE interface

2023-10-09 Thread Ilpo Järvinen
On Mon, 9 Oct 2023, Shyam Sundar S K wrote: > > > On 10/4/2023 4:20 PM, Ilpo Järvinen wrote: > > On Sat, 30 Sep 2023, Shyam Sundar S K wrote: > > > >> AMD PMF driver loads the PMF TA (Trusted Application) into the AMD > >> ASP's (AMD Security Processor) TEE (Trusted Execution Environment). >

Re: [PATCH v2 12/16] platform/x86/amd/pmf: Add PMF-AMDGPU get interface

2023-10-09 Thread Ilpo Järvinen
On Mon, 9 Oct 2023, Shyam Sundar S K wrote: > On 10/4/2023 6:19 PM, Ilpo Järvinen wrote: > > On Sat, 30 Sep 2023, Shyam Sundar S K wrote: > > > >> In order to provide GPU inputs to TA for the Smart PC solution to work, we > >> need to have interface between the PMF driver and the AMDGPU driver. >

Re: [PATCH v2 04/16] platform/x86/amd/pmf: Add support for PMF Policy Binary

2023-10-09 Thread Ilpo Järvinen
On Mon, 9 Oct 2023, Shyam Sundar S K wrote: > On 10/4/2023 5:30 PM, Ilpo Järvinen wrote: > > On Sat, 30 Sep 2023, Shyam Sundar S K wrote: > > > >> PMF Policy binary is a encrypted and signed binary that will be part > >> of the BIOS. PMF driver via the ACPI interface checks the existence > >> of

Re: [PATCH] drm/amdgpu: add missing NULL check

2023-10-09 Thread Samuel Pitoiset
I can confirm this patch fixes the kernel crash I reported. But as discussed with Christian, we should find the root cause. On 10/6/23 14:11, Christian König wrote: bo->tbo.resource can easily be NULL here. Signed-off-by: Christian König --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.h | 2

Re: [PATCH AUTOSEL 5.10 13/22] drm/amdgpu: install stub fence into potential unused fence pointers

2023-10-09 Thread Christian König
Am 07.10.23 um 11:50 schrieb Greg KH: On Sun, Sep 10, 2023 at 03:43:01PM -0500, Bryan Jennings wrote: This is also causing log spam on 5.15. It was included in 5.15.128 as commit 4921792e04f2125b5eadef9dbe9417a8354c7eff. I encountered this and found

Re: [PATCH v2 3/3] drm/amd/pm: Use gpu_metrics_v1_4 for SMUv13.0.6

2023-10-09 Thread Lazar, Lijo
On 10/6/2023 8:11 PM, Asad Kamal wrote: Use gpu_metrics_v1_4 for SMUv13.0.6 to fill gpu metric info Signed-off-by: Asad Kamal Series is: Reviewed-by: Lijo Lazar Thanks, Lijo --- .../drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 67 --- 1 file changed, 43

Re: [PATCH -next 0/7] drm: Remove many unnecessary NULL values

2023-10-09 Thread Dmitry Baryshkov
On Wed, 09 Aug 2023 11:44:38 +0800, Ruan Jinjie wrote: > The NULL initialization of the pointers assigned by kzalloc() or > kunit_kzalloc() first is not necessary, because if the kzalloc() or > kunit_kzalloc() failed, the pointers will be assigned NULL, otherwise > it works as usual. so remove

Re: [PATCH AUTOSEL 5.10 13/22] drm/amdgpu: install stub fence into potential unused fence pointers

2023-10-09 Thread Greg KH
On Sun, Sep 10, 2023 at 03:43:01PM -0500, Bryan Jennings wrote: > This is also causing log spam on 5.15. It was included in 5.15.128 as > commit 4921792e04f2125b5eadef9dbe9417a8354c7eff. I encountered this and > found https://gitlab.freedesktop.org/drm/amd/-/issues/2820 while researching > the

Re: [PATCH] drm/amdgpu: add missing NULL check

2023-10-09 Thread Christian König
Am 06.10.23 um 16:41 schrieb Alex Deucher: On Fri, Oct 6, 2023 at 9:07 AM Christian König wrote: bo->tbo.resource can easily be NULL here. Signed-off-by: Christian König Add a link to the bug report? Ah, crap. Forgotten to add the link before pushing that. But I've added a CC stable.

Re: [PATCH v5 5/7] drm/amd/display: Catch errors from drm_atomic_helper_suspend()

2023-10-09 Thread Christian König
Am 06.10.23 um 20:50 schrieb Mario Limonciello: drm_atomic_helper_suspend() can return PTR_ERR(), in which case the error gets stored into `dm->cached_state`. This can cause failures during resume. Catch the error during suspend and fail the suspend instead. Link:

Re: [PATCH v5 4/7] drm/amd: Capture errors in amdgpu_switcheroo_set_state()

2023-10-09 Thread Christian König
Am 06.10.23 um 20:50 schrieb Mario Limonciello: amdgpu_switcheroo_set_state() calls lots of functions that could fail under memory pressure or for other reasons. Don't assume everything can successfully run sequentially, and check return codes for everything that returns one. Signed-off-by:

RE: [PATCH] drm/amdgpu: fix SI failure due to doorbells allocation

2023-10-09 Thread Sharma, Shashank
[AMD Official Use Only - General] Reviewed-by: Shashank Sharma Regards Shashank -Original Message- From: Icenowy Zheng Sent: Sunday, October 8, 2023 8:47 AM To: Deucher, Alexander ; Koenig, Christian ; Pan, Xinhui ; David Airlie ; Daniel Vetter ; Sharma, Shashank ; Yadav, Arvind

RE: [PATCH] drm/amdgpu:Check gfx poweron when skip flush_gpu_tlb

2023-10-09 Thread Zhang, Hawking
[AMD Official Use Only - General] adev->gfx.is_poweron check should already be applied in IP specific (gmc v11) callback. If gfx is not power on, it does nothing but just returns. I didn't see how it helps resolve the issue if we just move the check from one function to another. Regards,

Re: [PATCH] drm/amdgpu:Check gfx poweron when skip flush_gpu_tlb

2023-10-09 Thread Christian König
Am 09.10.23 um 03:50 schrieb Xu, Feifei: [AMD Official Use Only - General] Hi, Based on your description, the above code should use "||" instead of "&&", && is to add more restriction here. To avoid skipping necessary TLB flush by return. For Asics < GFX11, !adev->gfx.is_poweron is always

Re: [PATCH v5 2/7] drm/amd: Add concept of running prepare() sequence for IP blocks

2023-10-09 Thread Christian König
Am 06.10.23 um 20:50 schrieb Mario Limonciello: If any IP blocks allocate memory during their sw_fini() sequence hw_fini instead of sw_fini? sw_fini should only be called on driver unload. this can cause the suspend to fail under memory pressure. Introduce a new phase that IP blocks can use

Re: [PATCH v5 1/7] drm/amd: Evict resources during PM ops prepare() callback

2023-10-09 Thread Christian König
Am 06.10.23 um 20:50 schrieb Mario Limonciello: Linux PM core has a prepare() callback run before suspend. If the system is under high memory pressure, the resources may need to be evicted into swap instead. If the storage backing for swap is offlined during the suspend() step then such a call

Re: [PATCH v2 4/4] drm/amd/pm: Add sysfs attribute to get pm log

2023-10-09 Thread Christian König
Am 06.10.23 um 16:24 schrieb Alex Deucher: On Fri, Oct 6, 2023 at 4:32 AM Christian König wrote: Am 06.10.23 um 07:21 schrieb Lijo Lazar: Add sysfs attribute to read power management log. A snapshot is captured to the buffer when the attribute is read. Signed-off-by: Lijo Lazar --- v2: