mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
drm/amdgpu: check SMU NULL ptr on gfx hw init
Check SMU NULL ptr before load smu fw. Signed-off-by: Likun Gao <Likun.Gao@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
68a9fb4d29
commit
98bf250edd
1 changed files with 9 additions and 7 deletions
|
@ -6540,14 +6540,16 @@ static int gfx_v10_0_hw_init(void *handle)
|
|||
* loaded firstly, so in direct type, it has to load smc ucode
|
||||
* here before rlc.
|
||||
*/
|
||||
r = smu_load_microcode(&adev->smu);
|
||||
if (r)
|
||||
return r;
|
||||
if (adev->smu.ppt_funcs != NULL) {
|
||||
r = smu_load_microcode(&adev->smu);
|
||||
if (r)
|
||||
return r;
|
||||
|
||||
r = smu_check_fw_status(&adev->smu);
|
||||
if (r) {
|
||||
pr_err("SMC firmware status is not correct\n");
|
||||
return r;
|
||||
r = smu_check_fw_status(&adev->smu);
|
||||
if (r) {
|
||||
pr_err("SMC firmware status is not correct\n");
|
||||
return r;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue