diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2015-04-20 17:09:27 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2015-06-03 21:03:17 -0400 |
commit | a2e73f56fa6282481927ec43aa9362c03c2e2104 (patch) | |
tree | 1a9234e60c1a7fe236f7cbd6a32bf42d63425387 /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |
parent | 18da4340e651dd41d698fc54084b9139b614539b (diff) |
drm/amdgpu: Add support for CIK parts
This patch adds support for CIK parts. These parts
are also supported by radeon which is the preferred
option, so there is a config option to enable support
for CIK parts in amdgpu for testing.
Acked-by: Christian König <christian.koenig@amd.com>
Acked-by: Jammy Zhou <Jammy.Zhou@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 | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index cd4bb90fa85c..548e0843d95a 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |||
@@ -38,6 +38,9 @@ | |||
38 | #include "amdgpu_i2c.h" | 38 | #include "amdgpu_i2c.h" |
39 | #include "atom.h" | 39 | #include "atom.h" |
40 | #include "amdgpu_atombios.h" | 40 | #include "amdgpu_atombios.h" |
41 | #ifdef CONFIG_DRM_AMDGPU_CIK | ||
42 | #include "cik.h" | ||
43 | #endif | ||
41 | #include "bif/bif_4_1_d.h" | 44 | #include "bif/bif_4_1_d.h" |
42 | 45 | ||
43 | static int amdgpu_debugfs_regs_init(struct amdgpu_device *adev); | 46 | static int amdgpu_debugfs_regs_init(struct amdgpu_device *adev); |
@@ -1154,6 +1157,22 @@ static int amdgpu_early_init(struct amdgpu_device *adev) | |||
1154 | int i, r = -EINVAL; | 1157 | int i, r = -EINVAL; |
1155 | 1158 | ||
1156 | switch (adev->asic_type) { | 1159 | switch (adev->asic_type) { |
1160 | #ifdef CONFIG_DRM_AMDGPU_CIK | ||
1161 | case CHIP_BONAIRE: | ||
1162 | case CHIP_HAWAII: | ||
1163 | case CHIP_KAVERI: | ||
1164 | case CHIP_KABINI: | ||
1165 | case CHIP_MULLINS: | ||
1166 | if ((adev->asic_type == CHIP_BONAIRE) || (adev->asic_type == CHIP_HAWAII)) | ||
1167 | adev->family = AMDGPU_FAMILY_CI; | ||
1168 | else | ||
1169 | adev->family = AMDGPU_FAMILY_KV; | ||
1170 | |||
1171 | r = cik_set_ip_blocks(adev); | ||
1172 | if (r) | ||
1173 | return r; | ||
1174 | break; | ||
1175 | #endif | ||
1157 | default: | 1176 | default: |
1158 | /* FIXME: not supported yet */ | 1177 | /* FIXME: not supported yet */ |
1159 | return -EINVAL; | 1178 | return -EINVAL; |