[PATCH v4 06/10] drm/amd/pm: Add xgmi plpd to aldebaran pm_policy

2024-05-14 Thread Lijo Lazar
On aldebaran, allow changing xgmi plpd policy through pm_policy sysfs interface. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang --- .../drm/amd/pm/swsmu/smu13/aldebaran_ppt.c| 35 +++ 1 file changed, 35 insertions(+) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13

[PATCH v4 07/10] drm/amd/pm: Add xgmi plpd to arcturus pm_policy

2024-05-14 Thread Lijo Lazar
On arcturus, allow changing xgmi plpd policy through pm_policy sysfs interface. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang --- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 7 ++-- .../gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c | 42 +++ 2 files changed, 46

[PATCH v4 08/10] drm/amd/pm: Remove legacy interface for xgmi plpd

2024-05-14 Thread Lijo Lazar
Replace the legacy interface with amdgpu_dpm_set_pm_policy to set XGMI PLPD mode. Also, xgmi_plpd sysfs node is not used by any client. Remove that as well. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang --- v2: No change v3: Rebase to remove device_attr_id__xgmi_plpd_policy drivers/gpu

[PATCH v4 10/10] Documentation/amdgpu: Add PM policy documentation

2024-05-14 Thread Lijo Lazar
Add documentation about the newly added pm_policy node in sysfs. Signed-off-by: Lijo Lazar --- Documentation/gpu/amdgpu/thermal.rst | 6 drivers/gpu/drm/amd/pm/amdgpu_pm.c | 48 2 files changed, 54 insertions(+) diff --git a/Documentation/gpu/amdgpu

[PATCH v4 09/10] drm/amd/pm: Remove unused interface to set plpd

2024-05-14 Thread Lijo Lazar
Remove unused callback to set PLPD policy and its implementation from arcturus, aldebaran and SMUv13.0.6 SOCs. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang --- drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 6 --- .../gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c | 22

[PATCH v4 05/10] drm/amd/pm: Add xgmi plpd to SMU v13.0.6 pm_policy

2024-05-14 Thread Lijo Lazar
On SOCs with SMU v13.0.6, allow changing xgmi plpd policy through pm_policy sysfs interface. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang --- v2, v3: No change v4: Use macro for XGMI policy type name drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 17 ++- .../drm/amd/pm/swsmu

[PATCH v5 01/10] drm/amd/pm: Add support for DPM policies

2024-05-16 Thread Lijo Lazar
chosen. Signed-off-by: Lijo Lazar --- v2: Add NULL checks before accessing smu_dpm_policy_ctxt v3: Rebase to add device_attr_id__pm_policy v4: Use macro to define policy type for consistency. v5: Add pm_policy as directory node and keep policy files separately. Fix logic issue in smu_get_pm_policy

[PATCH v5 02/10] drm/amd/pm: Update PMFW messages for SMUv13.0.6

2024-05-16 Thread Lijo Lazar
Add PMF message to select a Pstate policy in SOCs with SMU v13.0.6. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Reviewed-by: Asad Kamal --- drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu_v13_0_6_ppsmc.h | 3 ++- drivers/gpu/drm/amd/pm/swsmu/inc/smu_types.h | 3 ++- 2

[PATCH v5 00/10] Add PM policy interfaces

2024-05-16 Thread Lijo Lazar
read/write (Alex Deucher) v5: Use a pm_policy sysfs directory node and place the policy types in individual syfs files (Alex Deucher). Fix a logical issue in smu_get_pm_policy(). Lijo Lazar (10): drm/amd/pm: Add support for DPM policies drm/amd/pm: Update PMFW messages for SMUv13.0.6 drm/a

[PATCH v5 04/10] drm/amd/pm: Add xgmi plpd policy to pm_policy

2024-05-16 Thread Lijo Lazar
Add support to set XGMI PLPD policy levels through 'pm_policy/xgmi_plpd' sysfs node. Signed-off-by: Lijo Lazar --- v2, v3: No change v4: Use a macro for XGMI PLPD policy type v5: Use a separate sysfs node for xgmi_plpd policy drivers/gpu/drm/amd/include/kgd_pp_interface.h | 1 + d

[PATCH v5 03/10] drm/amd/pm: Add support to select pstate policy

2024-05-16 Thread Lijo Lazar
Add support to select pstate policy in SOCs with SMUv13.0.6 Signed-off-by: Lijo Lazar eviewed-by: Hawking Zhang Reviewed-by: Asad Kamal --- v2,v3: No change v4: Use macro for policy type name .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c| 2 + .../drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c

[PATCH v5 05/10] drm/amd/pm: Add xgmi plpd to SMU v13.0.6 pm_policy

2024-05-16 Thread Lijo Lazar
On SOCs with SMU v13.0.6, allow changing xgmi plpd policy through 'pm_policy/xgmi_plpd' sysfs interface. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Reviewed-by: Asad Kamal --- v2, v3: No change v4: Use macro for XGMI policy type name drivers/gpu/drm/amd/pm/swsmu/am

[PATCH v5 06/10] drm/amd/pm: Add xgmi plpd to aldebaran pm_policy

2024-05-16 Thread Lijo Lazar
On aldebaran, allow changing xgmi plpd policy through 'pm_policy/xgmi_plpd' sysfs interface. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Reviewed-by: Asad Kamal --- .../drm/amd/pm/swsmu/smu13/aldebaran_ppt.c| 36 +++ 1 file changed, 36 insertions(+) di

[PATCH v5 08/10] drm/amd/pm: Remove legacy interface for xgmi plpd

2024-05-16 Thread Lijo Lazar
Replace the legacy interface with amdgpu_dpm_set_pm_policy to set XGMI PLPD mode. Also, xgmi_plpd_policy sysfs node is not used by any client. Remove that as well. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Reviewed-by: Asad Kamal --- v2: No change v3: Rebase to remove

[PATCH v5 10/10] Documentation/amdgpu: Add PM policy documentation

2024-05-16 Thread Lijo Lazar
Add documentation about the newly added pm_policy node in sysfs. Signed-off-by: Lijo Lazar --- v5: Update documentation to reflect pm_policy nodes and sub nodes for each policy type Documentation/gpu/amdgpu/thermal.rst | 6 drivers/gpu/drm/amd/pm/amdgpu_pm.c | 53

[PATCH v5 09/10] drm/amd/pm: Remove unused interface to set plpd

2024-05-16 Thread Lijo Lazar
Remove unused callback to set PLPD policy and its implementation from arcturus, aldebaran and SMUv13.0.6 SOCs. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Reviewed-by: Asad Kamal --- drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 6 --- .../gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c

[PATCH v5 07/10] drm/amd/pm: Add xgmi plpd to arcturus pm_policy

2024-05-16 Thread Lijo Lazar
On arcturus, allow changing xgmi plpd policy through 'pm_policy/xgmi_plpd' sysfs interface. Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Reviewed-by: Asad Kamal --- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 7 ++-- .../gpu/drm/amd/pm/swsmu/smu11/arcturus_

[PATCH] drm/amdgpu: Add CRC16 selection in config

2024-05-21 Thread Lijo Lazar
KFD uses crc16 for gpu_id generation. Fixes: 6dbc6469ab0b ("drm/amdkfd: Ensure gpu_id is unique") Reported-by: kernel test robot Closes: https://lore.kernel.org/oe-kbuild-all/202405211405.tidtwibx-...@intel.com/ Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/Kconfig | 1

[PATCH] drm/amdgpu: Skip coredump during resets for debug

2024-05-31 Thread Lijo Lazar
Skip scheduling coredump when gpu reset is intentionally triggered through debugfs. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_fence.c

[PATCH] drm/amdgpu: Don't show false warning for reg list

2024-06-02 Thread Lijo Lazar
If reg list is already loaded on PSP 13.0.2 SOCs, psp will give TEE_ERR_CANCEL response on second time load. Avoid printing warn message for it. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 25 + drivers/gpu/drm/amd/amdgpu/psp_gfx_if.h | 5

[PATCH] drm/amdgpu: Move mca debug mode decision to ras

2023-11-08 Thread Lijo Lazar
Refactor code such that ras block decides the default mca debug mode, and not swsmu block. By default mca debug mode is set to true for now. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/amdgpu_mca.c| 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c| 14

[PATCH] drm/amdgpu: Skip execution of pending reset jobs

2023-11-08 Thread Lijo Lazar
cancel_work is not backported to all custom kernels. Add a workaround to skip execution of already queued recovery jobs, if the device is already reset. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 + drivers/gpu/drm/amd/amdgpu/amdgpu_reset.c | 9

[PATCH v2] drm/amdgpu: Move mca debug mode decision to ras

2023-11-09 Thread Lijo Lazar
Refactor code such that ras block decides the default mca debug mode, and not swsmu block. By default mca debug mode is set to true for now. Signed-off-by: Lijo Lazar --- v2: Set mca debug mode early before ras block late init as ras query is initiated during late init of ras blocks (KevinYang

[PATCH v3] drm/amdgpu: Move mca debug mode decision to ras

2023-11-09 Thread Lijo Lazar
Refactor code such that ras block decides the default mca debug mode, and not swsmu block. By default mca debug mode is set to false. Signed-off-by: Lijo Lazar --- v3: Default mca debug mode is set to false v2: Set mca debug mode early before ras block late init as ras query is initiated

[PATCH] drm/amd/pm: Don't send unload message for reset

2023-11-14 Thread Lijo Lazar
No need to notify about unload during reset. Also remove the FW version check. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c b/drivers

[PATCH] drm/amdgpu: Fix uninitialized return value

2023-11-27 Thread Lijo Lazar
The return value is uniinitialized if ras context is NULL. Fixes: 0f4c8faa043c (drm/amdgpu: Move mca debug mode decision to ras) Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu

[PATCH v2] drm/amdgpu: Fix uninitialized return value

2023-11-27 Thread Lijo Lazar
The return value is uniinitialized if ras context is NULL. Fixes: 0f4c8faa043c (drm/amdgpu: Move mca debug mode decision to ras) Signed-off-by: Lijo Lazar --- v2: Avoid variable initialization (Christian) drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 2 ++ 1 file changed, 2 insertions(+) diff

[PATCH] drm/amdgpu: Use another offset for GC 9.4.3 remap

2023-11-28 Thread Lijo Lazar
The legacy region at 0x7F000 maps to valid registers in GC 9.4.3 SOCs. Use 0x1A000 offset instead as MMIO register remap region. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/soc15.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b

[PATCH] drm/amdgpu: Restrict extended wait to PSP v13.0.6

2023-11-29 Thread Lijo Lazar
Only PSPv13.0.6 SOCs take a longer time to reach steady state. Other PSPv13 based SOCs don't need extended wait. Also, reduce PSPv13.0.6 wait time. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/psp_v13_0.c | 10 +++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --

[PATCH 3/3] drm/amdgpu: Avoid querying DRM MGCG status

2023-11-30 Thread Lijo Lazar
MP0 v13.0.6 SOCs don't support DRM MGCG. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/soc15.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c index 9043ebf1e161..15033efec2ba 100644

[PATCH 1/3] drm/amdgpu: Add NULL checks for function pointers

2023-11-30 Thread Lijo Lazar
Check if function is implemented before making the call. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/soc15.c | 12 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c index 9ad4d6d3122b

[PATCH 2/3] drm/amdgpu: Update HDP 4.4.2 clock gating flags

2023-11-30 Thread Lijo Lazar
HDP 4.4.2 clockgating is enabled by default, update the flags accordingly. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/hdp_v4_0.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/hdp_v4_0.c b/drivers/gpu/drm/amd/amdgpu/hdp_v4_0.c index

[PATCH] drm/amdgpu: Use the right method to get IP version

2023-12-06 Thread Lijo Lazar
Replace direct usage of adev->ip_versions with amdgpu_ip_version. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c| 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 3 ++- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 2 +- drivers/gpu/drm/

[PATCH v2] drm/amdgpu: Use the right method to get IP version

2023-12-06 Thread Lijo Lazar
Replace direct usage of adev->ip_versions with amdgpu_ip_version. Signed-off-by: Lijo Lazar --- v2: Fix two more instances in amdgpu_dm.c drivers/gpu/drm/amd/amdgpu/amdgpu_device.c| 2 +- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 3 ++- drivers/gpu/drm/amd/amd

[PATCH] drm/amd/pm: Add error log for smu v13.0.6 reset

2024-01-10 Thread Lijo Lazar
For all mode-2 reset fail cases, add error log. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c b/drivers/gpu/drm/amd/pm/swsmu

[PATCH] drm/amd/pm: Fix smuv13.0.6 current clock reporting

2024-01-11 Thread Lijo Lazar
When current clock is equal to max dpm level clock, the level is not indicated correctly with *. Fix by comparing current clock against dpm level value. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion

[PATCH] drm/amd/pm: Fetch current power limit from FW

2024-01-18 Thread Lijo Lazar
Power limit of SMUv13.0.6 SOCs can be updated by out-of-band ways. Fetch the limit from firmware instead of using cached values. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c

[PATCH 1/2] drm/amdgpu: Avoid fetching vram vendor information

2024-01-20 Thread Lijo Lazar
For GFX 9.4.3 APUs, the current method of fetching vram vendor information is not reliable. Avoid fetching the information. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/gmc_v9_0.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu

[PATCH 2/2] drm/amdgpu: Show vram vendor only if available

2024-01-20 Thread Lijo Lazar
Ony if vram vendor info is available, show in sysfs. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c | 17 - 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vram_mgr.c b/drivers/gpu/drm/amd/amdgpu

[PATCH] drm/amd/pm: Update intermediate power state for SI

2021-09-22 Thread Lijo Lazar
dereference. Bug:https://gitlab.freedesktop.org/drm/amd/-/issues/1698 Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/pm/powerplay/si_dpm.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/pm/powerplay/si_dpm.c b/drivers/gpu/drm/amd/pm/powerplay/si_dpm.c index

[PATCH] drm/amdgpu: During s0ix don't wait to signal GFXOFF

2021-10-01 Thread Lijo Lazar
that everything is ready for a safe s0ix entry. Bug: https://gitlab.freedesktop.org/drm/amd/-/issues/1712 Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_

[PATCH] drm/amd/pm: Disable fan control if not supported

2021-10-22 Thread Lijo Lazar
On arcturus, not all platforms use PMFW based fan control. On such ASICs fan control by PMFW will be disabled in PPTable. Disable hwmon knobs for fan control also as it is not possible to report or control fan speed on such platforms through driver. Signed-off-by: Lijo Lazar --- drivers/gpu/drm

[PATCH] drm/amd/pm: Remove artificial freq level on Navi1x

2021-11-14 Thread Lijo Lazar
Print Navi1x fine grained clocks in a consistent manner with other SOCs. Don't show aritificial DPM level when the current clock equals min or max. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c | 13 - 1 file changed, 8 insertions(+), 5 dele

[PATCH] drm/amdgpu: Skip ASPM programming on aldebaran

2021-11-24 Thread Lijo Lazar
There is no need for additional programming, keep the default settings. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c b/drivers/gpu/drm/amd/amdgpu/nbio_v7_4.c index e96516d3fd45

[PATCH] drm/amd/pm: Add warning for unexpected PG requests

2021-11-25 Thread Lijo Lazar
Ideally power gate/ungate requests shouldn't come when smu block is uninitialized. Add a WARN message to check the origins if such a thing ever happens. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff

[PATCH v2] drm/amd/pm: Add warning for unexpected PG requests

2021-11-25 Thread Lijo Lazar
v1: Ideally power gate/ungate requests shouldn't come when smu block is uninitialized. Add a WARN message to check the origins if such a thing ever happens. v2: Use dev_WARN to log device info (Felix/Guchun). Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 6

[PATCH] drm/amdgpu: Use MAX_HWIP instead of HW_ID_MAX

2021-11-25 Thread Lijo Lazar
HW_ID_MAX considers HWID of all IPs, far more than what amdgpu uses. amdgpu tracks only the IPs defined by amd_hw_ip_block_type whose max is MAX_HWIP. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers

[PATCH] drm/amdgpu: Don't halt RLC on GFX suspend

2021-11-29 Thread Lijo Lazar
] amdgpu :23:00.0: amdgpu: Fail to disable dpm features! [ 583.245639] [drm:amdgpu_device_ip_suspend_phase2 [amdgpu]] *ERROR* suspend of IP block failed -62 [ 583.248504] [drm] free PSP TMR buffer Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/gfx_v9_0.c | 7

