Skip to content

Commit

Permalink
drm/amdgpu: disable the IP module if early_init returns -ENOENT (v2)
Browse files Browse the repository at this point in the history
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: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Alex Deucher committed Jul 16, 2015
1 parent 5c2327b commit 974e6b6
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -1207,10 +1207,15 @@ static int amdgpu_early_init(struct amdgpu_device *adev)
} else {
if (adev->ip_blocks[i].funcs->early_init) {
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;
else
adev->ip_block_enabled[i] = true;
} else {
adev->ip_block_enabled[i] = true;
}
adev->ip_block_enabled[i] = true;
}
}

Expand Down

0 comments on commit 974e6b6

Please sign in to comment.