Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7d51a8a

Browse files
Stanley.YangStanley.Yang
Stanley.Yang
authored and
Stanley.Yang
committed
drm/amdgpu/pm: add asic smu support check
It must check asic whether support smubefore call smu powerplay function, otherwiseit may cause null point on no support smu asic.Change-Id: Ib86f3d4c88317b23eb1040b9ce1c5c8dcae42488Signed-off-by: Stanley.Yang <Stanley.Yang@amd.com>Reviewed-by: Evan Quan <evan.quan@amd.com>
1 parent2dd6a04 commit7d51a8a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

‎drivers/gpu/drm/amd/pm/amdgpu_dpm.c‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -500,6 +500,9 @@ int amdgpu_dpm_send_hbm_bad_pages_num(struct amdgpu_device *adev, uint32_t size)
500500
structsmu_context*smu=adev->powerplay.pp_handle;
501501
intret=0;
502502

503+
if (!is_support_sw_smu(adev))
504+
return-EOPNOTSUPP;
505+
503506
mutex_lock(&adev->pm.mutex);
504507
ret=smu_send_hbm_bad_pages_num(smu,size);
505508
mutex_unlock(&adev->pm.mutex);
@@ -512,6 +515,9 @@ int amdgpu_dpm_send_hbm_bad_channel_flag(struct amdgpu_device *adev, uint32_t si
512515
structsmu_context*smu=adev->powerplay.pp_handle;
513516
intret=0;
514517

518+
if (!is_support_sw_smu(adev))
519+
return-EOPNOTSUPP;
520+
515521
mutex_lock(&adev->pm.mutex);
516522
ret=smu_send_hbm_bad_channel_flag(smu,size);
517523
mutex_unlock(&adev->pm.mutex);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp