[PATCH V8 4/9] wifi: mac80211: Add support for WBRF features

2023-08-10 Thread Evan Quan
-developed-by: Mario Limonciello Signed-off-by: Mario Limonciello Co-developed-by: Evan Quan Signed-off-by: Evan Quan -- v1->v2: - place the new added member(`wbrf_supported`) in ieee80211_local(Johannes) - handle chandefs change scenario properly(Johannes) - some minor fixes around c

[PATCH V8 5/9] drm/amd/pm: update driver_if and ppsmc headers for coming wbrf feature

2023-08-10 Thread Evan Quan
Add those data structures to support Wifi RFI mitigation feature. Signed-off-by: Evan Quan Reviewed-by: Mario Limonciello --- .../pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_0.h | 14 +- .../pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_7.h | 14 +- .../amd/pm/swsmu/inc

[PATCH V8 6/9] drm/amd/pm: setup the framework to support Wifi RFI mitigation feature

2023-08-10 Thread Evan Quan
With WBRF feature supported, as a driver responding to the frequencies, amdgpu driver is able to do shadow pstate switching to mitigate possible interference(between its (G-)DDR memory clocks and local radio module frequency bands used by Wifi 6/6e/7). Signed-off-by: Evan Quan Reviewed-by: Mario

[PATCH V8 7/9] drm/amd/pm: add flood detection for wbrf events

2023-08-10 Thread Evan Quan
To protect PMFW from being overloaded. Signed-off-by: Evan Quan Reviewed-by: Mario Limonciello --- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 31 +++ drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 7 + 2 files changed, 32 insertions(+), 6 deletions(-) diff --git a

[PATCH V8 8/9] drm/amd/pm: enable Wifi RFI mitigation feature support for SMU13.0.0

2023-08-10 Thread Evan Quan
Fulfill the SMU13.0.0 support for Wifi RFI mitigation feature. Signed-off-by: Evan Quan Reviewed-by: Mario Limonciello --- drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 3 + drivers/gpu/drm/amd/pm/swsmu/inc/smu_types.h | 3 +- drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h | 3 + .../gpu

[PATCH V8 9/9] drm/amd/pm: enable Wifi RFI mitigation feature support for SMU13.0.7

2023-08-10 Thread Evan Quan
Fulfill the SMU13.0.7 support for Wifi RFI mitigation feature. Signed-off-by: Evan Quan Reviewed-by: Mario Limonciello --- .../drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 59 +++ 1 file changed, 59 insertions(+) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c

[PATCH 1/8] drm/amd/pm: introduce a new set of OD interfaces

2023-08-15 Thread Evan Quan
directory. Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 + drivers/gpu/drm/amd/pm/amdgpu_pm.c | 264 - drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h| 2 + 3 files changed, 266 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/

[PATCH 2/8] drm/amdgpu: revise the device initialization sequences

2023-08-15 Thread Evan Quan
By placing the sysfs interfaces creation after `.late_int`. Since some operations performed during `.late_init` may affect how the sysfs interfaces should be created. Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 37 -- 1 file changed, 21

[PATCH 0/8] A new set of Linux OD interfaces

2023-08-15 Thread Evan Quan
directory. gpu_od/ ├── fan_ctrl ├── acoustic_limit_rpm_threshold ├── acoustic_target_rpm_threshold ├── fan_curve ├── fan_minimum_pwm ├── fan_mode ├── fan_target_temperature ... ...(more to be added) Evan Quan (8): drm/amd/pm: introduce a new set of OD interfaces drm

[PATCH 3/8] drm/amd/pm: add fan mode OD setting support for SMU13

2023-08-15 Thread Evan Quan
Add SMU13 fan mode OD setting support. Signed-off-by: Evan Quan --- .../gpu/drm/amd/include/kgd_pp_interface.h| 4 +- drivers/gpu/drm/amd/pm/amdgpu_pm.c| 189 +- drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h | 4 + drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c

[PATCH 6/8] drm/amd/pm: add fan acoustic target OD setting support for SMU13

2023-08-15 Thread Evan Quan
Add SMU13 fan acoustic target OD setting support. Signed-off-by: Evan Quan --- .../gpu/drm/amd/include/kgd_pp_interface.h| 2 + drivers/gpu/drm/amd/pm/amdgpu_pm.c| 45 drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h | 2 + drivers/gpu/drm/amd/pm/swsmu

[PATCH 4/8] drm/amd/pm: add fan temperature/pwm curve OD setting support for SMU13

2023-08-15 Thread Evan Quan
Add SMU13 fan temperature/pwm curve OD setting support. Signed-off-by: Evan Quan --- .../gpu/drm/amd/include/kgd_pp_interface.h| 2 + drivers/gpu/drm/amd/pm/amdgpu_pm.c| 45 ++ drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h | 2 + drivers/gpu/drm/amd/pm/swsmu

[PATCH 5/8] drm/amd/pm: add fan acoustic limit OD setting support for SMU13

2023-08-15 Thread Evan Quan
Add SMU13 fan acoustic limit OD setting support. Signed-off-by: Evan Quan --- .../gpu/drm/amd/include/kgd_pp_interface.h| 2 + drivers/gpu/drm/amd/pm/amdgpu_pm.c| 45 drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h | 2 + drivers/gpu/drm/amd/pm/swsmu

[PATCH 7/8] drm/amd/pm: add fan target temperature OD setting support for SMU13

2023-08-15 Thread Evan Quan
Add SMU13 fan target temperature OD setting support. Signed-off-by: Evan Quan --- .../gpu/drm/amd/include/kgd_pp_interface.h| 2 + drivers/gpu/drm/amd/pm/amdgpu_pm.c| 45 drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h | 2 + drivers/gpu/drm/amd/pm/swsmu

[PATCH 8/8] drm/amd/pm: add fan minimum pwm OD setting support for SMU13

2023-08-15 Thread Evan Quan
Add SMU13 fan minimum pwm OD setting support. Signed-off-by: Evan Quan --- .../gpu/drm/amd/include/kgd_pp_interface.h| 2 + drivers/gpu/drm/amd/pm/amdgpu_pm.c| 45 drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h | 2 + drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c

[V9 0/9] Enable Wifi RFI interference mitigation feature support

2023-08-17 Thread Evan Quan
to wifi subsystem. Patch5 - 9: Bring WBRF support to AMD graphics driver. Evan Quan (9): drivers core: Add support for Wifi band RF mitigations drivers core: add ACPI based WBRF mechanism introduced by AMD cfg80211: expose nl80211_chan_width_to_mhz for wide sharing wifi: mac80211: Add

[V9 1/9] drivers core: Add support for Wifi band RF mitigations

2023-08-17 Thread Evan Quan
=off`, the WBRF features will be disabled forcely. - With `wbrf=auto`, it will be up to the system to do proper checks to determine the WBRF features should be enabled or not. Co-developed-by: Mario Limonciello Signed-off-by: Mario Limonciello Co-developed-by: Evan Quan Signed-off-by:

[V9 2/9] drivers core: add ACPI based WBRF mechanism introduced by AMD

2023-08-17 Thread Evan Quan
-developed-by: Mario Limonciello Signed-off-by: Mario Limonciello Co-developed-by: Evan Quan Signed-off-by: Evan Quan -- v4->v5: - promote this to be a more generic solution with input argument taking `struct device` and provide better scalability to support non-ACPI scenarios(Andrew) - upd

[V9 3/9] cfg80211: expose nl80211_chan_width_to_mhz for wide sharing

2023-08-17 Thread Evan Quan
The newly added WBRF feature needs this interface for channel width calculation. Signed-off-by: Evan Quan -- v8->v9: - correct typo(Mhz -> MHz) (Johnson) --- include/net/cfg80211.h | 8 net/wireless/chan.c| 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff -

[V9 4/9] wifi: mac80211: Add support for WBRF features

2023-08-17 Thread Evan Quan
-developed-by: Mario Limonciello Signed-off-by: Mario Limonciello Co-developed-by: Evan Quan Signed-off-by: Evan Quan -- v1->v2: - place the new added member(`wbrf_supported`) in ieee80211_local(Johannes) - handle chandefs change scenario properly(Johannes) - some minor fixes around c

[V9 6/9] drm/amd/pm: setup the framework to support Wifi RFI mitigation feature

2023-08-17 Thread Evan Quan
With WBRF feature supported, as a driver responding to the frequencies, amdgpu driver is able to do shadow pstate switching to mitigate possible interference(between its (G-)DDR memory clocks and local radio module frequency bands used by Wifi 6/6e/7). Signed-off-by: Evan Quan Reviewed-by: Mario

[V9 5/9] drm/amd/pm: update driver_if and ppsmc headers for coming wbrf feature

2023-08-17 Thread Evan Quan
Add those data structures to support Wifi RFI mitigation feature. Signed-off-by: Evan Quan Reviewed-by: Mario Limonciello --- .../pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_0.h | 14 +- .../pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_7.h | 14 +- .../amd/pm/swsmu/inc

[V9 7/9] drm/amd/pm: add flood detection for wbrf events

2023-08-17 Thread Evan Quan
To protect PMFW from being overloaded. Signed-off-by: Evan Quan Reviewed-by: Mario Limonciello --- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 31 +++ drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 7 + 2 files changed, 32 insertions(+), 6 deletions(-) diff --git a

[V9 9/9] drm/amd/pm: enable Wifi RFI mitigation feature support for SMU13.0.7

2023-08-17 Thread Evan Quan
Fulfill the SMU13.0.7 support for Wifi RFI mitigation feature. Signed-off-by: Evan Quan Reviewed-by: Mario Limonciello --- .../drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 59 +++ 1 file changed, 59 insertions(+) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c

[V9 8/9] drm/amd/pm: enable Wifi RFI mitigation feature support for SMU13.0.0

2023-08-17 Thread Evan Quan
Fulfill the SMU13.0.0 support for Wifi RFI mitigation feature. Signed-off-by: Evan Quan Reviewed-by: Mario Limonciello --- drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 3 + drivers/gpu/drm/amd/pm/swsmu/inc/smu_types.h | 3 +- drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h | 3 + .../gpu

[PATCH] drm/amd/pm: correct SMU13 gfx voltage related OD settings

2023-08-20 Thread Evan Quan
The voltage offset setting will be applied to the whole v/f curve line instead of per anchor point base. Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/pm/amdgpu_pm.c| 45 +++ .../drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 31 ++--- .../drm/amd/pm/swsmu

[PATCH] drm/amd/pm: fulfill the support for SMU13 `pp_dpm_dcefclk` interface

2023-08-20 Thread Evan Quan
Fulfill the incomplete SMU13 `pp_dpm_dcefclk` implementation. Reported-by: Guan Yu Signed-off-by: Evan Quan --- .../drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 27 +++ .../drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 27 +++ 2 files changed, 54 insertions

[V2 1/8] drm/amd/pm: introduce a new set of OD interfaces

2023-08-22 Thread Evan Quan
directory. Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 + drivers/gpu/drm/amd/pm/amdgpu_pm.c | 264 - drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h| 2 + 3 files changed, 266 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/

[V2 3/8] drm/amd/pm: add fan mode OD setting support for SMU13

2023-08-22 Thread Evan Quan
Add SMU13 fan mode OD setting support. Signed-off-by: Evan Quan -- v1->v2: - add missing kerneldoc for the new interface(Alex) --- Documentation/gpu/amdgpu/thermal.rst | 6 + .../gpu/drm/amd/include/kgd_pp_interface.h| 4 +- drivers/gpu/drm/amd/pm/amdgpu_pm.c|

[V2 4/8] drm/amd/pm: add fan temperature/pwm curve OD setting support for SMU13

2023-08-22 Thread Evan Quan
Add SMU13 fan temperature/pwm curve OD setting support. Signed-off-by: Evan Quan -- v1->v2: - add missing kerneldoc for the new interface(Alex) --- Documentation/gpu/amdgpu/thermal.rst | 6 ++ .../gpu/drm/amd/include/kgd_pp_interface.h| 2 + drivers/gpu/drm/amd/pm/amdgpu_p

[V2 6/8] drm/amd/pm: add fan acoustic target OD setting support for SMU13

2023-08-22 Thread Evan Quan
Add SMU13 fan acoustic target OD setting support. Signed-off-by: Evan Quan -- v1->v2: - add missing kerneldoc for the new interface(Alex) --- Documentation/gpu/amdgpu/thermal.rst | 6 ++ .../gpu/drm/amd/include/kgd_pp_interface.h| 2 + drivers/gpu/drm/amd/pm/amdgpu_p

[V2 2/8] drm/amdgpu: revise the device initialization sequences

2023-08-22 Thread Evan Quan
By placing the sysfs interfaces creation after `.late_int`. Since some operations performed during `.late_init` may affect how the sysfs interfaces should be created. Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 37 -- 1 file changed, 21

[V2 5/8] drm/amd/pm: add fan acoustic limit OD setting support for SMU13

2023-08-22 Thread Evan Quan
Add SMU13 fan acoustic limit OD setting support. Signed-off-by: Evan Quan -- v1->v2: - add missing kerneldoc for the new interface(Alex) --- Documentation/gpu/amdgpu/thermal.rst | 6 ++ .../gpu/drm/amd/include/kgd_pp_interface.h| 2 + drivers/gpu/drm/amd/pm/amdgpu_p

[V2 8/8] drm/amd/pm: add fan minimum pwm OD setting support for SMU13

2023-08-22 Thread Evan Quan
Add SMU13 fan minimum pwm OD setting support. Signed-off-by: Evan Quan -- v1->v2: - add missing kerneldoc for the new interface(Alex) --- Documentation/gpu/amdgpu/thermal.rst | 6 ++ .../gpu/drm/amd/include/kgd_pp_interface.h| 2 + drivers/gpu/drm/amd/pm/amdgpu_p

[V2 7/8] drm/amd/pm: add fan target temperature OD setting support for SMU13

2023-08-22 Thread Evan Quan
Add SMU13 fan target temperature OD setting support. Signed-off-by: Evan Quan -- v1->v2: - add missing kerneldoc for the new interface(Alex) --- Documentation/gpu/amdgpu/thermal.rst | 6 ++ .../gpu/drm/amd/include/kgd_pp_interface.h| 2 + drivers/gpu/drm/amd/pm/amdgpu_p

[V10 0/8] Enable Wifi RFI interference mitigation feature support

2023-08-25 Thread Evan Quan
to wifi subsystem. Patch4 - 8: Bring WBRF support to AMD graphics driver. Evan Quan (8): ACPI: Add support for AMD ACPI based Wifi band RFI mitigation feature cfg80211: expose nl80211_chan_width_to_mhz for wide sharing wifi: mac80211: Add support for WBRF features drm/amd/pm: update

[V10 1/8] ACPI: Add support for AMD ACPI based Wifi band RFI mitigation feature

2023-08-25 Thread Evan Quan
can use to notify active use of particular frequencies so that other devices can make relative internal adjustments as necessary to avoid this resonance. Signed-off-by: Evan Quan --- drivers/acpi/Kconfig | 17 ++ drivers/acpi/Makefile | 2 + drivers/acpi/amd_wbrf.c | 414

[V10 2/8] cfg80211: expose nl80211_chan_width_to_mhz for wide sharing

2023-08-25 Thread Evan Quan
The newly added WBRF feature needs this interface for channel width calculation. Signed-off-by: Evan Quan -- v8->v9: - correct typo(Mhz -> MHz) (Johnson) --- include/net/cfg80211.h | 8 net/wireless/chan.c| 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff -

[V10 4/8] drm/amd/pm: update driver_if and ppsmc headers for coming wbrf feature

2023-08-25 Thread Evan Quan
Add those data structures to support Wifi RFI mitigation feature. Signed-off-by: Evan Quan Reviewed-by: Mario Limonciello --- .../pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_0.h | 14 +- .../pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_7.h | 14 +- .../amd/pm/swsmu/inc

[V10 3/8] wifi: mac80211: Add support for WBRF features

2023-08-25 Thread Evan Quan
-developed-by: Mario Limonciello Signed-off-by: Mario Limonciello Co-developed-by: Evan Quan Signed-off-by: Evan Quan -- v1->v2: - place the new added member(`wbrf_supported`) in ieee80211_local(Johannes) - handle chandefs change scenario properly(Johannes) - some minor fixes around c

[V10 5/8] drm/amd/pm: setup the framework to support Wifi RFI mitigation feature

2023-08-25 Thread Evan Quan
With WBRF feature supported, as a driver responding to the frequencies, amdgpu driver is able to do shadow pstate switching to mitigate possible interference(between its (G-)DDR memory clocks and local radio module frequency bands used by Wifi 6/6e/7). Signed-off-by: Evan Quan Reviewed-by: Mario

[V10 6/8] drm/amd/pm: add flood detection for wbrf events

2023-08-25 Thread Evan Quan
To protect PMFW from being overloaded. Signed-off-by: Evan Quan Reviewed-by: Mario Limonciello --- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 31 +++ drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 7 + 2 files changed, 32 insertions(+), 6 deletions(-) diff --git a

[V10 7/8] drm/amd/pm: enable Wifi RFI mitigation feature support for SMU13.0.0

2023-08-25 Thread Evan Quan
Fulfill the SMU13.0.0 support for Wifi RFI mitigation feature. Signed-off-by: Evan Quan Reviewed-by: Mario Limonciello --- drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 3 + drivers/gpu/drm/amd/pm/swsmu/inc/smu_types.h | 3 +- drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h | 3 + .../gpu

[V10 8/8] drm/amd/pm: enable Wifi RFI mitigation feature support for SMU13.0.7

2023-08-25 Thread Evan Quan
Fulfill the SMU13.0.7 support for Wifi RFI mitigation feature. Signed-off-by: Evan Quan Reviewed-by: Mario Limonciello --- .../drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 59 +++ 1 file changed, 59 insertions(+) diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c

[V3 0/7] A new set of Linux OD interfaces

2023-08-29 Thread Evan Quan
directory. gpu_od/ ├── fan_ctrl │ ├── acoustic_limit_rpm_threshold │ ├── acoustic_target_rpm_threshold │ ├── fan_curve │ ├── fan_minimum_pwm │ ├── fan_target_temperature Evan Quan (7): drm/amd/pm: introduce a new set of OD interfaces drm/amdgpu: revise the device initialization

[V3 2/7] drm/amdgpu: revise the device initialization sequences

2023-08-29 Thread Evan Quan
By placing the sysfs interfaces creation after `.late_int`. Since some operations performed during `.late_init` may affect how the sysfs interfaces should be created. Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 37 -- 1 file changed, 21

[V3 4/7] drm/amd/pm: add fan acoustic limit OD setting support for SMU13

2023-08-29 Thread Evan Quan
Add SMU13 fan acoustic limit OD setting support. Signed-off-by: Evan Quan -- v1->v2: - add missing kerneldoc for the new interface(Alex) v2->v3: - rich the document for the new interface(Alex) --- Documentation/gpu/amdgpu/thermal.rst | 6 ++ .../gpu/drm/amd/i

[V3 6/7] drm/amd/pm: add fan target temperature OD setting support for SMU13

2023-08-29 Thread Evan Quan
Add SMU13 fan target temperature OD setting support. Signed-off-by: Evan Quan -- v1->v2: - add missing kerneldoc for the new interface(Alex) v2->v3: - rich the document for the new interface(Alex) --- Documentation/gpu/amdgpu/thermal.rst | 6 ++ .../gpu/drm/amd/i

[V3 7/7] drm/amd/pm: add fan minimum pwm OD setting support for SMU13

2023-08-29 Thread Evan Quan
Add SMU13 fan minimum pwm OD setting support. Signed-off-by: Evan Quan -- v1->v2: - add missing kerneldoc for the new interface(Alex) v2->v3: - rich the document for the new interface(Alex) --- Documentation/gpu/amdgpu/thermal.rst | 6 ++ .../gpu/drm/amd/include/kgd_pp_inter

[V3 3/7] drm/amd/pm: add fan temperature/pwm curve OD setting support for SMU13

2023-08-29 Thread Evan Quan
Add SMU13 fan temperature/pwm curve OD setting support. Signed-off-by: Evan Quan -- v1->v2: - add missing kerneldoc for the new interface(Alex) v2->v3: - rich the document for the new interface(Alex) --- Documentation/gpu/amdgpu/thermal.rst | 6 + .../gpu/drm/amd/i

[V3 1/7] drm/amd/pm: introduce a new set of OD interfaces

2023-08-29 Thread Evan Quan
directory. Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 + drivers/gpu/drm/amd/pm/amdgpu_pm.c | 264 - drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h| 2 + 3 files changed, 266 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/

[V3 5/7] drm/amd/pm: add fan acoustic target OD setting support for SMU13

2023-08-29 Thread Evan Quan
Add SMU13 fan acoustic target OD setting support. Signed-off-by: Evan Quan -- v1->v2: - add missing kerneldoc for the new interface(Alex) v2->v3: - rich the document for the new interface(Alex) --- Documentation/gpu/amdgpu/thermal.rst | 6 ++ .../gpu/drm/amd/i

[PATCH] Revert "drm/amd/pm: disable the SMU13 OD feature support temporarily"

2023-08-30 Thread Evan Quan
This reverts commit 3592cc20beeece83db4c50a0f400e2dd15139de9. The enablement for the new OD mechanism completed. Also, the support for fan control related OD feature has been added via this new mechanism. Thus, it is time to bring back the SMU13 OD support. Signed-off-by: Evan Quan --- .../drm

[V11 0/8] Enable Wifi RFI interference mitigation feature support

2023-08-30 Thread Evan Quan
to wifi subsystem. Patch4 - 8: Bring WBRF support to AMD graphics driver. Evan Quan (8): ACPI: Add support for AMD ACPI based Wifi band RFI mitigation feature cfg80211: expose nl80211_chan_width_to_mhz for wide sharing wifi: mac80211: Add support for WBRF features drm/amd/pm: update

[V11 1/8] ACPI: Add support for AMD ACPI based Wifi band RFI mitigation feature

2023-08-30 Thread Evan Quan
can use to notify active use of particular frequencies so that other devices can make relative internal adjustments as necessary to avoid this resonance. Signed-off-by: Evan Quan -- v10->v11: - fix typo(Simon) --- drivers/acpi/Kconfig | 17 ++ drivers/acpi/Makefile |

[V11 2/8] cfg80211: expose nl80211_chan_width_to_mhz for wide sharing

2023-08-30 Thread Evan Quan
The newly added WBRF feature needs this interface for channel width calculation. Signed-off-by: Evan Quan -- v8->v9: - correct typo(Mhz -> MHz) (Johnson) --- include/net/cfg80211.h | 8 net/wireless/chan.c| 3 ++- 2 files changed, 10 insertions(+), 1 deletion(-) diff -

[V11 3/8] wifi: mac80211: Add support for WBRF features

2023-08-30 Thread Evan Quan
-developed-by: Mario Limonciello Signed-off-by: Mario Limonciello Co-developed-by: Evan Quan Signed-off-by: Evan Quan -- v1->v2: - place the new added member(`wbrf_supported`) in ieee80211_local(Johannes) - handle chandefs change scenario properly(Johannes) - some minor fixes around c

[V11 4/8] drm/amd/pm: update driver_if and ppsmc headers for coming wbrf feature

2023-08-30 Thread Evan Quan
Add those data structures to support Wifi RFI mitigation feature. Signed-off-by: Evan Quan Reviewed-by: Mario Limonciello --- .../pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_0.h | 14 +- .../pm/swsmu/inc/pmfw_if/smu13_driver_if_v13_0_7.h | 14 +- .../amd/pm/swsmu/inc

[V11 5/8] drm/amd/pm: setup the framework to support Wifi RFI mitigation feature

2023-08-30 Thread Evan Quan
With WBRF feature supported, as a driver responding to the frequencies, amdgpu driver is able to do shadow pstate switching to mitigate possible interference(between its (G-)DDR memory clocks and local radio module frequency bands used by Wifi 6/6e/7). Signed-off-by: Evan Quan Reviewed-by: Mario

[V11 6/8] drm/amd/pm: add flood detection for wbrf events

2023-08-30 Thread Evan Quan
To protect PMFW from being overloaded. Signed-off-by: Evan Quan Reviewed-by: Mario Limonciello --- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 31 +++ drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 7 + 2 files changed, 32 insertions(+), 6 deletions(-) diff --git a

[V11 7/8] drm/amd/pm: enable Wifi RFI mitigation feature support for SMU13.0.0

2023-08-30 Thread Evan Quan
Fulfill the SMU13.0.0 support for Wifi RFI mitigation feature. Signed-off-by: Evan Quan Reviewed-by: Mario Limonciello -- v10->v11: - downgrade the prompt level on message failure(Lijo) --- drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 3 + drivers/gpu/drm/amd/pm/swsmu/inc/smu_type

[V11 8/8] drm/amd/pm: enable Wifi RFI mitigation feature support for SMU13.0.7

2023-08-30 Thread Evan Quan
Fulfill the SMU13.0.7 support for Wifi RFI mitigation feature. Signed-off-by: Evan Quan Reviewed-by: Mario Limonciello -- v10->v11: - downgrade the prompt level on message failure(Lijo) --- .../drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 59 +++ 1 file changed, 59 inserti

[PATCH] drm/amd/amdgpu: add POLARIS12 PCI ID

2017-03-16 Thread Evan Quan
Change-Id: I730eed1bca04725696cd086e9c6ba1a31bafd8a7 Signed-off-by: Evan Quan --- drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c index d7f286d..d9f036b 100644 --- a

[PATCH V3 00/17] Unified entry point for other blocks to interact with power

2021-12-01 Thread Evan Quan
for unnecessary power locks possible. Evan Quan (17): drm/amd/pm: do not expose implementation details to other blocks out of power drm/amd/pm: do not expose power implementation details to amdgpu_pm.c drm/amd/pm: do not expose power implementation details to display drm/amd/pm: do not

[PATCH V3 01/17] drm/amd/pm: do not expose implementation details to other blocks out of power

2021-12-01 Thread Evan Quan
Those implementation details(whether swsmu supported, some ppt_funcs supported, accessing internal statistics ...)should be kept internally. It's not a good practice and even error prone to expose implementation details. Signed-off-by: Evan Quan Chan

[PATCH V3 02/17] drm/amd/pm: do not expose power implementation details to amdgpu_pm.c

2021-12-01 Thread Evan Quan
amdgpu_pm.c holds all the user sysfs/hwmon interfaces. It's another client of our power APIs. It's not proper to spike into power implementation details there. Signed-off-by: Evan Quan Change-Id: I397853ddb13eacfce841366de2a623535422df9a -- v1->v2: - drop unneeded

[PATCH V3 03/17] drm/amd/pm: do not expose power implementation details to display

2021-12-01 Thread Evan Quan
Display is another client of our power APIs. It's not proper to spike into power implementation details there. Signed-off-by: Evan Quan Change-Id: Ic897131e16473ed29d3d7586d822a55c64e6574a --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 +- .../amd/display/amdgpu_dm/amdgpu_dm_pp_

[PATCH V3 04/17] drm/amd/pm: do not expose those APIs used internally only in amdgpu_dpm.c

2021-12-01 Thread Evan Quan
Move them to amdgpu_dpm.c instead. Signed-off-by: Evan Quan Change-Id: I59fe0efcb47c18ec7254f3624db7a2eb78d91b8c --- drivers/gpu/drm/amd/pm/amdgpu_dpm.c | 25 +++-- drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h | 23 --- 2 files changed, 23 insertions

[PATCH V3 05/17] drm/amd/pm: do not expose those APIs used internally only in si_dpm.c

2021-12-01 Thread Evan Quan
Move them to si_dpm.c instead. Signed-off-by: Evan Quan Change-Id: I288205cfd7c6ba09cfb22626ff70360d61ff0c67 -- v1->v2: - rename the API with "si_" prefix(Alex) v2->v3: - rename other data structures used only in si_dpm.c(Lijo) --- drivers/gpu/drm/amd/pm/amdgpu_d

[PATCH V3 06/17] drm/amd/pm: do not expose the API used internally only in kv_dpm.c

2021-12-01 Thread Evan Quan
Move it to kv_dpm.c instead. Signed-off-by: Evan Quan Change-Id: I554332b386491a79b7913f72786f1e2cb1f8165b -- v1->v2: - rename the API with "kv_" prefix(Alex) --- drivers/gpu/drm/amd/pm/amdgpu_dpm.c | 23 - drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h |

[PATCH V3 08/17] drm/amd/pm: move pp_force_state_enabled member to amdgpu_pm structure

2021-12-01 Thread Evan Quan
As it lables an internal pm state and amdgpu_pm structure is the more proper place than amdgpu_device structure for it. Signed-off-by: Evan Quan Change-Id: I7890e8fe7af2ecd8591d30442340deb8773bacc3 --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 - drivers/gpu/drm/amd/pm/amdgpu_pm.c | 6

[PATCH V3 07/17] drm/amd/pm: create a new holder for those APIs used only by legacy ASICs(si/kv)

2021-12-01 Thread Evan Quan
Those APIs are used only by legacy ASICs(si/kv). They cannot be shared by other ASICs. So, we create a new holder for them. Signed-off-by: Evan Quan Change-Id: I555dfa37e783a267b1d3b3a7db5c87fcc3f1556f -- v1->v2: - rename amdgpu_pm_compute_clocks as amdgpu_dpm_compute_clocks(Lijo) --- driv

[PATCH V3 09/17] drm/amd/pm: optimize the amdgpu_pm_compute_clocks() implementations

2021-12-01 Thread Evan Quan
Drop cross callings and multi-function APIs. Also avoid exposing internal implementations details. Signed-off-by: Evan Quan Change-Id: I55e5ab3da6a70482f5f5d8c256eed2f754feae20 --- .../gpu/drm/amd/include/kgd_pp_interface.h| 2 +- drivers/gpu/drm/amd/pm/Makefile | 2

[PATCH V3 10/17] drm/amd/pm: move those code piece used by Stoney only to smu8_hwmgr.c

2021-12-01 Thread Evan Quan
Instead of putting them in amdgpu_dpm.c. Signed-off-by: Evan Quan Change-Id: Ieb7ed5fb6140401a7692b401c5a42dc53da92af8 --- drivers/gpu/drm/amd/pm/amdgpu_dpm.c| 14 -- drivers/gpu/drm/amd/pm/inc/hwmgr.h | 3 --- .../gpu/drm/amd/pm/powerplay/hwmgr

[PATCH V3 12/17] drm/amd/pm: drop redundant or unused APIs and data structures

2021-12-01 Thread Evan Quan
Drop those unused APIs and data structures. Signed-off-by: Evan Quan Change-Id: I57d2a03dcda02d0b5d9c5ffbdd37bffe49945407 --- drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h | 49 - drivers/gpu/drm/amd/pm/swsmu/smu_cmn.h | 4 ++ 2 files changed, 4 insertions(+), 49 deletions

[PATCH V3 11/17] drm/amd/pm: correct the usage for amdgpu_dpm_dispatch_task()

2021-12-01 Thread Evan Quan
We should avoid having multi-function APIs. It should be up to the caller to determine when or whether to call amdgpu_dpm_dispatch_task(). Signed-off-by: Evan Quan Change-Id: I78ec4eb8ceb6e526a4734113d213d15a5fbaa8a4 --- drivers/gpu/drm/amd/pm/amdgpu_dpm.c | 18 ++ drivers/gpu

[PATCH V3 15/17] drm/amd/pm: drop unnecessary gfxoff controls

2021-12-01 Thread Evan Quan
Those gfxoff controls added for some specific ASICs are unnecessary. The functionalities are not affected without them. Also to align with other ASICs, they should also be dropped. Signed-off-by: Evan Quan Change-Id: Ia8475ef9e97635441aca5e0a7693e2a515498523 --- drivers/gpu/drm/amd/pm/swsmu

[PATCH V3 17/17] drm/amd/pm: unified lock protections in amdgpu_dpm.c

2021-12-01 Thread Evan Quan
As the only entry point, it's now safe and reasonable to enforce the lock protections in amdgpu_dpm.c. And with this, we can drop other internal used power locks. Signed-off-by: Evan Quan Change-Id: Iad228cad0b3d8c41927def08965a52525f3f51d3 --- drivers/gpu/drm/amd/pm/amdgpu_dpm.c

[PATCH V3 16/17] drm/amd/pm: revise the performance level setting APIs

2021-12-01 Thread Evan Quan
Avoid cross callings which make lock protection enforcement on amdgpu_dpm_force_performance_level() impossible. Signed-off-by: Evan Quan Change-Id: Ie658140f40ab906ce2ec47576a086062b61076a6 --- drivers/gpu/drm/amd/pm/amdgpu_pm.c| 29 --- .../gpu/drm/amd/pm/legacy-dpm

[PATCH V3 14/17] drm/amd/pm: relocate the power related headers

2021-12-01 Thread Evan Quan
Instead of centralizing all headers in the same folder. Separate them into different folders and place them among those source files those who really need them. Signed-off-by: Evan Quan Change-Id: Id74cb4c7006327ca7ecd22daf17321e417c4aa71 --- drivers/gpu/drm/amd/pm/Makefile | 10

[PATCH V3 13/17] drm/amd/pm: do not expose the smu_context structure used internally in power

2021-12-01 Thread Evan Quan
This can cover the power implementation details. And as what did for powerplay framework, we hook the smu_context to adev->powerplay.pp_handle. Signed-off-by: Evan Quan Change-Id: I3969c9f62a8b63dc6e4321a488d8f15022ffeb3d -- v1->v2: - drop smu_ppt_limit_type used internall

[PATCH V4 01/17] drm/amd/pm: do not expose implementation details to other blocks out of power

2021-12-02 Thread Evan Quan
Those implementation details(whether swsmu supported, some ppt_funcs supported, accessing internal statistics ...)should be kept internally. It's not a good practice and even error prone to expose implementation details. Signed-off-by: Evan Quan Chan

[PATCH V4 02/17] drm/amd/pm: do not expose power implementation details to amdgpu_pm.c

2021-12-02 Thread Evan Quan
amdgpu_pm.c holds all the user sysfs/hwmon interfaces. It's another client of our power APIs. It's not proper to spike into power implementation details there. Signed-off-by: Evan Quan Change-Id: I397853ddb13eacfce841366de2a623535422df9a -- v1->v2: - drop unneeded

[PATCH V4 03/17] drm/amd/pm: do not expose power implementation details to display

2021-12-02 Thread Evan Quan
Display is another client of our power APIs. It's not proper to spike into power implementation details there. Signed-off-by: Evan Quan Change-Id: Ic897131e16473ed29d3d7586d822a55c64e6574a --- .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 6 +- .../amd/display/amdgpu_dm/amdgpu_dm_pp_

[PATCH V4 04/17] drm/amd/pm: do not expose those APIs used internally only in amdgpu_dpm.c

2021-12-02 Thread Evan Quan
Move them to amdgpu_dpm.c instead. Signed-off-by: Evan Quan Change-Id: I59fe0efcb47c18ec7254f3624db7a2eb78d91b8c --- drivers/gpu/drm/amd/pm/amdgpu_dpm.c | 25 +++-- drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h | 23 --- 2 files changed, 23 insertions

[PATCH V4 06/17] drm/amd/pm: do not expose the API used internally only in kv_dpm.c

2021-12-02 Thread Evan Quan
Move it to kv_dpm.c instead. Signed-off-by: Evan Quan Change-Id: I554332b386491a79b7913f72786f1e2cb1f8165b -- v1->v2: - rename the API with "kv_" prefix(Alex) --- drivers/gpu/drm/amd/pm/amdgpu_dpm.c | 23 - drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h |

[PATCH V4 05/17] drm/amd/pm: do not expose those APIs used internally only in si_dpm.c

2021-12-02 Thread Evan Quan
Move them to si_dpm.c instead. Signed-off-by: Evan Quan Change-Id: I288205cfd7c6ba09cfb22626ff70360d61ff0c67 -- v1->v2: - rename the API with "si_" prefix(Alex) v2->v3: - rename other data structures used only in si_dpm.c(Lijo) --- drivers/gpu/drm/amd/pm/amdgpu_d

[PATCH V4 08/17] drm/amd/pm: move pp_force_state_enabled member to amdgpu_pm structure

2021-12-02 Thread Evan Quan
As it lables an internal pm state and amdgpu_pm structure is the more proper place than amdgpu_device structure for it. Signed-off-by: Evan Quan Change-Id: I7890e8fe7af2ecd8591d30442340deb8773bacc3 --- drivers/gpu/drm/amd/amdgpu/amdgpu.h | 1 - drivers/gpu/drm/amd/pm/amdgpu_pm.c | 6

[PATCH V4 07/17] drm/amd/pm: create a new holder for those APIs used only by legacy ASICs(si/kv)

2021-12-02 Thread Evan Quan
Those APIs are used only by legacy ASICs(si/kv). They cannot be shared by other ASICs. So, we create a new holder for them. Signed-off-by: Evan Quan Change-Id: I555dfa37e783a267b1d3b3a7db5c87fcc3f1556f -- v1->v2: - rename amdgpu_pm_compute_clocks as amdgpu_dpm_compute_clocks(Lijo) v2-

[PATCH V4 10/17] drm/amd/pm: move those code piece used by Stoney only to smu8_hwmgr.c

2021-12-02 Thread Evan Quan
Instead of putting them in amdgpu_dpm.c. Signed-off-by: Evan Quan Change-Id: Ieb7ed5fb6140401a7692b401c5a42dc53da92af8 --- drivers/gpu/drm/amd/pm/amdgpu_dpm.c| 14 -- drivers/gpu/drm/amd/pm/inc/hwmgr.h | 3 --- .../gpu/drm/amd/pm/powerplay/hwmgr

[PATCH V4 09/17] drm/amd/pm: optimize the amdgpu_pm_compute_clocks() implementations

2021-12-02 Thread Evan Quan
Drop cross callings and multi-function APIs. Also avoid exposing internal implementations details. Signed-off-by: Evan Quan Change-Id: I55e5ab3da6a70482f5f5d8c256eed2f754feae20 -- v1->v2: - add back the adev->pm.dpm_enabled check(Lijo) --- .../gpu/drm/amd/include/kgd_pp_interface.h

[PATCH V4 11/17] drm/amd/pm: correct the usage for amdgpu_dpm_dispatch_task()

2021-12-02 Thread Evan Quan
We should avoid having multi-function APIs. It should be up to the caller to determine when or whether to call amdgpu_dpm_dispatch_task(). Signed-off-by: Evan Quan Change-Id: I78ec4eb8ceb6e526a4734113d213d15a5fbaa8a4 --- drivers/gpu/drm/amd/pm/amdgpu_dpm.c | 18 ++ drivers/gpu

[PATCH V4 12/17] drm/amd/pm: drop redundant or unused APIs and data structures

2021-12-02 Thread Evan Quan
Drop those unused APIs and data structures. Signed-off-by: Evan Quan Change-Id: I57d2a03dcda02d0b5d9c5ffbdd37bffe49945407 --- drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h | 49 - drivers/gpu/drm/amd/pm/swsmu/smu_cmn.h | 4 ++ 2 files changed, 4 insertions(+), 49 deletions

[PATCH V4 13/17] drm/amd/pm: do not expose the smu_context structure used internally in power

2021-12-02 Thread Evan Quan
This can cover the power implementation details. And as what did for powerplay framework, we hook the smu_context to adev->powerplay.pp_handle. Signed-off-by: Evan Quan Change-Id: I3969c9f62a8b63dc6e4321a488d8f15022ffeb3d -- v1->v2: - drop smu_ppt_limit_type used internall

[PATCH V4 15/17] drm/amd/pm: drop unnecessary gfxoff controls

2021-12-02 Thread Evan Quan
Those gfxoff controls added for some specific ASICs are unnecessary. The functionalities are not affected without them. Also to align with other ASICs, they should also be dropped. Signed-off-by: Evan Quan Change-Id: Ia8475ef9e97635441aca5e0a7693e2a515498523 --- drivers/gpu/drm/amd/pm/swsmu

[PATCH V4 14/17] drm/amd/pm: relocate the power related headers

2021-12-02 Thread Evan Quan
Instead of centralizing all headers in the same folder. Separate them into different folders and place them among those source files those who really need them. Signed-off-by: Evan Quan Change-Id: Id74cb4c7006327ca7ecd22daf17321e417c4aa71 --- drivers/gpu/drm/amd/pm/Makefile | 10

[PATCH V4 17/17] drm/amd/pm: unified lock protections in amdgpu_dpm.c

2021-12-02 Thread Evan Quan
As the only entry point, it's now safe and reasonable to enforce the lock protections in amdgpu_dpm.c. And with this, we can drop other internal used power locks. Signed-off-by: Evan Quan Change-Id: Iad228cad0b3d8c41927def08965a52525f3f51d3 --- drivers/gpu/drm/amd/pm/amdgpu_dpm.c

[PATCH V4 16/17] drm/amd/pm: revise the performance level setting APIs

2021-12-02 Thread Evan Quan
Avoid cross callings which make lock protection enforcement on amdgpu_dpm_force_performance_level() impossible. Signed-off-by: Evan Quan Change-Id: Ie658140f40ab906ce2ec47576a086062b61076a6 -- v1->v2: - drop unused enable_umd_pstate callback(Lijo) --- drivers/gpu/drm/amd/include/amd_share

[PATCH 0/7] Drop unneeded power related lock protections

2021-12-07 Thread Evan Quan
As a follow-up for previous cleanup, those redundant lock protections can be dropped now. As we already adopted an unified lock(adev->pm.mutex) in amdgpu_dpm.c. Evan Quan (7): drm/amd/pm: drop unneeded lock protection smu->mutex drm/amd/pm: drop unneeded vcn/jpeg_gate_lock drm/amd/pm

[PATCH 2/7] drm/amd/pm: drop unneeded vcn/jpeg_gate_lock

2021-12-07 Thread Evan Quan
As those related APIs are already protected by adev->pm.mutex. Signed-off-by: Evan Quan Change-Id: I762fab96bb1c034c153b029f939ec6e498460007 --- drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 56 +++ drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 2 - 2 files changed

<    1   2   3   4   5   6   7   8   9   10   >