[PATCH] drm/amd/pm: Skip power state allocation

2021-12-13 Thread Lijo Lazar
Power states are not valid for arcturus and aldebaran, no need to allocate memory. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c | 10 -- drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 10 -- 2 files changed, 20 deletions(-) diff --git a

[PATCH 1/3] drm/amd/pm: Add custom/current freq to pstates

2021-05-13 Thread Lijo Lazar
Add custom member for user requested custom frequency, level mask or min/max frequencies. Add curr member to keep track of the current active values. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h | 8 1 file changed, 8 insertions(+) diff --git a/drivers/gpu

[PATCH 2/3] drm/amd/pm: Fix showing incorrect frequencies on aldebaran

2021-05-13 Thread Lijo Lazar
pp_od_clk_voltage node. Hence it will show incorrect values when user requests an invalid value or tries a partial request without committing the values. Separating out to custom and current variable fixes such issues. Signed-off-by: Lijo Lazar --- .../drm/amd/pm/swsmu/smu13/aldebaran_ppt.c| 65

[PATCH 3/3] drm/amd/pm: Reset max GFX clock after disabling determinism

2021-05-13 Thread Lijo Lazar
When determinism mode is disabled on aldebaran, max GFX clock will be reset to default max frequency value. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/drm/amd/pm

