Drop hard-code value of nsTmax because we read this
value from fantable below.
Signed-off-by: Ma Jun
---
drivers/gpu/drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/process_pptables_v1_0.c
b/drivers
Check ras_manager before using it
Signed-off-by: Ma Jun
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
index 925ec65ac5ed..2bcf5c3b5d70
Hi Lijo & Kevin, thanks for review, will drop this patch
Regards,
Ma Jun
On 5/14/2024 7:13 AM, Wang, Yang(Kevin) wrote:
> [AMD Official Use Only - AMD Internal Distribution Only]
>
> -Original Message-----
> From: Ma, Jun
> Sent: Monday, May 13, 2024 4:
Check bo before using it
Signed-off-by: Ma Jun
---
drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c | 16 +++-
1 file changed, 11 insertions(+), 5 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c
b/drivers/gpu/drm/amd/amdgpu/gmc_v12_0.c
index 2b7b67916c1d..8269fd6828bf
Remove dead code in amdgpu_ras_add_mca_err_addr
Signed-off-by: Ma Jun
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 13 -
1 file changed, 13 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
index 6da02a209890..0cf67923c0fc
Check handle pointer before using it
Signed-off-by: Ma Jun
---
drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_aca.c
index 28febf33fb1b..e969a7d77b4d
Check ras_manager before using it
Signed-off-by: Ma Jun
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_ras.c
index 1dd13ed3b7b5..6da02a209890
optimize the code to avoid pass a null pointer (hwmgr->backend)
to function smu7_update_edc_leakage_table.
Signed-off-by: Ma Jun
---
.../drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c | 50 +--
1 file changed, 24 insertions(+), 26 deletions(-)
diff --git a/drivers/gpu/drm/amd
Check the pointer value to fix potential null pointer
dereference
Signed-off-by: Ma Jun
---
.../gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c| 7 +--
.../gpu/drm/amd/pm/powerplay/hwmgr/smu8_hwmgr.c| 14 --
.../gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c | 7 +--
3
Check pcurrent pointer before using it to fix
the null pointer dereference
Signed-off-by: Ma Jun
---
drivers/gpu/drm/amd/pm/powerplay/hwmgr/pp_psm.c | 12 +---
1 file changed, 9 insertions(+), 3 deletions(-)
diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/pp_psm.c
b/drivers/gpu
Drop redundant setting code for pcie.lanes. It overwrites
the value get from pptable
Signed-off-by: Ma Jun
---
drivers/gpu/drm/amd/pm/powerplay/hwmgr/processpptables.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/processpptables.c
b/drivers/gpu
On 5/10/2024 9:41 AM, Wang, Yang(Kevin) wrote:
> [AMD Official Use Only - General]
>
> Ok, I miss this patch #2.
>
> And please merge swsmu parts in patch#1 to patch#2. (patch #1 : powerplay,
> patch #2: swsmu)
Thanks, will fix this when push.
Regards,
Ma Jun
>
>
On 5/9/2024 9:01 PM, Wang, Yang(Kevin) wrote:
> [AMD Official Use Only - General]
>
> please fix similar issues in other xxx_ppt.c file together? e. g:
> navi10_ppt.c, etc
>
Fix codes for navi10,vega20, etc. are in the patch 2 of this serial.
Regards,
Ma Jun
> Bes
Check the input value for CUSTOM profile mode setting on legacy
SOCs. Otherwise it may cause out-of-bouds read error.
Signed-off-by: Ma Jun
---
drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_hwmgr.c | 2 +-
drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega20_hwmgr.c | 8 ++--
drivers/gpu/drm
Check the input value for CUSTOM profile mode setting on smu13 and
smu14. Otherwise it may cause out-of-bouds read error.
Signed-off-by: Ma Jun
---
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 5 +
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_7_ppt.c | 4
drivers/gpu/drm/amd
Fix code alignment issue
Signed-off-by: Ma Jun
Reported-by: Yang Wang
---
drivers/gpu/drm/amd/pm/amdgpu_pm.c | 4 ++--
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/gpu/drm/amd/pm
Check the fb_channel_number range to avoid the array out-of-bounds
read error
Signed-off-by: Ma Jun
---
drivers/gpu/drm/amd/amdgpu/df_v1_7.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/df_v1_7.c
b/drivers/gpu/drm/amd/amdgpu/df_v1_7.c
index 5dfab802
adjacent
memory locations"
Signed-off-by: Ma Jun
---
drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c | 8
drivers/gpu/drm/amd/pm/powerplay/hwmgr/pp_psm.c | 8
drivers/gpu/drm/amd/pm/swsmu/amdgpu_smu.c| 16
3 files changed, 16 insertions(+), 16 deleti
Check the return value of amdgpu_xcp_get_inst_details, otherwise we
may use an uninitialized variable inst_mask
Signed-off-by: Ma Jun
---
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 11 +--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu
Check the ring type value to fix the out-of-bounds
write warning
Signed-off-by: Ma Jun
Suggested-by: Christian König
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
b/drivers/gpu/drm/amd
ping ...
On 4/26/2024 5:37 PM, Ma Jun wrote:
> Check the user input and phy_id value range to fix
> "Using uninitialized value phy_id"
>
> Signed-off-by: Ma Jun
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c | 4
> 1 file changed, 4 insertions(+
Check return value of smum_send_msg_to_smc to fix
uninitialized variable varning
Signed-off-by: Ma Jun
---
.../drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c | 21 +
.../drm/amd/pm/powerplay/hwmgr/vega12_hwmgr.c | 20
.../drm/amd/pm/powerplay/hwmgr/vega20_hwmgr.c
Assign an default value to agc_btc_response in failed case
Signed-off-by: Ma Jun
---
drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c
b/drivers/gpu/drm/amd/pm
On 4/28/2024 10:18 PM, Alex Deucher wrote:
> On Sun, Apr 28, 2024 at 7:12 AM Ma Jun wrote:
>>
>> Check return value of smum_send_msg_to_smc to fix
>> uninitialized variable varning
>>
>> Signed-off-by: Ma Jun
>> ---
>> .../d
Check return value of smum_send_msg_to_smc to fix
uninitialized variable varning
Signed-off-by: Ma Jun
---
.../drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c | 21 ++-
.../drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c | 8 +--
.../drm/amd/pm/powerplay/hwmgr/vega12_hwmgr.c | 6
Assign an default value to agc_btc_response in failed case
Signed-off-by: Ma Jun
---
drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c | 9 +++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/pm/powerplay/hwmgr/vega10_hwmgr.c
b/drivers/gpu/drm/amd/pm
Check the user input and phy_id value range to fix
"Using uninitialized value phy_id"
Signed-off-by: Ma Jun
---
drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c | 4
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c
b/drivers/g
Check the return value of smum_send_msg_to_smc, otherwise
we might use an uninitialized variable "now"
Signed-off-by: Ma Jun
---
drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu10_hwmgr.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/pm
On 4/25/2024 8:39 PM, Christian König wrote:
>
>
> Am 25.04.24 um 12:00 schrieb Ma Jun:
>> Check the ring type value to fix the out-of-bounds
>> write warning
>>
>> Signed-off-by: Ma Jun
>> ---
>> drivers/gpu/drm/amd/amdgpu/amdgpu_ring.
On 4/25/2024 6:10 PM, Lazar, Lijo wrote:
>
>
> On 4/25/2024 3:30 PM, Ma Jun wrote:
>> Initialize the phy_id to 0 to fix the warning of
>> "Using uninitialized value phy_id"
>>
>> Signed-off-by: Ma Jun
>> ---
>> drivers/gpu/drm/amd/amdg
Check the ring type value to fix the out-of-bounds
write warning
Signed-off-by: Ma Jun
---
drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c | 5 +
1 file changed, 5 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_ring.c
index 06f0a6534a94
Initialize the phy_id to 0 to fix the warning of
"Using uninitialized value phy_id"
Signed-off-by: Ma Jun
---
drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c
Assign value to clock to fix the warning below:
"Using uninitialized value res. Field res.clock is uninitialized"
Signed-off-by: Ma Jun
---
drivers/gpu/drm/amd/amdgpu/amdgpu_afmt.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_afmt.c
b/drive
Initialize the phy_id to 0 to fix the warning of
"Using uninitialized value phy_id"
Signed-off-by: Ma Jun
---
drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_securedisplay.c
b/d
Initialize the interrupt timestamp for some legacy SOCs
to fix the coverity issue "Uninitialized scalar variable"
Signed-off-by: Ma Jun
Suggested-by: Christian König
---
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 8
1 file changed, 8 insertions(+)
diff --git a/drivers/g
Assign value to clock to fix the warning below:
"Using uninitialized value res. Field res.clock is uninitialized"
Signed-off-by: Ma Jun
---
drivers/gpu/drm/amd/amdgpu/amdgpu_afmt.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu
On 4/22/2024 7:25 PM, Christian König wrote:
> Am 22.04.24 um 11:49 schrieb Ma Jun:
>> Initialize the variables which were not initialized
>> to fix the coverity issue "Uninitialized scalar variable"
>
> Feel free to add my Acked-by to the first two patches, b
return 0 to avoid returning an uninitialized variable r
Signed-off-by: Ma Jun
---
drivers/gpu/drm/amd/amdgpu/aldebaran.c | 2 +-
drivers/gpu/drm/amd/amdgpu/sienna_cichlid.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/aldebaran.c
b
Initialize the variables which were not initialized
to fix the coverity issue "Uninitialized scalar variable"
Signed-off-by: Ma Jun
---
drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c | 2 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 2 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_xcp.c | 2 +-
3 fil
Use '<' instead of '<=' to fix the out-of-bounds
read error
Signed-off-by: Ma Jun
---
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_
On 4/17/2024 7:52 PM, Lazar, Lijo wrote:
>
>
> On 4/17/2024 11:23 AM, Ma Jun wrote:
>> gpu_od should be removed if it's an empty directory
>>
>> Signed-off-by: Ma Jun
>> Reported-by: Yang Wang
>> ---
>> drivers/gpu/drm/amd/pm/amdgpu
Print the od status info if it's not supported.
Signed-off-by: Ma Jun
---
drivers/gpu/drm/amd/pm/amdgpu_pm.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c
b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
index 5bc1cd4993e8..a20e03e69d38 100644
--- a/driver
gpu_od should be removed if it's an empty directory
Signed-off-by: Ma Jun
Reported-by: Yang Wang
---
drivers/gpu/drm/amd/pm/amdgpu_pm.c | 7 +++
1 file changed, 7 insertions(+)
diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c
b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
index a20e03e
ping...
Regards,
Ma Jun
On 4/3/2024 10:57 AM, Ma Jun wrote:
> refactor the code of runtime pm mode detection to support
> amdgpu_runtime_pm =2 and 1 two cases
>
> Signed-off-by: Ma Jun
> Reviewed-by: Yang Wang
> ---
> v1->v2:
> - Fix logic and output info (Lijo
refactor the code of runtime pm mode detection to support
amdgpu_runtime_pm =2 and 1 two cases
Signed-off-by: Ma Jun
Reviewed-by: Yang Wang
---
v1->v2:
- Fix logic and output info (Lijo)
- Fix code style (Kevin)
---
drivers/gpu/drm/amd/amdgpu/amdgpu.h| 1 +
drivers/gpu/drm/amd/amd
Waiting for system ready to fix the discovery initialization
failure issue. This failure usually occurs when dGPU is removed
and then rescanned via command line.
It's caused by following two errors:
[1] vram size is 0
[2] wrong binary signature
Signed-off-by: Ma Jun
---
drivers/gpu/dr
On 4/1/2024 8:24 PM, Christian König wrote:
> Am 01.04.24 um 12:18 schrieb Ma Jun:
>> Waiting for system ready to fix the discovery initialization
>> failure issue. This failure usually occurs when dGPU is
>> removed and then rescanned via command line.
>> It'
ping...
Regards,
Ma Jun
On 3/29/2024 4:28 PM, Ma Jun wrote:
> refactor the code of runtime pm mode detection to support
> amdgpu_runtime_pm =2 and 1 two cases
>
> Signed-off-by: Ma Jun
> ---
> drivers/gpu/drm/amd/amdgpu/amdgpu.h| 1 +
> drivers/gpu/drm/amd/amdgpu
Waiting for system ready to fix the discovery initialization
failure issue. This failure usually occurs when dGPU is
removed and then rescanned via command line.
It's caused by following two errors:
[1] vram size is 0
[2] wrong binary signature
Signed-off-by: Ma Jun
---
drivers/gpu/dr
refactor the code of runtime pm mode detection to support
amdgpu_runtime_pm =2 and 1 two cases
Signed-off-by: Ma Jun
---
drivers/gpu/drm/amd/amdgpu/amdgpu.h| 1 +
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 68 ++
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c| 48
Check AMDGPU_RUNPM_BAMACO intead of amdgpu_runtime_pm
when setting baco state.
Signed-off-by: Ma Jun
---
drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c | 2 +-
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 5 ++---
drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c | 2 +-
3 files changed, 4
Optimize the code to add support for BAMACO mode checking
Signed-off-by: Ma Jun
---
v1->v2:
- Fix the errors in BAMACO mode usage (Lijo)
- Drop the refactoring of runtime pm mode check
---
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 6 --
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c |
Add a new runtime pm mode AMDGPU_RUNPM_BAMACO
and related macro definition
Signed-off-by: Ma Jun
---
drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h | 4
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h
b/drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h
index
Add support for MACO flag checking.
MACO mode only works if BACO is supported.
Signed-off-by: Ma Jun
---
drivers/gpu/drm/amd/amdgpu/amdgpu.h| 4 ++--
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 +---
drivers/gpu/drm/amd/amdgpu/cik.c | 4
Use a unified and more explicit name get_bamaco_support
to replace is_baco_support and get_asic_baco_capability
Signed-off-by: Ma Jun
Suggested-by: Lijo Lazar
---
v2->v3:
- Change the function name (lijo)
---
drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c| 4 ++--
drivers/gpu/drm/
Optimize the code to add support for BAMACO mode checking
Signed-off-by: Ma Jun
---
v1->v2:
- Fix the errors in BAMACO mode usage (Lijo)
- Drop the refactoring of runtime pm mode check
---
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 6 --
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c |
Check AMDGPU_RUNPM_BAMACO intead of amdgpu_runtime_pm
when setting baco state.
Signed-off-by: Ma Jun
---
drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c | 2 +-
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 5 ++---
drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c | 2 +-
3 files changed, 4
Add support for MACO flag checking.
MACO mode only works if BACO is supported.
Signed-off-by: Ma Jun
---
drivers/gpu/drm/amd/amdgpu/amdgpu.h| 4 ++--
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 8 +---
drivers/gpu/drm/amd/amdgpu/cik.c | 4
Change the member function name of pp_hwmgr_func to
keep consistent with the function in pptable_funcs
Signed-off-by: Ma Jun
---
drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c | 4 ++--
drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_baco.c| 2 +-
drivers/gpu/drm/amd/pm/powerplay/hwmgr
Add a new runtime pm mode AMDGPU_RUNPM_BAMACO
and related macro definition
Signed-off-by: Ma Jun
---
drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h | 4
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h
b/drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h
index
Reviewed-by: Ma Jun
On 3/26/2024 5:02 PM, Yang Wang wrote:
> add a new enumeration type to identify device attribute node,
> this method is relatively more efficient compared with 'strcmp' in
> update_attr() function.
>
> Signed-off-by: Yang Wang
> ---
> dri
On 3/26/2024 5:34 PM, Lazar, Lijo wrote:
>
>
> On 3/26/2024 2:59 PM, Lazar, Lijo wrote:
>>
>>
>> On 3/25/2024 3:45 PM, Ma Jun wrote:
>>> Optimize the code to add support for BAMACO mode checking
>>>
>>> Signed-off-by: Ma Jun
>
On 3/26/2024 5:29 PM, Lazar, Lijo wrote:
>
>
> On 3/25/2024 3:45 PM, Ma Jun wrote:
>> Optimize the code to add support for BAMACO mode checking
>>
>> Signed-off-by: Ma Jun
>> ---
>> drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 +-
>>
Use struct binary_header directly as parameter of
amdgpu_discovery_verify_binary_signature()
Signed-off-by: Ma Jun
---
drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c | 11 ---
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_discovery.c
b
Add support for MACO flag checking.
MACO mode only works if BACO is supported.
Signed-off-by: Ma Jun
---
drivers/gpu/drm/amd/amdgpu/amdgpu.h| 4 ++--
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 2 +-
drivers/gpu/drm/amd/amdgpu/cik.c | 4
Check AMDGPU_RUNPM_BAMACO intead of amdgpu_runtime_pm
when setting baco state.
Signed-off-by: Ma Jun
---
drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c | 2 +-
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0.c | 5 ++---
drivers/gpu/drm/amd/pm/swsmu/smu14/smu_v14_0.c | 2 +-
3 files changed, 4
Optimize the code to add support for BAMACO mode checking
Signed-off-by: Ma Jun
---
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 4 +-
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 74 +++--
drivers/gpu/drm/amd/amdgpu/amdgpu_psp.c | 4 +-
3 files changed, 50 insertions(+), 32
Change the member function name of pp_hwmgr_func to
keep consistent with the function in pptable_funcs
Signed-off-by: Ma Jun
---
drivers/gpu/drm/amd/pm/powerplay/amd_powerplay.c | 4 ++--
drivers/gpu/drm/amd/pm/powerplay/hwmgr/smu7_baco.c| 2 +-
drivers/gpu/drm/amd/pm/powerplay/hwmgr
Add a new runtime pm mode AMDGPU_RUNPM_BAMACO
and related macro definition
Signed-off-by: Ma Jun
---
drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h | 4
1 file changed, 4 insertions(+)
diff --git a/drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h
b/drivers/gpu/drm/amd/pm/inc/amdgpu_dpm.h
index
On 3/20/2024 9:38 PM, Lazar, Lijo wrote:
>
>
> On 3/20/2024 6:54 PM, Alex Deucher wrote:
>> On Wed, Mar 20, 2024 at 6:17 AM Ma Jun wrote:
>>>
>>> Because of the logic error, Arcturus and vega20 currently
>>> use the AMDGPU_RUNPM_NONE for runtime pm
On 3/20/2024 9:24 PM, Alex Deucher wrote:
> On Wed, Mar 20, 2024 at 6:17 AM Ma Jun wrote:
>>
>> Because of the logic error, Arcturus and vega20 currently
>> use the AMDGPU_RUNPM_NONE for runtime pm even though they
>> support BACO. So, the code is optimized to fix t
Because of the logic error, Arcturus and vega20 currently
use the AMDGPU_RUNPM_NONE for runtime pm even though they
support BACO. So, the code is optimized to fix this error.
Signed-off-by: Ma Jun
---
drivers/gpu/drm/amd/amdgpu/amdgpu_kms.c | 56 -
1 file changed, 27
OD is not supported on Arcturus, so the OD table
should not be used.
Signed-off-by: Ma Jun
---
.../gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c | 33 +++
1 file changed, 5 insertions(+), 28 deletions(-)
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c
b/drivers/gpu
Thanks, I will fix it when push to the next branch
Regards,
Ma Jun
On 3/19/2024 4:22 PM, Christian König wrote:
> Am 19.03.24 um 09:07 schrieb Ma Jun:
>> This patch causes the following iounmap erorr and calltrace
>> iounmap: bad address d0b3631f
>
>&g
This patch causes the following iounmap erorr and calltrace
iounmap: bad address d0b3631f
So just revert it and amdgpu_device_fini_sw() will cleanup the
rmmio mapping.
This reverts commit 923f7a82d2e12a99744a940954f3829ab18a9dc7.
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 16 ++
Hi Christian,
On 3/15/2024 3:16 PM, Christian König wrote:
> Am 15.03.24 um 06:17 schrieb Ma Jun:
>> Setting the rmmio pointer to NULL to fix the following
>> iounmap error and calltrace.
>> iounmap: bad address d0b3631f
>>
>> Fixes: 923f7a82d2e1 ("
Setting the rmmio pointer to NULL to fix the following
iounmap error and calltrace.
iounmap: bad address d0b3631f
Fixes: 923f7a82d2e1 ("drm/amd/amdgpu: Fix potential ioremap() memory leaks in
amdgpu_device_init()")
Signed-off-by: Ma Jun
---
drivers/gpu/drm/amd/amdgpu/amdgp
Check the validity of overdriver power limit before using it.
Signed-off-by: Ma Jun
Suggested-by: Lazar Lijo
Suggested-by: Alex Deucher
---
.../gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c | 11 +
.../gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c | 9
.../amd/pm/swsmu/smu11
Because powerplay_table initialization is skipped under
sriov case, We check and set default lower and upper OD
value if powerplay_table is NULL.
Fixes: 7968e9748fbb ("drm/amdgpu/pm: Fix the power1_min_cap value")
Signed-off-by: Ma Jun
Reported-by: Yin Zhenguo
Suggested-by:
On 3/12/2024 8:57 PM, Lazar, Lijo wrote:
>
>
> On 3/12/2024 4:29 PM, Ma Jun wrote:
>> Sometimes user may want to enable the od feature
>> by setting ppfeaturemask when loading amdgpu driver.
>> However,not all Asics support this feature.
>> So we need to rest
Sometimes user may want to enable the od feature
by setting ppfeaturemask when loading amdgpu driver.
However,not all Asics support this feature.
So we need to restore the ppfeature value and print
a warning info.
Signed-off-by: Ma Jun
---
drivers/gpu/drm/amd/pm/amdgpu_dpm.c | 15
On 3/8/2024 10:00 PM, Lazar, Lijo wrote:
>
>
> On 3/8/2024 3:21 PM, Ma Jun wrote:
>> Because powerplay_table initialization is skipped under
>> sriov case, We set default lower and upper OD value to
>> avoid NULL pointer issue.
>>
>> Also, It's nece
m: Fix the power1_min_cap value")
Signed-off-by: Ma Jun
Reported-by: Yin Zhenguo
---
v1->v2: Check the od capability (Alex, Lijo)
---
.../gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c | 18 ++-
.../gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c | 18 ++-
.../amd/pm/swsmu/smu11/sienna_ci
Hi Lijo,
On 3/6/2024 7:16 PM, Lazar, Lijo wrote:
>
>
> On 3/6/2024 3:56 PM, Ma Jun wrote:
>> Because powerplay_table initialization is skipped under
>> sriov case, We set default lower and upper OD value to
>> avoid NULL pointer issue.
>
> pp_od_clk_voltage is
Because powerplay_table initialization is skipped under
sriov case, We set default lower and upper OD value to
avoid NULL pointer issue.
Fixes: 7968e9748fbb ("drm/amdgpu/pm: Fix the power1_min_cap value")
Signed-off-by: Ma Jun
Reported-by: Yin Zhenguo
---
.../gpu/drm/amd/pm/s
On 3/1/2024 5:41 PM, Lazar, Lijo wrote:
>
>
> On 3/1/2024 1:15 PM, Ma Jun wrote:
>> Fix the pwm_mode value error which used for
>> pwm1_enable setting
>>
>> Signed-off-by: Ma Jun
>> ---
>> drivers/gpu/drm/amd/pm/amdgpu_pm.c | 12 +++-
>
Fix the pwm_mode value error which used for
pwm1_enable setting
Signed-off-by: Ma Jun
---
drivers/gpu/drm/amd/pm/amdgpu_pm.c | 12 +++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/pm/amdgpu_pm.c
b/drivers/gpu/drm/amd/pm/amdgpu_pm.c
index
Hi Lijo,
On 2/29/2024 3:33 PM, Lazar, Lijo wrote:
>
>
> On 2/29/2024 11:49 AM, Ma Jun wrote:
>> Check return value of amdgpu_device_baco_enter/exit and print
>> warning message because these errors may cause runtime resume failure
>>
>> Signed-off-by: Ma Ju
Check return value of amdgpu_device_baco_enter/exit and print
warning message because these errors may cause runtime resume failure
Signed-off-by: Ma Jun
---
drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 29 --
1 file changed, 22 insertions(+), 7 deletions(-)
diff --git a
On 2/28/2024 7:58 PM, Lazar, Lijo wrote:
>
>
> On 2/28/2024 5:14 PM, Ma Jun wrote:
>> Check return value of amdgpu_device_baco_enter/exit and print
>> warning message because these errors may cause runtime resume failure
>>
>> Signed-off-by: Ma Jun
>
Because the rpm_mode flag is already set when the driver
is initialized, we use it directly for runtime suspend/resume
instead of checking it again
Signed-off-by: Ma Jun
---
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 24
1 file changed, 12 insertions(+), 12 deletions
Check return value of amdgpu_device_baco_enter/exit and print
warning message because these errors may cause runtime resume failure
Signed-off-by: Ma Jun
---
drivers/gpu/drm/amd/amdgpu/amdgpu_drv.c | 8 ++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/amd
It's unreasonable to use 0 as the power1_min_cap when
OD is disabled. So, use the same lower limit as the value
used when OD is enabled.
Signed-off-by: Ma Jun
---
drivers/gpu/drm/amd/pm/swsmu/smu11/arcturus_ppt.c | 9 -
drivers/gpu/drm/amd/pm/swsmu/smu11/navi10_ppt.c
Don't set power state flag when system enter runtime suspend,
or it may cause runtime resume failure issue.
Signed-off-by: Ma Jun
---
drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_acpi.c
b/drivers/gpu/dr
Drop redundant parameters in function amdgpu_gfx_kiq_init_ring
to simplify the code
Signed-off-by: Ma Jun
---
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.c | 6 +++---
drivers/gpu/drm/amd/amdgpu/amdgpu_gfx.h | 4 +---
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 5 ++---
drivers/gpu/drm/amd/amdgpu
Use existing inline function for IP version check.
Signed-off-by: Ma Jun
---
drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/pm/swsmu/smu13/smu_v13_0_0_ppt.c
b/drivers/gpu/drm/amd/pm/swsmu/smu13
Reviewed-by: Ma Jun
Regards,
Ma Jun
On 1/29/2024 11:33 PM, Deucher, Alexander wrote:
> [AMD Official Use Only - General]
>
>
Remove redundant code to fix the logic error and potential
null pointer dereference if gfx.mec2_fw is null.
Signed-off-by: Ma Jun
---
drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c | 2 --
1 file changed, 2 deletions(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/gfx_v10_0.c
b/drivers/gpu/drm/amd/amdgpu
Replace the hard-coded numbers with macro definition
Signed-off-by: Ma Jun
---
v3:
- Add new SMU_IH_INTERRUPT_* macros for smu, keeping the original
macro definitions in sync with pmfw (kevin)
---
drivers/gpu/drm/amd/pm/swsmu/smu11/smu_v11_0.c | 10 +-
drivers/gpu/drm/amd/pm/swsmu/smu13
fw.
>
In general, we do need to follow the above rules.
But smu_v13_0_irq_process() is a common function used by other asics.
Defining these macros in the corresponding smu driver_if.h will cause the
compile error.
Regards,
Ma Jun
> Best Regards,
> Kevin
>
> -Original Message-
1 - 100 of 281 matches
Mail list logo