diff options
author | Alex Deucher <alexander.deucher@amd.com> | 2012-07-31 12:57:45 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2013-05-20 12:09:36 -0400 |
commit | c04c00b4c74aab251ce4fd4757c955cc31ecc50d (patch) | |
tree | 5e20920794d27124c384791873a88f1aa17f4f6b /drivers/gpu/drm/radeon | |
parent | 5153550ad7e1d8e7344aded830258d5be7292989 (diff) |
drm/radeon: fill in ucode loading support for Hainan
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Diffstat (limited to 'drivers/gpu/drm/radeon')
-rw-r--r-- | drivers/gpu/drm/radeon/si.c | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/drivers/gpu/drm/radeon/si.c b/drivers/gpu/drm/radeon/si.c index 14472cca75ba..2e0a08617f4a 100644 --- a/drivers/gpu/drm/radeon/si.c +++ b/drivers/gpu/drm/radeon/si.c | |||
@@ -60,6 +60,11 @@ MODULE_FIRMWARE("radeon/OLAND_me.bin"); | |||
60 | MODULE_FIRMWARE("radeon/OLAND_ce.bin"); | 60 | MODULE_FIRMWARE("radeon/OLAND_ce.bin"); |
61 | MODULE_FIRMWARE("radeon/OLAND_mc.bin"); | 61 | MODULE_FIRMWARE("radeon/OLAND_mc.bin"); |
62 | MODULE_FIRMWARE("radeon/OLAND_rlc.bin"); | 62 | MODULE_FIRMWARE("radeon/OLAND_rlc.bin"); |
63 | MODULE_FIRMWARE("radeon/HAINAN_pfp.bin"); | ||
64 | MODULE_FIRMWARE("radeon/HAINAN_me.bin"); | ||
65 | MODULE_FIRMWARE("radeon/HAINAN_ce.bin"); | ||
66 | MODULE_FIRMWARE("radeon/HAINAN_mc.bin"); | ||
67 | MODULE_FIRMWARE("radeon/HAINAN_rlc.bin"); | ||
63 | 68 | ||
64 | extern int r600_ih_ring_alloc(struct radeon_device *rdev); | 69 | extern int r600_ih_ring_alloc(struct radeon_device *rdev); |
65 | extern void r600_ih_ring_fini(struct radeon_device *rdev); | 70 | extern void r600_ih_ring_fini(struct radeon_device *rdev); |
@@ -1062,6 +1067,45 @@ static const u32 oland_io_mc_regs[TAHITI_IO_MC_REGS_SIZE][2] = { | |||
1062 | {0x0000009f, 0x00a17730} | 1067 | {0x0000009f, 0x00a17730} |
1063 | }; | 1068 | }; |
1064 | 1069 | ||
1070 | static const u32 hainan_io_mc_regs[TAHITI_IO_MC_REGS_SIZE][2] = { | ||
1071 | {0x0000006f, 0x03044000}, | ||
1072 | {0x00000070, 0x0480c018}, | ||
1073 | {0x00000071, 0x00000040}, | ||
1074 | {0x00000072, 0x01000000}, | ||
1075 | {0x00000074, 0x000000ff}, | ||
1076 | {0x00000075, 0x00143400}, | ||
1077 | {0x00000076, 0x08ec0800}, | ||
1078 | {0x00000077, 0x040000cc}, | ||
1079 | {0x00000079, 0x00000000}, | ||
1080 | {0x0000007a, 0x21000409}, | ||
1081 | {0x0000007c, 0x00000000}, | ||
1082 | {0x0000007d, 0xe8000000}, | ||
1083 | {0x0000007e, 0x044408a8}, | ||
1084 | {0x0000007f, 0x00000003}, | ||
1085 | {0x00000080, 0x00000000}, | ||
1086 | {0x00000081, 0x01000000}, | ||
1087 | {0x00000082, 0x02000000}, | ||
1088 | {0x00000083, 0x00000000}, | ||
1089 | {0x00000084, 0xe3f3e4f4}, | ||
1090 | {0x00000085, 0x00052024}, | ||
1091 | {0x00000087, 0x00000000}, | ||
1092 | {0x00000088, 0x66036603}, | ||
1093 | {0x00000089, 0x01000000}, | ||
1094 | {0x0000008b, 0x1c0a0000}, | ||
1095 | {0x0000008c, 0xff010000}, | ||
1096 | {0x0000008e, 0xffffefff}, | ||
1097 | {0x0000008f, 0xfff3efff}, | ||
1098 | {0x00000090, 0xfff3efbf}, | ||
1099 | {0x00000094, 0x00101101}, | ||
1100 | {0x00000095, 0x00000fff}, | ||
1101 | {0x00000096, 0x00116fff}, | ||
1102 | {0x00000097, 0x60010000}, | ||
1103 | {0x00000098, 0x10010000}, | ||
1104 | {0x00000099, 0x00006000}, | ||
1105 | {0x0000009a, 0x00001000}, | ||
1106 | {0x0000009f, 0x00a07730} | ||
1107 | }; | ||
1108 | |||
1065 | /* ucode loading */ | 1109 | /* ucode loading */ |
1066 | static int si_mc_load_microcode(struct radeon_device *rdev) | 1110 | static int si_mc_load_microcode(struct radeon_device *rdev) |
1067 | { | 1111 | { |
@@ -1095,6 +1139,11 @@ static int si_mc_load_microcode(struct radeon_device *rdev) | |||
1095 | ucode_size = OLAND_MC_UCODE_SIZE; | 1139 | ucode_size = OLAND_MC_UCODE_SIZE; |
1096 | regs_size = TAHITI_IO_MC_REGS_SIZE; | 1140 | regs_size = TAHITI_IO_MC_REGS_SIZE; |
1097 | break; | 1141 | break; |
1142 | case CHIP_HAINAN: | ||
1143 | io_mc_regs = (u32 *)&hainan_io_mc_regs; | ||
1144 | ucode_size = OLAND_MC_UCODE_SIZE; | ||
1145 | regs_size = TAHITI_IO_MC_REGS_SIZE; | ||
1146 | break; | ||
1098 | } | 1147 | } |
1099 | 1148 | ||
1100 | running = RREG32(MC_SEQ_SUP_CNTL) & RUN_MASK; | 1149 | running = RREG32(MC_SEQ_SUP_CNTL) & RUN_MASK; |
@@ -1198,6 +1247,15 @@ static int si_init_microcode(struct radeon_device *rdev) | |||
1198 | rlc_req_size = SI_RLC_UCODE_SIZE * 4; | 1247 | rlc_req_size = SI_RLC_UCODE_SIZE * 4; |
1199 | mc_req_size = OLAND_MC_UCODE_SIZE * 4; | 1248 | mc_req_size = OLAND_MC_UCODE_SIZE * 4; |
1200 | break; | 1249 | break; |
1250 | case CHIP_HAINAN: | ||
1251 | chip_name = "HAINAN"; | ||
1252 | rlc_chip_name = "HAINAN"; | ||
1253 | pfp_req_size = SI_PFP_UCODE_SIZE * 4; | ||
1254 | me_req_size = SI_PM4_UCODE_SIZE * 4; | ||
1255 | ce_req_size = SI_CE_UCODE_SIZE * 4; | ||
1256 | rlc_req_size = SI_RLC_UCODE_SIZE * 4; | ||
1257 | mc_req_size = OLAND_MC_UCODE_SIZE * 4; | ||
1258 | break; | ||
1201 | default: BUG(); | 1259 | default: BUG(); |
1202 | } | 1260 | } |
1203 | 1261 | ||