Re: [PATCH 2/3] drm/amd/pm: Fix showing incorrect frequencies on aldebaran

2021-05-13 Thread Lijo Lazar
variable fixes such issues. Signed-off-by: Lijo Lazar ---   .../drm/amd/pm/swsmu/smu13/aldebaran_ppt.c    | 65 ---   .../gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c    | 18 -   2 files changed, 55 insertions(+), 28 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13

[PATCH] drm/amd/pm: Fix xgmi link control on aldebaran

2021-12-15 Thread Lijo Lazar
Fix the message argument. 0: Allow power down 1: Disallow power down Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/aldebaran_ppt.c b/drivers

[PATCH] drm/amdgpu: Fix uninitialized variable use warning

2022-01-27 Thread Lijo Lazar
access") Reported-by: kernel test robot Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_virt.c index 80c25176c993..c13765218919 100644 --- a/

Re: [PATCH 2/3] drm/amdgpu/pm: add new fields for Navi1x

2021-05-18 Thread Lijo Lazar
On 5/18/2021 9:39 AM, David M Nieto wrote: Fill voltage fields in metrics table Signed-off-by: David M Nieto --- .../gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c | 62 ++- 1 file changed, 45 insertions(+), 17 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/navi1

Re: [PATCH 3/3] drm/amdgpu/pm: display vcn pp dpm

2021-05-18 Thread Lijo Lazar
On 5/18/2021 9:39 AM, David M Nieto wrote: Enable displaying DPM levels for VCN clocks in swsmu supported ASICs Signed-off-by: David M Nieto --- .../gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c | 46 ++ .../gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c | 4 ++ .../amd/pm/swsmu/

Re: [PATCH 1/3] drm/amdgpu/pm: Update metrics table

2021-05-19 Thread Lijo Lazar
Reviewed-by: Lijo Lazar On 5/19/2021 11:32 AM, David M Nieto wrote: expand metrics table with voltages and frequency ranges Signed-off-by: David M Nieto --- .../gpu/drm/amd/include/kgd_pp_interface.h| 69 +++ drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c| 3 + 2

Re: [PATCH 2/3] drm/amdgpu/pm: add new fields for Navi1x

2021-05-19 Thread Lijo Lazar
Add a check of non-zero offsets so that it doesn't show a static voltage of 1.55v all the time. With that addressed the patch is Reviewed-by: Lijo Lazar On 5/19/2021 11:32 AM, David M Nieto wrote: Fill voltage fields in metrics table Signed-off-by: David M Nieto --- .../gpu/drm/a

Re: [PATCH 3/3] drm/amdgpu/pm: display vcn pp dpm

2021-05-19 Thread Lijo Lazar
Avoid changes to sienna_cichlid_force_clk_levels as well. With that addressed patch is Reviewed-by: Lijo Lazar On 5/19/2021 11:32 AM, David M Nieto wrote: Enable displaying DPM levels for VCN clocks in swsmu supported ASICs Signed-off-by: David M Nieto --- .../gpu/drm/amd/pm/swsmu/smu11

Re: [PATCH] drm/amdgpu/acpi: unify ATCS handling

2021-05-20 Thread Lijo Lazar
On 5/20/2021 2:07 AM, Alex Deucher wrote: Treat it like ATIF and check both the dGPU and APU for the method. This is required because ATCS may be hung off of the APU in ACPI on A+A systems. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 17 +-- drivers/gpu/dr

Re: [PATCH 2/5] amdgpu/pm: simplify logic of smu_get_power_level

2021-05-20 Thread Lijo Lazar
On 5/20/2021 9:27 AM, Darren Powell wrote: new powerplay enumeration pp_power_limit_level modify hwmon show_power functions to use pp_power_limit_level remove insertion of byte field into smu_get_power_level output arg "limit" modify smu_get_power_level to use pp_power_limit_level si

Re: [PATCH] drm/amd/pm: fix return value in aldebaran_set_mp1_state()

2021-05-20 Thread Lijo Lazar
, Reviewed-by: Lijo Lazar On 5/20/2021 3:20 PM, Feifei Xu wrote: We should just return error in invalid case. For valid but not implemented one, do nothing and return 0. Otherwise resume will abort because of the wrong return value. Signed-off-by: Feifei Xu --- drivers/gpu/drm/amd/pm/swsmu/smu13

Re: [PATCH 1/2] drm/amdgpu/acpi: unify ATCS handling (v3)

2021-05-21 Thread Lijo Lazar
On 5/20/2021 9:26 PM, Alex Deucher wrote: Treat it like ATIF and check both the dGPU and APU for the method. This is required because ATCS may be hung off of the APU in ACPI on A+A systems. v2: add back accidently removed ACPI handle check. v3: Fix incorrect atif check (Colin) Fix unini

Re: [PATCH 2/2] drm/amdgpu/apci: switch ATIF/ATCS probe order

2021-05-21 Thread Lijo Lazar
Reviewed-by: Lijo Lazar On 5/20/2021 9:26 PM, Alex Deucher wrote: Try the handle from ATPX first since this is the most common case. Signed-off-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 14 ++ 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a

Re: [PATCH 1/2] drm/amdgpu/acpi: unify ATCS handling (v3)

2021-05-21 Thread Lijo Lazar
Thanks for clarifying! Reviewed-by: Lijo Lazar On 5/21/2021 7:17 PM, Alex Deucher wrote: On Fri, May 21, 2021 at 3:12 AM Lijo Lazar wrote: On 5/20/2021 9:26 PM, Alex Deucher wrote: Treat it like ATIF and check both the dGPU and APU for the method. This is required because ATCS may be

Re: [PATCH 1/6] drm/amd/pm: Add ASIC independent throttle bits

2021-05-23 Thread Lijo Lazar
There are duplicates in this list. It's better to classify as Power/Temperature/Current/Others and map; maybe, allocate 16 bit each in a 64-bit mask. Also, keep the naming consistent and start with "SMU_", that's what we do for others like SMU messages. Power throttlers - #def

[PATCH] drm/amd/pm: Support board calibration on aldebaran

2021-07-15 Thread Lijo Lazar
Add support for board power calibration on Aldebaran. Board calibration is done after DC offset calibration. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/pm/inc/aldebaran_ppsmc.h | 3 +- drivers/gpu/drm/amd/pm/inc/smu_types.h| 3 +- .../drm/amd/pm/swsmu/smu13/aldebaran_ppt.c

[PATCH] drm/amdgpu: Restrict bootloader wait to SMUv13.0.6

2023-09-04 Thread Lijo Lazar
Restrict the wait for boot loader steady state only to SMUv13.0.6. For older SOCs, ASIC init has a longer wait period and that takes care. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/psp_v13_0.c | 18 ++ 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a

[PATCH 1/3] drm/amd/pm: Fix clock reporting for SMUv13.0.6

2023-09-04 Thread Lijo Lazar
levels below S: 19Mhz * 0: 615Mhz 1: 800Mhz 2: 888Mhz 3: 1000Mhz Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Reviewed-by: Evan Quan --- .../drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 159 +++--- 1 file changed, 62 insertions(+), 97 deletions(-) diff --git a/drivers/gpu/d

[PATCH 2/3] drm/amd/pm:Fix GFX deep sleep clock reporting

2023-09-04 Thread Lijo Lazar
For SMU v13.0.6, keep GFX deep sleep clock reporting style consistent with that of other clocks. Sample format below. S: 78Mhz * 0: 600Mhz 1: 800Mhz Signed-off-by: Lijo Lazar Reviewed-by: Hawking Zhang Reviewed-by: Evan Quan --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 10

[PATCH 3/3] Documentation/amdgpu: Modify pp_dpm_*clk details

2023-09-04 Thread Lijo Lazar
pp_dpm_*clk nodes also could show the frequencies when a clock is in 'sleep' state. Add documentation related to that. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/

[PATCH] drm/amdgpu: Fix refclk reporting for SMU v13.0.6

2023-09-05 Thread Lijo Lazar
SMU v13.0.6 SOCs have 100MHz reference clock. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/soc15.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c b/drivers/gpu/drm/amd/amdgpu/soc15.c index f5be40d7ba36..28094cd7d9c2 100644

[PATCH] drm/amdgpu: Use default reset method handler

2023-09-06 Thread Lijo Lazar
When reset method is not passed in reset context, look for the handler for default reset method. On Aldebaran, default reset method for SOCs connected to CPU over XGMI is MODE2. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/aldebaran.c | 16 +++- 1 file changed, 7

[PATCH] drm/amdgpu: Restore partition mode after reset

2023-09-08 Thread Lijo Lazar
On a full device reset, PSP FW gets unloaded. Hence restore the partition mode by placing a new request. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 5 drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.c| 28 -- drivers/gpu/drm/amd/amdgpu

[PATCH 2/2] drm/amdgpu: Add more fields to IP version

2023-09-11 Thread Lijo Lazar
Include subrevision and variant fileds also to IP version. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 17 +++- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 20 --- 2 files changed, 29 insertions(+), 8 deletions(-) diff --git a

[PATCH v2 2/2] drm/amdgpu: Add more fields to IP version

2023-09-12 Thread Lijo Lazar
Include subrevision and variant fileds also to IP version. Signed-off-by: Lijo Lazar Reviewed-by: Alex Deucher --- v2: Use major/min/rev format in drm_amdgpu_info_hw_ip discovery version drivers/gpu/drm/amd/amdgpu/amdgpu.h | 18 - drivers/gpu/drm/amd/amdgpu

[PATCH] Revert "drm/amdgpu: Report vbios version instead of PN"

2023-09-13 Thread Lijo Lazar
This reverts commit c187a67725b47f9c1603359a51b79cc19e27442a. vbios_version sysfs node is used to identify Part Number also. Revert to the same so that it doesn't break scripts/software which parse this. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/amdgpu_atombios.c | 2 +- 1

[PATCH] drm/amdgpu: Fix vbios version string search

2023-09-14 Thread Lijo Lazar
Search for vbios version string in STRING_OFFSET-ATOM_ROM_HEADER region first. If those offsets are not populated, use the hardcoded region. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/atom.c | 19 ++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a

[PATCH] drm/amd/pm: Remove SMUv13.0.6 unsupported feature

2023-09-14 Thread Lijo Lazar
Selectively updating feature mask is not supported in SMU v13.0.6. Remove the callback corresponding to that. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13

[PATCH] drm/amd/pm: Round Q10 format values in SMU v13.0.6

2023-09-15 Thread Lijo Lazar
Instead of neglecting fractional part, round the Q10 format values in SMU v13.0.6 metrics table. Signed-off-by: Lijo Lazar --- .../drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 70 ++- 1 file changed, 36 insertions(+), 34 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu

[PATCH 1/2] drm/amd/pm: Add throttle limit for SMU v13.0.6

2023-09-20 Thread Lijo Lazar
: Lijo Lazar --- .../drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c | 34 +++ 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c b/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_6_ppt.c index 11a6cd96c601..73db595bf6d9

[PATCH 2/2] drm/amd/pm: Add GC v9.4.3 thermal limits to hwmon

2023-09-20 Thread Lijo Lazar
Publish max operating temperature of SOC and memory as temp*_emergency nodes in hwmon. temp*_crit will show the throttle temperature limits. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 19 --- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a

[PATCH 1/5] drm/amdgpu: Move package type enum to amdgpu.h

2023-09-29 Thread Lijo Lazar
Move definition of package type to amdgpu header and add new package types for CEM and OAM. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 7 +++ drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 5 - 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a

[PATCH 3/5] drm/amdgpu: Get package types for smuio v13.0

2023-09-29 Thread Lijo Lazar
Add support to query package types supported in smuio v13.0 ASICs. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/smuio_v13_0.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/smuio_v13_0.c b/drivers/gpu/drm/amd/amdgpu

[PATCH 2/5] drm/amdgpu: Add more smuio v13.0.3 package types

2023-09-29 Thread Lijo Lazar
Expand support to get other board types like OAM or CEM. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/smuio_v13_0_3.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/smuio_v13_0_3.c b/drivers/gpu/drm/amd/amdgpu/smuio_v13_0_3.c index 4368a5891eeb

[PATCH 4/5] drm/amdgpu: Add sysfs attribute to get board info

2023-09-29 Thread Lijo Lazar
Add a sysfs attribute which shows the board form factor like OAM or CEM. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 57 ++ 1 file changed, 57 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu

[PATCH 5/5] Documentation/amdgpu: Add board info details

2023-09-29 Thread Lijo Lazar
Add documentation for board info sysfs attribute. Signed-off-by: Lijo Lazar --- Documentation/gpu/amdgpu/driver-misc.rst | 6 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 16 2 files changed, 22 insertions(+) diff --git a/Documentation/gpu/amdgpu/driver-misc.rst b

[PATCH v2 1/5] drm/amdgpu: Move package type enum to amdgpu_smuio

2023-10-04 Thread Lijo Lazar
Move definition of package type to amdgpu_smuio header and add new package types for CEM and OAM. Signed-off-by: Lijo Lazar --- v2: Move definition to amdgpu_smuio.h instead of amdgpu.h (Christian/Hawking) drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 5 - drivers/gpu/drm/amd/amdgpu

[PATCH v2 2/5] drm/amdgpu: Add more smuio v13.0.3 package types

2023-10-04 Thread Lijo Lazar
Expand support to get other board types like OAM or CEM. Signed-off-by: Lijo Lazar Reviewed-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/smuio_v13_0_3.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/smuio_v13_0_3.c b/drivers/gpu/drm/amd/amdgpu

[PATCH v2 3/5] drm/amdgpu: Get package types for smuio v13.0

2023-10-04 Thread Lijo Lazar
Add support to query package types supported in smuio v13.0 ASICs. Signed-off-by: Lijo Lazar Reviewed-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/smuio_v13_0.c | 22 ++ 1 file changed, 22 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/smuio_v13_0.c b/drivers

[PATCH v2 4/5] drm/amdgpu: Add sysfs attribute to get board info

2023-10-04 Thread Lijo Lazar
Add a sysfs attribute which shows the board form factor like OAM or CEM. Signed-off-by: Lijo Lazar Reviewed-by: Alex Deucher --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 57 ++ 1 file changed, 57 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b

[PATCH v2 5/5] Documentation/amdgpu: Add board info details

2023-10-04 Thread Lijo Lazar
Add documentation for board info sysfs attribute. Signed-off-by: Lijo Lazar Reviewed-by: Alex Deucher --- Documentation/gpu/amdgpu/driver-misc.rst | 6 ++ drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 16 2 files changed, 22 insertions(+) diff --git a/Documentation/gpu

[PATCH 1/4] drm/amdgpu: enable FRU device for SMU v13.0.6

2023-10-04 Thread Lijo Lazar
From: Yang Wang v1: enable GFX v9.4.3 FRU device to query board information. v2: use MP1 version to identify different asic Signed-off-by: Yang Wang Reviewed-by: Lijo Lazar Acked-by: Alex Deucher --- .../gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c| 48 +++ 1 file changed, 29

[PATCH 2/4] drm/amdgpu: Refactor FRU product information

2023-10-04 Thread Lijo Lazar
Keep FRU related information together in a separate structure. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 8 +--- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c| 3 ++ .../gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c| 46 +++ .../gpu/drm/amd

[PATCH 4/4] Documentation/amdgpu: Add FRU attribute details

2023-10-04 Thread Lijo Lazar
Add documentation for the newly added manufacturer and fru_id attributes in sysfs. Signed-off-by: Lijo Lazar --- Documentation/gpu/amdgpu/driver-misc.rst | 12 .../gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c| 19 +++ 2 files changed, 31 insertions(+) diff --git

[PATCH 3/4] drm/amdgpu: Add more FRU field information

2023-10-04 Thread Lijo Lazar
Add support to read Manufacturer Name and FRU File Id fields. Also add sysfs device attributes for external usage. Signed-off-by: Lijo Lazar --- .../gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.c| 52 +-- .../gpu/drm/amd/amdgpu/amdgpu_fru_eeprom.h| 2 + 2 files changed, 51

[PATCH] drm/amdgpu: Increase IP discovery region size

2023-10-05 Thread Lijo Lazar
IP discovery region has increased to > 8K on some SOCs.Maximum reserve size is upto 12K, but not used. For now increase to 10K. Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/

[PATCH v2 2/4] drm/amd/pm: Add support to fetch pm log sample

2023-10-05 Thread Lijo Lazar
Add API support to fetch a snapshot of power management log from PMFW. Signed-off-by: Lijo Lazar --- v2: Add max size of input buffer to take care of overflows drivers/gpu/drm/amd/include/kgd_pp_interface.h | 1 + drivers/gpu/drm/amd/pm/amdgpu_dpm.c| 16 drivers

[PATCH v2 1/4] drm/amdgpu: add pmlog structure definition

2023-10-05 Thread Lijo Lazar
From: Alex Deucher Define the pmlog structures to be exposed via sysfs. Signed-off-by: Alex Deucher Signed-off-by: Lijo Lazar --- drivers/gpu/drm/amd/include/kgd_pp_interface.h | 15 +++ 1 file changed, 15 insertions(+) diff --git a/drivers/gpu/drm/amd/include/kgd_pp_interface.h

<    1   2   3   4   5   >