[PATCH 6/6] HID: amd_sfh: Set the AMD SFH driver to depend on x86

2024-05-22 Thread Li Ma
From: Basavaraj Natikar Considering that amd_sfh exists only on AMD platforms, set the AMD SFH driver to depend on x86 to avoid build warnings or errors on other architectures, as shown below. drivers/hid/amd-sfh-hid/amd_sfh_pcie.c: In function 'amd_mp2_pci_probe':

[PATCH 5/6] HID: amd_sfh: Extend MP2 register access to SFH

2024-05-22 Thread Li Ma
From: Basavaraj Natikar Various MP2 register sets are supported by newer processors. Therefore, extend MP2 register access to SFH. Signed-off-by: Basavaraj Natikar Signed-off-by: Jiri Kosina (cherry picked from commit 6296562f30b1caf4b5f44e0c89c8f5cbfdb14b4a) ---

[PATCH 4/6] HID: amd_sfh: Improve boot time when SFH is available

2024-05-22 Thread Li Ma
From: Basavaraj Natikar AMD SFH load takes longer time in initialization. Hence split and defer initialization code to improve SFH module load time and boot time of the system when SFH is available. Signed-off-by: Basavaraj Natikar Signed-off-by: Jiri Kosina (cherry picked from commit

[PATCH 3/6] HID: amd_sfh: Avoid disabling the interrupt

2024-05-22 Thread Li Ma
From: Basavaraj Natikar HP ProBook x360 435 G7 using older version of firmware which doesn't support disabling the interrupt for all commands. Hence avoid disabling the interrupt for that particular model. Link: https://bugzilla.kernel.org/show_bug.cgi?id=218104 Fixes: b300667b33b2 ("HID:

[PATCH 2/6] HID: amd_sfh: Update HPD sensor structure elements

2024-05-22 Thread Li Ma
From: Basavaraj Natikar HPD sensor data is not populating properly because of wrong order of HPD sensor structure elements. So update the order of structure elements to match the HPD sensor data received from the firmware. Fixes: 24a31ea94922 ("HID: amd_sfh: Add initial support for HPD sensor")

[PATCH 1/6] HID: amd_sfh: Increase sensor command timeout

2024-05-22 Thread Li Ma
From: Basavaraj Natikar During the initialization sensors may take some time to respond. Hence, increase the sensor command timeouts in order to obtain status responses within a maximum timeout. (Li: backport for s0ix issue, these patches have landed on 6.9) Co-developed-by: Akshata MukundShetty

[PATCH] drm/amdgpu/atomfirmware: add intergrated info v2.3 table

2024-05-20 Thread Li Ma
[Why] The vram width value is 0. Because the integratedsysteminfo table in VBIOS has updated to 2.3. [Solution] Driver needs a new intergrated info v2.3 table too. Then the vram width value will be correct. Signed-off-by: Li Ma --- .../gpu/drm/amd/amdgpu/amdgpu_atomfirmware.c | 15

[PATCH] drm/amd/swsmu: update Dpmclocks_t for smu v14.0.1

2024-05-17 Thread Li Ma
MinGfxClk in Dpmclocks_t is wrong. According to pmfw, dropping an uint8_t spare in Dpmclocks_t. Signed-off-by: Li Ma --- .../gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu14_driver_if_v14_0_0.h | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/inc/pmfw_if

[PATCH] drm/amd/swsmu: add if condition for smu v14.0.1

2024-04-17 Thread Li Ma
smu v14.0.1 re-used smu v14.0.0 Signed-off-by: Li Ma --- drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c b/drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c index 3bc9662fbd28

[PATCH 8/8] HID: amd_sfh: Extend MP2 register access to SFH

2024-03-29 Thread Li Ma
From: Basavaraj Natikar Various MP2 register sets are supported by newer processors. Therefore, extend MP2 register access to SFH. Signed-off-by: Basavaraj Natikar (cherry picked from commit 92e38c2b7ea7c7ef77a55cce3c312b9377761990) --- drivers/hid/amd-sfh-hid/amd_sfh_common.h | 14

[PATCH 7/8] HID: amd_sfh: Improve boot time when SFH is available

2024-03-29 Thread Li Ma
From: Basavaraj Natikar AMD SFH load takes longer time in initialization. Hence split and defer initialization code to improve SFH module load time and boot time of the system when SFH is available. Signed-off-by: Basavaraj Natikar (cherry picked from commit

[PATCH 6/8] HID: amd_sfh: Avoid disabling the interrupt

2024-03-29 Thread Li Ma
From: Basavaraj Natikar HP ProBook x360 435 G7 using older version of firmware which doesn't support disabling the interrupt for all commands. Hence avoid disabling the interrupt for that particular model. Link: https://bugzilla.kernel.org/show_bug.cgi?id=218104 Fixes: b300667b33b2 ("HID:

[PATCH 5/8] HID: amd_sfh: Update HPD sensor structure elements

2024-03-29 Thread Li Ma
From: Basavaraj Natikar HPD sensor data is not populating properly because of wrong order of HPD sensor structure elements. So update the order of structure elements to match the HPD sensor data received from the firmware. Fixes: 24a31ea94922 ("HID: amd_sfh: Add initial support for HPD sensor")

[PATCH 4/8] HID: amd_sfh: Increase sensor command timeout

2024-03-29 Thread Li Ma
From: Basavaraj Natikar During the initialization sensors may take some time to respond. Hence, increase the sensor command timeouts in order to obtain status responses within a maximum timeout. Co-developed-by: Akshata MukundShetty Signed-off-by: Akshata MukundShetty Signed-off-by: Basavaraj

[PATCH 3/8] HID: amd_sfh: Add a new interface for exporting ALS data

2024-03-29 Thread Li Ma
From: Basavaraj Natikar AMDSFH has information about the Ambient light via the Ambient Light Sensor (ALS) which is part of the AMD sensor fusion hub. Add a new interface to export this information, where other drivers like PMF can use this information to enhance user experiences. Link:

[PATCH 2/8] HID: amd_sfh: Add a new interface for exporting HPD data

2024-03-29 Thread Li Ma
From: Basavaraj Natikar AMDSFH has information about the User presence information via the Human Presence Detection (HPD) sensor which is part of the AMD sensor fusion hub. Add a new interface to export this information, where other drivers like PMF can use this information to enhance user

[PATCH 1/8] HID: amd_sfh: rename float_to_int() to amd_sfh_float_to_int()

2024-03-29 Thread Li Ma
From: Basavaraj Natikar [Backport]: to fix amd_sfh init fail issue in ASDN Current amd_sfh driver has float_to_int() to convert units from float to int. This is fine until this function gets called outside of the current scope of file. Add a prefix "amd_sfh" to float_to_int() so that function

[PATCH] drm/amd/display: add DCN 351 version for microcode load

2024-03-27 Thread Li Ma
There is a new DCN veriosn 3.5.1 need to load Signed-off-by: Li Ma --- drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm

[PATCH] drm/amdgpu: enable smu block for smu v14_0_1

2024-03-07 Thread Li Ma
add smu 14 support for sum v14_0_1 Signed-off-by: Li Ma Reviewed-by: Yifan Zhang i --- drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c index

[PATCH] drm/amd/swsmu: modify the gfx activity scaling

2024-02-28 Thread Li Ma
Add an if condition for gfx activity because the scaling has been changed after smu fw version 5d4600. And remove a warning log. Signed-off-by: Li Ma --- drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c | 2 -- drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0_0_ppt.c | 5 - 2 files changed

[PATCH] drm/amdgpu: remove asymmetrical irq disabling in jpeg 4.0.5 suspend

2024-02-01 Thread Li Ma
A supplement to commit: 45fa6f32276f7ce571227f8368cf17378b804aa1 There is an irq warning of jpeg during resume in s2idle process. No irq enabled in jpeg 4.0.5 resume. Signed-off-by: Li Ma --- drivers/gpu/drm/amd/amdgpu/jpeg_v4_0.c | 9 - drivers/gpu/drm/amd/amdgpu/jpeg_v4_0_5.c | 10

[PATCH v2] drm/amd/swsmu: remove duplicate definition of smu v14_0_0 driver if version

2023-12-14 Thread Li Ma
There is a repeated define of smu v14_0_0 driver if version, so delete one in driver if header. Signed-off-by: Li Ma --- .../drm/amd/pm/swsmu/inc/pmfw_if/smu14_driver_if_v14_0_0.h | 5 - drivers/gpu/drm/amd/pm/swsmu/inc/smu_v14_0.h | 2 +- 2 files changed, 1 insertion

[PATCH] drm/amd/swsmu: relocate the smu v14_0_0 driver if version define

2023-12-14 Thread Li Ma
There is a repeated define of smu v14_0_0 driver if version, so delete one and relocate the other define. Signed-off-by: Li Ma --- .../gpu/drm/amd/pm/swsmu/inc/pmfw_if/smu14_driver_if_v14_0_0.h | 2 +- drivers/gpu/drm/amd/pm/swsmu/inc/smu_v14_0.h| 2 +- 2 files changed, 2

[PATCH] drm/amd/swsmu: update smu v14_0_0 driver if version and metrics table

2023-11-23 Thread Li Ma
Increment the driver if version and add new mems to the mertics table. Signed-off-by: Li Ma --- .../gpu/drm/amd/include/kgd_pp_interface.h| 17 drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 10 +++ .../inc/pmfw_if/smu14_driver_if_v14_0_0.h | 77 +++ .../drm/amd/pm

[PATCH] drm/amdgpu: add init_registers for nbio v7.11

2023-11-21 Thread Li Ma
enable init_registers callback func for nbio v7.11. Signed-off-by: Li Ma --- drivers/gpu/drm/amd/amdgpu/nbio_v7_11.c | 18 ++-- .../asic_reg/nbio/nbio_7_11_0_offset.h| 2 ++ .../asic_reg/nbio/nbio_7_11_0_sh_mask.h | 29 +++ 3 files changed, 40

[PATCH] r8169: fix ASPM-related issues on a number of systems with NIC version from RTL8168h

2023-11-07 Thread Li Ma
From: Heiner Kallweit This effectively reverts 4b5f82f6aaef. On a number of systems ASPM L1 causes tx timeouts with RTL8168h, see referenced bug report. Fixes: 4b5f82f6aaef ("r8169: enable ASPM L1/L1.1 from RTL8168h") Cc: sta...@vger.kernel.org Closes:

[PATCH] r8169: fix ASPM-related issues on a number of systems with NIC version from RTL8168h

2023-11-07 Thread Li Ma
From: Heiner Kallweit [Backport: commit 90ca51e8c654699b672ba61aeaa418dfb3252e5e] This backport to avoid the bug caused by r8169. This effectively reverts 4b5f82f6aaef. On a number of systems ASPM L1 causes tx timeouts with RTL8168h, see referenced bug report. Fixes: 4b5f82f6aaef ("r8169:

[PATCH] drm/amd/swsmu: remove fw version check in sw_init.

2023-10-30 Thread Li Ma
dorp fw version check and using max table size to init table. Signed-off-by: Li Ma Reviewed-by: Yifan Zhang --- .../gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c| 17 - 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11

[PATCH v2] drm/amd/swsmu: update smu v14_0_0 driver if and metrics table

2023-10-30 Thread Li Ma
Update driver if headers and metrics table in smu v14_0_0 after smu fw promotion. And drop the legacy metrics table. v1: update header files v2: drop legacy metrics table and add warning of checking pmfw version. Signed-off-by: Li Ma --- .../gpu/drm/amd/include/kgd_pp_interface.h| 30

[PATCH v2] drm/amd/amdgpu: fix the GPU power print error in pm info

2023-10-24 Thread Li Ma
Modify the print format of the fractional part to avoid display error. Signed-off-by: Li Ma --- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers/gpu/drm/amd/pm/amdgpu_pm.c index 358bb5e485f2

[PATCH] drm/amd/amdgpu: fix the GPU power print error in pm info

2023-10-24 Thread Li Ma
Print the digit of the fractional part individually to avoid carrying during display. Signed-off-by: Li Ma --- drivers/gpu/drm/amd/pm/amdgpu_pm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c b/drivers/gpu/drm/amd/pm/amdgpu_pm.c

[PATCH v2] drm/amdgpu: fix missing stuff in NBIO v7.11

2023-10-17 Thread Li Ma
add get_clockgating_state, update_medium_grain_light_sleep and update_medium_grain_clock_gating in nbio_v7_11_funcs v1: add missing funcs in nbio_v7_11.c v2: modify the if condition and add spport for nbio v7.11 clockgating. Signed-off-by: Li Ma Reviewed-by: Yifan Zhang --- drivers/gpu/drm/amd

[PATCH] drm/amdgpu: add clockgating support for NBIO v7.7.1

2023-10-17 Thread Li Ma
add clockgating support for NBIO ip 7.7.1 and modify if condition. Signed-off-by: Li Ma --- drivers/gpu/drm/amd/amdgpu/nbio_v7_7.c | 4 ++-- drivers/gpu/drm/amd/amdgpu/soc21.c | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/amd/amdgpu/nbio_v7_7.c b

[PATCH v2] drm/amd/swsmu: update smu v14_0_0 header files and metrics table

2023-10-12 Thread Li Ma
smu_cmn_get_smc_version in smu v14_0_0. Signed-off-by: Li Ma Reviewed-by: Yifan Zhang Reviewed-by: Kenneth Feng Acked-by: Alex Deucher --- .../gpu/drm/amd/include/kgd_pp_interface.h| 68 .../inc/pmfw_if/smu14_driver_if_v14_0_0.h | 69 ++-- .../pm/swsmu/inc/pmfw_if/smu_v14_0_0_pmfw.h | 29

[PATCH] drm/amd/swsmu: update smu v14_0_0 header files and metrics table

2023-10-10 Thread Li Ma
Update driver if, pmfw and ppsmc header files. Add new gpu_metrics_v3_0 for metrics table updated in driver if and reserve legacy metrics table to maintain backward compatibility. Signed-off-by: Li Ma Reviewed-by: Yifan Zhang --- .../gpu/drm/amd/include/kgd_pp_interface.h| 68

[PATCH] drm/amdgpu: reserve the old gc_11_0_*_mes.bin

2023-04-12 Thread Li Ma
Fixes: 0f486b64b8d4 ("drm/amd/amdgpu: introduce gc_*_mes_2.bin v2") Reserve the MOUDLE_FIRMWARE declaration of gc_11_0_*_mes.bin to avoid falling back to old mes bin failure via autoload. Signed-off-by: Li Ma --- drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 5 + 1 file changed, 5

[PATCH] drm/amdgpu: fix introduce gc_*_mes_2.bin v2

2023-04-10 Thread Li Ma
Rename MODULE_FIRMWARE declaration of gc_11_0_4_mes to gc_11_0_4_mes_2 Signed-off-by: Li Ma --- drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c b/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c index

[PATCH 2/2] drm/amdgpu: declare firmware for new MES 11.0.4

2023-01-20 Thread Li Ma
To support new mes ip block Signed-off-by: Li Ma --- drivers/gpu/drm/amd/amdgpu/mes_v11_0.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c b/drivers/gpu/drm/amd/amdgpu/mes_v11_0.c index 00e64838bb8b..62cdd2113135 100644 --- a/drivers/gpu/drm/amd

[PATCH 1/2] drm/amdgpu: enable imu firmware for GC 11.0.4

2023-01-20 Thread Li Ma
The GC 11.0.4 needs load IMU to power up GFX before loads GFX firmware. Signed-off-by: Li Ma --- drivers/gpu/drm/amd/amdgpu/imu_v11_0.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/imu_v11_0.c b/drivers/gpu/drm/amd/amdgpu/imu_v11_0.c index ed0d368149aa

[PATCH v4] drm/amd/pm:add new gpu_metrics_v2_3 to acquire average temperature info

2022-09-12 Thread Li Ma
n judgment in vangogh_common_get_gpu_metrics to maintain backward compatibility and rename the patch. "return ret" on error scenario in smu_cmn_get_smc_version. Signed-off-by: Li Ma --- .../gpu/drm/amd/include/kgd_pp_interface.h| 58 +++ .../gpu/drm/amd/pm/swsmu/smu11/