diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2015-07-10 13:59:44 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-07-16 12:39:39 -0400 |
commit | 974e6b641f1428ee14486da277a92bdf9bd04a78 (patch) | |
tree | 42adabcd169c394205acfc7beafb5c2a5391a386 /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |
parent | 5c2327beed49efa3198b8468e78b1182eb0b764b (diff) |
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: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index ba46be361c9b..d79009b65867 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |||
@@ -1207,10 +1207,15 @@ static int amdgpu_early_init(struct amdgpu_device *adev) | |||
1207 | } else { | 1207 | } else { |
1208 | if (adev->ip_blocks[i].funcs->early_init) { | 1208 | if (adev->ip_blocks[i].funcs->early_init) { |
1209 | r = adev->ip_blocks[i].funcs->early_init((void *)adev); | 1209 | r = adev->ip_blocks[i].funcs->early_init((void *)adev); |
1210 | if (r) | 1210 | if (r == -ENOENT) |
1211 | adev->ip_block_enabled[i] = false; | ||
1212 | else if (r) | ||
1211 | return r; | 1213 | return r; |
1214 | else | ||
1215 | adev->ip_block_enabled[i] = true; | ||
1216 | } else { | ||
1217 | adev->ip_block_enabled[i] = true; | ||
1212 | } | 1218 | } |
1213 | adev->ip_block_enabled[i] = true; | ||
1214 | } | 1219 | } |
1215 | } | 1220 | } |
1216 | 1221 | ||