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
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
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
--
v1->v2:
- create separate holders for driver
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| 707
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
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)
v3->v4:
- rename Macros used only in
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 |
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
Pair the operations did in GMC ->hw_init and ->hw_fini. That
can help to maintain correct cached state for GMC and avoid
unintention gate operation dropping due to wrong cached state.
BUG: https://gitlab.freedesktop.org/drm/amd/-/issues/1828
Signed-off-by: Evan Quan
Cha
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
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
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
Change-Id
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 &quo
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_smu.c
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
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
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
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
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| 719
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
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 |
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
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
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
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
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
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
.
- For those non-committed changes, they are restored only without feeding
to SMU.
Change-Id: Iea7cf7908dfcd919a4d0205e10bff91b1149a440
Signed-off-by: Evan Quan
---
drivers/gpu/drm/amd/pm/inc/amdgpu_smu.h | 8 +++
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 9
.../gpu/drm/amd/pm
Properly restore those committed and non-committed user customized OD
settings.
Change-Id: I25396df0b3ecdd7a0d9fc77ed220b0abf1fde020
Signed-off-by: Evan Quan
---
drivers/gpu/drm/amd/pm/inc/smu_v11_0.h | 2 ++
drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c | 15
Properly restore those committed and non-committed user customized OD
settings.
Change-Id: I25396df0b3ecdd7a0d9fc77ed220b0abf1fde020
Signed-off-by: Evan Quan
---
.../amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 37 ++-
1 file changed, 28 insertions(+), 9 deletions(-)
diff --git
.
- For those non-committed changes, they are restored only without feeding
to SMU.
Change-Id: Iea7cf7908dfcd919a4d0205e10bff91b1149a440
Signed-off-by: Evan Quan
--
v1->v2
- better naming and logic revised for checking OD setting update(Lijo)
---
drivers/gpu/drm/amd/pm/inc/amdgpu_sm
As all those related APIs are already well protected by adev->pm.mutex.
Signed-off-by: Evan Quan
Change-Id: I36426791d3bbc9d84a6ae437da26a892682eb0cb
---
.../gpu/drm/amd/pm/powerplay/amd_powerplay.c | 282 +++---
drivers/gpu/drm/amd/pm/powerplay/inc/hwmgr.h | 1 -
2 fi
A unified lock protection mechanism was already enforced on those APIs
from amdgpu_dpm.c. Thus those extra internal lock protections will be
unnecessary and can be dropped.
Evan Quan (7):
drm/amd/pm: drop unneeded lock protection smu->mutex
drm/amd/pm: drop unneeded vcn/jpeg_gate_lock
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
As all those APIs are already protected either by adev->pm.mutex
or smu->message_lock.
Signed-off-by: Evan Quan
Change-Id: I1db751fba9caabc5ca1314992961d3674212f9b0
---
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 315 ++
drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h
As all those related APIs are already well protected by
adev->pm.mutex and smu->message_lock.
Signed-off-by: Evan Quan
Change-Id: I20974b2ae68d63525bc7c7f406fede2971c5fecc
---
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 1 -
drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu
As all those related APIs are already well protected by
adev->pm.mutex and smu->message_lock.
Signed-off-by: Evan Quan
Change-Id: Ic75326ba7b4b67be8762d5407d02f6c514e1ad35
---
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 1 -
drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 1 -
.
As all those related APIs are already well protected by adev->pm.mutex.
Signed-off-by: Evan Quan
Change-Id: Ia2c752ff22e8f23601484f48b66151cfda8c01b5
---
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 1 -
drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 1 -
.../gpu/drm/amd/pm/swsmu/sm
As those APIs related are already well protected by adev->pm.mutex.
Signed-off-by: Evan Quan
Change-Id: I8a7d8da5710698a98dd0f7e70c244be57474b573
---
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 1 -
drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 1 -
.../gpu/drm/amd/pm/swsmu/sm
On functionality unsupported, -EOPNOTSUPP will be returned. And we rely
on that to determine the fan attributes support.
Fixes: 801771de0331 ("drm/amd/pm: do not expose power implementation details to
amdgpu_pm.c")
Signed-off-by: Evan Quan
Change-Id: I95e7e0beebd678a446221a72234cd3
On functionality unsupported, -EOPNOTSUPP will be returned. And we rely
on that to determine the fan attributes support.
Fixes: 801771de0331 ("drm/amd/pm: do not expose power implementation details to
amdgpu_pm.c")
Signed-off-by: Evan Quan
Change-Id: I95e7e0beebd678a446221a72234cd3
As those APIs related are already well protected by adev->pm.mutex.
Signed-off-by: Evan Quan
Change-Id: I8a7d8da5710698a98dd0f7e70c244be57474b573
---
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 1 -
drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 1 -
.../gpu/drm/amd/pm/swsmu/sm
As all those related APIs are already well protected by adev->pm.mutex.
Signed-off-by: Evan Quan
Change-Id: Ia2c752ff22e8f23601484f48b66151cfda8c01b5
---
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 1 -
drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 1 -
.../gpu/drm/amd/pm/swsmu/sm
As all those related APIs are already well protected by adev->pm.mutex.
Signed-off-by: Evan Quan
Change-Id: I36426791d3bbc9d84a6ae437da26a892682eb0cb
---
.../gpu/drm/amd/pm/powerplay/amd_powerplay.c | 278 +++---
drivers/gpu/drm/amd/pm/powerplay/inc/hwmgr.h | 1 -
2 fi
As all those APIs are already protected either by adev->pm.mutex
or smu->message_lock.
Signed-off-by: Evan Quan
Change-Id: I1db751fba9caabc5ca1314992961d3674212f9b0
---
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 315 ++
drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h
As those related APIs are already protected by adev->pm.mutex.
Signed-off-by: Evan Quan
Change-Id: I762fab96bb1c034c153b029f939ec6e498460007
--
v1->v2:
- optimize the label for error exit(Guchun)
---
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 63 ---
drivers/gpu/d
As all those related APIs are already well protected by
adev->pm.mutex and smu->message_lock.
Signed-off-by: Evan Quan
Change-Id: Ic75326ba7b4b67be8762d5407d02f6c514e1ad35
---
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 1 -
drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 1 -
.
As all those related APIs are already well protected by
adev->pm.mutex and smu->message_lock.
Signed-off-by: Evan Quan
Change-Id: I20974b2ae68d63525bc7c7f406fede2971c5fecc
---
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 1 -
drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu
With this, we can support more CG flags.
Signed-off-by: Evan Quan
Acked-by: Alex Deucher
Reviewed-by: Hawking Zhang
Change-Id: Iccf13c2f9c570ca6a4654291fc4876556125c3b8
--
v1->v2:
- amdgpu_debugfs_gca_config_read: add a new rev to
support CG flag upper 32 bits(Alex)
v2->v3:
- use
With this, we can support more CG flags.
Signed-off-by: Evan Quan
Acked-by: Alex Deucher
Change-Id: Iccf13c2f9c570ca6a4654291fc4876556125c3b8
--
v1->v2:
- amdgpu_debugfs_gca_config_read: add a new rev to
support CG flag upper 32 bits(Alex)
---
drivers/gpu/drm/amd/amdgpu/amdgp
The supported features should be retrieved just after EnableAllDpmFeatures
message
complete. And the check(whether some dpm feature is supported) is only needed
when we
decide to enable or disable it.
Signed-off-by: Evan Quan
Change-Id: I07c9a5ac5290cd0d88a40ce1768d393156419b5a
---
drivers
Use uint64_t instead of an array of uint32_t. This can avoid
some non-necessary intermediate uint32_t -> uint64_t conversions.
Signed-off-by: Evan Quan
Reviewed-by: Alex Deucher
Change-Id: I4e217357203a23440f058d7e25f55eaebd15c5ef
---
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c |
As there is no internal cache for enabled ppfeatures now. Thus the 2nd
parameter will be not needed any more.
Signed-off-by: Evan Quan
Change-Id: I0c1811f216c55d6ddfabdc9e099dc214c21bdf2e
---
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 9 ++---
drivers/gpu/drm/amd/pm/swsmu/inc
As the enabled ppfeatures are just retrieved ahead. We can use
that directly instead of retrieving again and again.
Signed-off-by: Evan Quan
Change-Id: I08827437fcbbc52084418c8ca6a90cfa503306a9
---
drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 10 +-
1 file changed, 9 insertions(+), 1
related DPM features. All those are performed without driver's
notice.
Also considering driver does not actually interact with PMFW such
frequently, the benefit brought by such cache is very limited.
Signed-off-by: Evan Quan
Change-Id: I20ed58ab216e930c7a5d223be1eb99146889f2b3
---
drivers
As other dGPU asics, Renoir should use smu_cmn_get_enabled_mask() for
that job.
Signed-off-by: Evan Quan
Acked-by: Alex Deucher
Change-Id: I9e845ba84dd45d0826506de44ef4760fa851a516
---
drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git
Instead of having two which do the same thing.
Signed-off-by: Evan Quan
Change-Id: I6302c9b5abdb999c4b7c83a0d1852181208b1c1f
--
v1->v2:
- use SMU IP version check rather than an asic type check(Alex)
---
.../amd/pm/swsmu/smu11/cyan_skillfish_ppt.c | 2 +-
.../gpu/drm/amd/pm/swsmu/sm
Correct the UMD pstate profiling clocks for Dimgrey Cavefish and Beige
Goby.
Signed-off-by: Evan Quan
Change-Id: I74fdbcf2cfa11f97ae16e4921449ab7cdb7e43c9
---
.../amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 26 +++
.../amd/pm/swsmu/smu11/sienna_cichlid_ppt.h | 8 ++
2
Enable the support for DriverSmuConfig table on Navi1x and
Sienna_Cichlid.
Signed-off-by: Evan Quan
Change-Id: Ie510f8b06b7a4910b1574b6e9affa875805ef868
---
drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 1 +
drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c | 9 +
.../gpu
For Some ASICs, with the PMFW default settings, we may see the
power consumption reported via metrics table is "Very Erratic".
With the socket power alpha filter set as 10/100ms, we can correct
that issue.
Signed-off-by: Evan Quan
Change-Id: Ia352579e1cc7a531cb1de5c835fe5bf132d5dd20
--
Fulfill the implementations for DriverSmuConfig setting on Sienna_Cichlid.
Signed-off-by: Evan Quan
Change-Id: Ic519c8d4fcfeefdda79ba9ed01b235824d76e40f
---
.../amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 54 +++
1 file changed, 54 insertions(+)
diff --git a/drivers/gpu/drm/amd
MMHUB PG needs to be disabled for Picasso for stability reasons.
Signed-off-by: Evan Quan
Change-Id: Iea0ec757582a764ab5a000d7cc411fb814ffb19f
---
drivers/gpu/drm/amd/amdgpu/soc15.c | 5 -
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/soc15.c
b
Fulfill the implementations for DriverSmuConfig setting on Navi1x.
Signed-off-by: Evan Quan
Change-Id: I244766a893b4070dfdf171451f6338d33572ec1d
---
.../gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c | 50 +++
1 file changed, 50 insertions(+)
diff --git a/drivers/gpu/drm/amd/pm
Add a quirk in sienna_cichlid_ppt.c to fix some OEM SKU
specific stability issues.
Signed-off-by: Evan Quan
Change-Id: I172c6429c54253788dbf28f7acf877375f2bfc5b
---
.../amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 32 ++-
1 file changed, 31 insertions(+), 1 deletion(-)
diff
They are totally redundant. The checks before them can guard
they cannot be NULL.
Signed-off-by: Evan Quan
Change-Id: I9f31734f49a8093582fc321ef3d93233946006e3
---
.../gpu/drm/amd/pm/powerplay/amd_powerplay.c | 182 ++
.../amd/pm/powerplay/hwmgr/hardwaremanager.c | 42
Instead of having an interface for every reset method, we replace them
with a new interface which can support all reset methods.
Signed-off-by: Evan Quan
Change-Id: I4c8a7121dd65c2671085673dd7c13cf7e4286f3d
---
drivers/gpu/drm/amd/amdgpu/aldebaran.c| 2 +-
drivers/gpu/drm/amd/amdgpu
Instead of checking this in every instance(framework), moving that check to
amdgpu_dpm.c is more proper. And that can make code clean and tidy.
Signed-off-by: Evan Quan
Change-Id: I2f83a3b860e8aa12cc86f119011f520fbe21a301
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c | 5 +-
drivers/gpu
Make sure the interface get granted only when amdgpu_dpm enabled.
Signed-off-by: Evan Quan
Change-Id: Ia1d1123470fab89b41b24ea80dcb319570aa7438
---
drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c | 6 ++
drivers/gpu/drm/amd/pm/powerplay/hwmgr/hwmgr.c | 3 ---
2 files changed, 6
As smu->pm_enabled is a prerequisite for adev->pm.dpm_enabled.
So, with adev->pm.dpm_enabled set, it can be guarded that
smu->pm_enabled is also set. Thus the extra check for
"!smu->pm_enabled" is totally unnecessary.
Signed-off-by: Evan Quan
Change-Id: I6ff67137d447e6a
adev->pm.dpm_enabled instead of hwmgr->pm_en can better reflect
whether the dpm features are actually enabled.
Signed-off-by: Evan Quan
Change-Id: I6896dcee19bb473d26115cdcb12b6efd554b30f9
---
drivers/gpu/drm/amd/pm/legacy-dpm/kv_dpm.c| 39 +++---
drivers/gpu/drm/amd/pm/legacy-dpm/si
By setting pm_enabled as false for non pp_one_vf sriov case,
we can avoid the check for (amdgpu_sriov_vf(adev) &&
!amdgpu_sriov_is_pp_one_vf(adev)) in every routine.
Signed-off-by: Evan Quan
Change-Id: I3859529183cd26dce98c57dc87eab5273ecc949b
---
drivers/gpu/drm/amd/pm/swsmu/amdgpu_sm
Those gpu reset APIs can be granted when:
- System is up and dpm features are enabled.
- System is under resuming and dpm features are not yet enabled.
Under such scenario, the PMFW is already alive and can support
those gpu reset functionalities.
Signed-off-by: Evan Quan
Change-Id
As it can be covered by the "!adev->pm.dpm_enabled" check. As long as
"adev->pm.dpm_enabled != NULL", "pp_funcs != NULL" can be also guarded.
Signed-off-by: Evan Quan
Change-Id: Iec801f18a0069ad5fd384c4133016977fb2b67e8
---
drivers/gpu/drm/amd/pm/amdgpu_dpm.c
Since the "smu->ppt_funcs" was already well installed at early_init phase,
the checks afterwards make nonsense.
Signed-off-by: Evan Quan
Change-Id: I07a945035a87b23032e4911bba768edacbd5e65a
---
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 20 +---
drivers/gpu/drm
Drop those members which get never used.
Signed-off-by: Evan Quan
Change-Id: Iec70ad1dfe2059be26843f378588e6c894e9cae8
---
drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h
b/drivers/gpu/drm/amd/pm
Drop those interfaces which never get used.
Signed-off-by: Evan Quan
Change-Id: Ia22d395145a1003faca5ac792dca6a30ef2cae54
---
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 13 -
drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 5
drivers/gpu/drm/amd/pm/swsmu/inc/smu_v13_0.h | 4
For Cyan Skillfish and Renoir, there is no interface provided by PMFW
to retrieve the enabled features. So, we assume all features are enabled.
Fixes: 7ade3ca9cdb5 ("drm/amd/pm: correct the usage for 'supported' member of
smu_feature structure")
Signed-off-by: Evan Quan
As all those APIs are already protected either by adev->pm.mutex
or smu->message_lock.
Signed-off-by: Evan Quan
Change-Id: I1db751fba9caabc5ca1314992961d3674212f9b0
--
v1->v2:
- optimize the "!smu_table->hardcode_pptable" check(Guchun)
- add the lock protection(a
Use uint64_t instead of an array of uint32_t. This can avoid
some non-necessary intermediate uint32_t -> uint64_t conversions.
Signed-off-by: Evan Quan
Change-Id: I4e217357203a23440f058d7e25f55eaebd15c5ef
---
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 2 +-
drivers/gpu/drm/amd/pm/sw
As it has exactly the same value as the 'enabled' member and also do
the same thing.
Signed-off-by: Evan Quan
Change-Id: I07c9a5ac5290cd0d88a40ce1768d393156419b5a
---
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 1 -
drivers/gpu/drm/amd/pm/swsmu/inc/amdgpu_smu.h | 1 -
.../gpu/drm/amd/pm
As the enabled ppfeatures are just retrieved ahead. We can use
that directly instead of retrieving again and again.
Signed-off-by: Evan Quan
Change-Id: I08827437fcbbc52084418c8ca6a90cfa503306a9
---
drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 10 +-
1 file changed, 9 insertions(+), 1
related DPM features. All those are performed without driver's
notice.
Also considering driver does not actually interact with PMFW such
frequently, the benefit brought by such cache is very limited.
Signed-off-by: Evan Quan
Change-Id: I20ed58ab216e930c7a5d223be1eb99146889f2b3
---
drivers
As there is no internal cache for enabled ppfeatures now. Thus the 2nd
parameter will be not needed any more.
Signed-off-by: Evan Quan
Change-Id: I0c1811f216c55d6ddfabdc9e099dc214c21bdf2e
---
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 9 ++---
drivers/gpu/drm/amd/pm/swsmu/inc
As other dGPU asics, Renoir should use smu_cmn_get_enabled_mask() for
that job.
Signed-off-by: Evan Quan
Change-Id: I9e845ba84dd45d0826506de44ef4760fa851a516
---
drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/pm
Instead of having two which do the same thing.
Signed-off-by: Evan Quan
Change-Id: I6302c9b5abdb999c4b7c83a0d1852181208b1c1f
---
.../amd/pm/swsmu/smu11/cyan_skillfish_ppt.c | 2 +-
.../gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 6 +-
.../drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c | 6
Suppress the warning below on building htmldocs:
drivers/gpu/drm/amd/include/amd_shared.h:103: warning: Enum value
'AMD_IP_BLOCK_TYPE_NUM' not described in enum 'amd_ip_block_type'
Fixes: 6ee27ee27ba8 ("drm/amd/pm: avoid duplicate powergate/ungate setting")
Signed-off-by: Evan Quan
The supported features should be retrieved just after EnableAllDpmFeatures
message
complete. And the check(whether some dpm feature is supported) is only needed
when we
decide to enable or disable it.
Signed-off-by: Evan Quan
Change-Id: I07c9a5ac5290cd0d88a40ce1768d393156419b5a
---
drivers
Instead of having two which do the same thing.
Signed-off-by: Evan Quan
Change-Id: I6302c9b5abdb999c4b7c83a0d1852181208b1c1f
---
.../amd/pm/swsmu/smu11/cyan_skillfish_ppt.c | 2 +-
.../gpu/drm/amd/pm/swsmu/smu11/vangogh_ppt.c | 6 +-
.../drm/amd/pm/swsmu/smu13/yellow_carp_ppt.c | 6
As other dGPU asics, Renoir should use smu_cmn_get_enabled_mask() for
that job.
Signed-off-by: Evan Quan
Change-Id: I9e845ba84dd45d0826506de44ef4760fa851a516
---
drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/pm
The existing way cannot handle Beige Goby well as a different
PPTable data structure(PPTable_beige_goby_t instead of PPTable_t)
is used there.
Signed-off-by: Evan Quan
Change-Id: I02208c011e93c4d37769bd022e65e9084faa97e4
---
drivers/gpu/drm/amd/pm/swsmu/smu11/sienna_cichlid_ppt.c | 6 +++---
1
The sub-routine(amdgpu_gfx_off_ctrl) tried to obtain the lock
adev->pm.mutex which was actually hold by amdgpu_dpm_force_performance_level.
A deadlock happened then.
Signed-off-by: Evan Quan
Change-Id: Id692829381dedc6380f5464d74107d696f7abca1
---
drivers/gpu/drm/amd/pm/amdgpu_dpm.c |
related DPM features. All those are performed without driver's
notice.
Also considering driver does not actually interact with PMFW such
frequently, the benefit brought by such cache is very limited.
Signed-off-by: Evan Quan
Change-Id: I20ed58ab216e930c7a5d223be1eb99146889f2b3
---
drivers
As the enabled ppfeatures are just retrieved ahead. We can use
that directly instead of retrieving again and again.
Signed-off-by: Evan Quan
Change-Id: I08827437fcbbc52084418c8ca6a90cfa503306a9
---
drivers/gpu/drm/amd/pm/swsmu/smu_cmn.c | 10 +-
1 file changed, 9 insertions(+), 1
As there is no internal cache for enabled ppfeatures now. Thus the 2nd
parameter will be not needed any more.
Signed-off-by: Evan Quan
Change-Id: I0c1811f216c55d6ddfabdc9e099dc214c21bdf2e
---
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c | 9 ++---
drivers/gpu/drm/amd/pm/swsmu/inc
By placing those unrelated code outside of adev->pm.mutex
protections or restructuring the call flow, we can eliminate
the deadlock issue. This comes with no real logics change.
Fixes: 3712e7a49459 ("drm/amd/pm: unified lock protections in amdgpu_dpm.c")
Signed-off-by: Evan Qu
e.
Fixes: 3712e7a49459 ("drm/amd/pm: unified lock protections in amdgpu_dpm.c")
Reported-by: Paul Menzel
Reported-by: Arthur Marsh
Link: https:
//lore.kernel.org/all/9e689fea-6c69-f4b0-8dee-32c4cf7d8...@molgen.mpg.de/
BugLink: https: //gitlab.freedesktop.org/drm/amd/-/issues/1957
Signe
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
-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
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 |
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
901 - 1000 of 1244 matches
Mail list logo