mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/
synced 2026-04-18 06:33:43 -04:00
drm/amdgpu: update the handle ptr in early_init
update the handle ptr to amdgpu_ip_block ptr for all functions pointers on early_init. Signed-off-by: Sunil Khatri <sunil.khatri@amd.com> Reviewed-by: Christian König <christian.koenig@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
1007264254
commit
146b085ead
@@ -2611,25 +2611,25 @@ static int amdgpu_device_ip_early_init(struct amdgpu_device *adev)
|
||||
|
||||
total = true;
|
||||
for (i = 0; i < adev->num_ip_blocks; i++) {
|
||||
ip_block = &adev->ip_blocks[i];
|
||||
|
||||
if ((amdgpu_ip_block_mask & (1 << i)) == 0) {
|
||||
DRM_WARN("disabled ip block: %d <%s>\n",
|
||||
i, adev->ip_blocks[i].version->funcs->name);
|
||||
adev->ip_blocks[i].status.valid = false;
|
||||
} else {
|
||||
if (adev->ip_blocks[i].version->funcs->early_init) {
|
||||
r = adev->ip_blocks[i].version->funcs->early_init((void *)adev);
|
||||
if (r == -ENOENT) {
|
||||
adev->ip_blocks[i].status.valid = false;
|
||||
} else if (r) {
|
||||
DRM_ERROR("early_init of IP block <%s> failed %d\n",
|
||||
adev->ip_blocks[i].version->funcs->name, r);
|
||||
total = false;
|
||||
} else {
|
||||
adev->ip_blocks[i].status.valid = true;
|
||||
}
|
||||
} else if (ip_block->version->funcs->early_init) {
|
||||
r = ip_block->version->funcs->early_init(ip_block);
|
||||
if (r == -ENOENT) {
|
||||
adev->ip_blocks[i].status.valid = false;
|
||||
} else if (r) {
|
||||
DRM_ERROR("early_init of IP block <%s> failed %d\n",
|
||||
adev->ip_blocks[i].version->funcs->name, r);
|
||||
total = false;
|
||||
} else {
|
||||
adev->ip_blocks[i].status.valid = true;
|
||||
}
|
||||
} else {
|
||||
adev->ip_blocks[i].status.valid = true;
|
||||
}
|
||||
/* get the vbios after the asic_funcs are set up */
|
||||
if (adev->ip_blocks[i].version->type == AMD_IP_BLOCK_TYPE_COMMON) {
|
||||
|
||||
Reference in New Issue
Block a user