Commit 974e6b64 authored by Alex Deucher's avatar Alex Deucher

drm/amdgpu: disable the IP module if early_init returns -ENOENT (v2)

If we run into a part with a harvest configuration where the entire
IP block is unusable, just disable the IP block.

v2: fix logic as noted by Christian
Reviewed-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 5c2327be
...@@ -1207,10 +1207,15 @@ static int amdgpu_early_init(struct amdgpu_device *adev) ...@@ -1207,10 +1207,15 @@ static int amdgpu_early_init(struct amdgpu_device *adev)
} else { } else {
if (adev->ip_blocks[i].funcs->early_init) { if (adev->ip_blocks[i].funcs->early_init) {
r = adev->ip_blocks[i].funcs->early_init((void *)adev); r = adev->ip_blocks[i].funcs->early_init((void *)adev);
if (r) if (r == -ENOENT)
adev->ip_block_enabled[i] = false;
else if (r)
return r; return r;
} else
adev->ip_block_enabled[i] = true; adev->ip_block_enabled[i] = true;
} else {
adev->ip_block_enabled[i] = true;
}
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment