Lines Matching +full:revision +full:- +full:id
41 ((struct amdgpu_cgs_device *)cgs_device)->adev
142 if (adev->asic_type >= CHIP_TOPAZ) in fw_type_convert()
167 fw_version = adev->sdma.instance[0].fw_version; in amdgpu_get_firmware_version()
170 fw_version = adev->sdma.instance[1].fw_version; in amdgpu_get_firmware_version()
173 fw_version = adev->gfx.ce_fw_version; in amdgpu_get_firmware_version()
176 fw_version = adev->gfx.pfp_fw_version; in amdgpu_get_firmware_version()
179 fw_version = adev->gfx.me_fw_version; in amdgpu_get_firmware_version()
182 fw_version = adev->gfx.mec_fw_version; in amdgpu_get_firmware_version()
185 fw_version = adev->gfx.mec_fw_version; in amdgpu_get_firmware_version()
188 fw_version = adev->gfx.mec_fw_version; in amdgpu_get_firmware_version()
191 fw_version = adev->gfx.rlc_fw_version; in amdgpu_get_firmware_version()
212 enum AMDGPU_UCODE_ID id; in amdgpu_cgs_get_firmware_info() local
215 id = fw_type_convert(cgs_device, type); in amdgpu_cgs_get_firmware_info()
216 if (id >= AMDGPU_UCODE_ID_MAXIMUM) in amdgpu_cgs_get_firmware_info()
217 return -EINVAL; in amdgpu_cgs_get_firmware_info()
219 ucode = &adev->firmware.ucode[id]; in amdgpu_cgs_get_firmware_info()
220 if (ucode->fw == NULL) in amdgpu_cgs_get_firmware_info()
221 return -EINVAL; in amdgpu_cgs_get_firmware_info()
223 gpu_addr = ucode->mc_addr; in amdgpu_cgs_get_firmware_info()
224 header = (const struct gfx_firmware_header_v1_0 *)ucode->fw->data; in amdgpu_cgs_get_firmware_info()
225 data_size = le32_to_cpu(header->header.ucode_size_bytes); in amdgpu_cgs_get_firmware_info()
229 gpu_addr += ALIGN(le32_to_cpu(header->header.ucode_size_bytes), PAGE_SIZE); in amdgpu_cgs_get_firmware_info()
230 data_size = le32_to_cpu(header->jt_size) << 2; in amdgpu_cgs_get_firmware_info()
233 info->kptr = ucode->kaddr; in amdgpu_cgs_get_firmware_info()
234 info->image_size = data_size; in amdgpu_cgs_get_firmware_info()
235 info->mc_addr = gpu_addr; in amdgpu_cgs_get_firmware_info()
236 info->version = (uint16_t)le32_to_cpu(header->header.ucode_version); in amdgpu_cgs_get_firmware_info()
239 info->image_size = le32_to_cpu(header->jt_offset) << 2; in amdgpu_cgs_get_firmware_info()
241 info->fw_version = amdgpu_get_firmware_version(cgs_device, type); in amdgpu_cgs_get_firmware_info()
242 info->feature_version = (uint16_t)le32_to_cpu(header->ucode_feature_version); in amdgpu_cgs_get_firmware_info()
253 if (!adev->pm.fw) { in amdgpu_cgs_get_firmware_info()
254 switch (adev->asic_type) { in amdgpu_cgs_get_firmware_info()
259 if ((adev->pdev->revision == 0x81) && in amdgpu_cgs_get_firmware_info()
260 ((adev->pdev->device == 0x6810) || in amdgpu_cgs_get_firmware_info()
261 (adev->pdev->device == 0x6811))) { in amdgpu_cgs_get_firmware_info()
262 info->is_kicker = true; in amdgpu_cgs_get_firmware_info()
269 if (((adev->pdev->device == 0x6820) && in amdgpu_cgs_get_firmware_info()
270 ((adev->pdev->revision == 0x81) || in amdgpu_cgs_get_firmware_info()
271 (adev->pdev->revision == 0x83))) || in amdgpu_cgs_get_firmware_info()
272 ((adev->pdev->device == 0x6821) && in amdgpu_cgs_get_firmware_info()
273 ((adev->pdev->revision == 0x83) || in amdgpu_cgs_get_firmware_info()
274 (adev->pdev->revision == 0x87))) || in amdgpu_cgs_get_firmware_info()
275 ((adev->pdev->revision == 0x87) && in amdgpu_cgs_get_firmware_info()
276 ((adev->pdev->device == 0x6823) || in amdgpu_cgs_get_firmware_info()
277 (adev->pdev->device == 0x682b)))) { in amdgpu_cgs_get_firmware_info()
278 info->is_kicker = true; in amdgpu_cgs_get_firmware_info()
285 if (((adev->pdev->revision == 0x81) && in amdgpu_cgs_get_firmware_info()
286 ((adev->pdev->device == 0x6600) || in amdgpu_cgs_get_firmware_info()
287 (adev->pdev->device == 0x6604) || in amdgpu_cgs_get_firmware_info()
288 (adev->pdev->device == 0x6605) || in amdgpu_cgs_get_firmware_info()
289 (adev->pdev->device == 0x6610))) || in amdgpu_cgs_get_firmware_info()
290 ((adev->pdev->revision == 0x83) && in amdgpu_cgs_get_firmware_info()
291 (adev->pdev->device == 0x6610))) { in amdgpu_cgs_get_firmware_info()
292 info->is_kicker = true; in amdgpu_cgs_get_firmware_info()
299 if (((adev->pdev->revision == 0x81) && in amdgpu_cgs_get_firmware_info()
300 (adev->pdev->device == 0x6660)) || in amdgpu_cgs_get_firmware_info()
301 ((adev->pdev->revision == 0x83) && in amdgpu_cgs_get_firmware_info()
302 ((adev->pdev->device == 0x6660) || in amdgpu_cgs_get_firmware_info()
303 (adev->pdev->device == 0x6663) || in amdgpu_cgs_get_firmware_info()
304 (adev->pdev->device == 0x6665) || in amdgpu_cgs_get_firmware_info()
305 (adev->pdev->device == 0x6667)))) { in amdgpu_cgs_get_firmware_info()
306 info->is_kicker = true; in amdgpu_cgs_get_firmware_info()
308 } else if ((adev->pdev->revision == 0xc3) && in amdgpu_cgs_get_firmware_info()
309 (adev->pdev->device == 0x6665)) { in amdgpu_cgs_get_firmware_info()
310 info->is_kicker = true; in amdgpu_cgs_get_firmware_info()
317 if ((adev->pdev->revision == 0x80) || in amdgpu_cgs_get_firmware_info()
318 (adev->pdev->revision == 0x81) || in amdgpu_cgs_get_firmware_info()
319 (adev->pdev->device == 0x665f)) { in amdgpu_cgs_get_firmware_info()
320 info->is_kicker = true; in amdgpu_cgs_get_firmware_info()
327 if (adev->pdev->revision == 0x80) { in amdgpu_cgs_get_firmware_info()
328 info->is_kicker = true; in amdgpu_cgs_get_firmware_info()
335 if (((adev->pdev->device == 0x6900) && (adev->pdev->revision == 0x81)) || in amdgpu_cgs_get_firmware_info()
336 ((adev->pdev->device == 0x6900) && (adev->pdev->revision == 0x83)) || in amdgpu_cgs_get_firmware_info()
337 ((adev->pdev->device == 0x6907) && (adev->pdev->revision == 0x87)) || in amdgpu_cgs_get_firmware_info()
338 ((adev->pdev->device == 0x6900) && (adev->pdev->revision == 0xD1)) || in amdgpu_cgs_get_firmware_info()
339 ((adev->pdev->device == 0x6900) && (adev->pdev->revision == 0xD3))) { in amdgpu_cgs_get_firmware_info()
340 info->is_kicker = true; in amdgpu_cgs_get_firmware_info()
346 if (((adev->pdev->device == 0x6939) && (adev->pdev->revision == 0xf1)) || in amdgpu_cgs_get_firmware_info()
347 ((adev->pdev->device == 0x6938) && (adev->pdev->revision == 0xf1))) { in amdgpu_cgs_get_firmware_info()
348 info->is_kicker = true; in amdgpu_cgs_get_firmware_info()
358 if (ASICID_IS_P21(adev->pdev->device, adev->pdev->revision)) { in amdgpu_cgs_get_firmware_info()
359 info->is_kicker = true; in amdgpu_cgs_get_firmware_info()
361 } else if (ASICID_IS_P31(adev->pdev->device, adev->pdev->revision)) { in amdgpu_cgs_get_firmware_info()
362 info->is_kicker = true; in amdgpu_cgs_get_firmware_info()
373 if (ASICID_IS_P20(adev->pdev->device, adev->pdev->revision)) { in amdgpu_cgs_get_firmware_info()
374 info->is_kicker = true; in amdgpu_cgs_get_firmware_info()
376 } else if (ASICID_IS_P30(adev->pdev->device, adev->pdev->revision)) { in amdgpu_cgs_get_firmware_info()
377 info->is_kicker = true; in amdgpu_cgs_get_firmware_info()
387 if (ASICID_IS_P23(adev->pdev->device, adev->pdev->revision)) { in amdgpu_cgs_get_firmware_info()
388 info->is_kicker = true; in amdgpu_cgs_get_firmware_info()
398 if ((adev->pdev->device == 0x687f) && in amdgpu_cgs_get_firmware_info()
399 ((adev->pdev->revision == 0xc0) || in amdgpu_cgs_get_firmware_info()
400 (adev->pdev->revision == 0xc1) || in amdgpu_cgs_get_firmware_info()
401 (adev->pdev->revision == 0xc3))) in amdgpu_cgs_get_firmware_info()
414 return -EINVAL; in amdgpu_cgs_get_firmware_info()
417 err = amdgpu_ucode_request(adev, &adev->pm.fw, "%s", fw_name); in amdgpu_cgs_get_firmware_info()
420 amdgpu_ucode_release(&adev->pm.fw); in amdgpu_cgs_get_firmware_info()
424 if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) { in amdgpu_cgs_get_firmware_info()
425 ucode = &adev->firmware.ucode[AMDGPU_UCODE_ID_SMC]; in amdgpu_cgs_get_firmware_info()
426 ucode->ucode_id = AMDGPU_UCODE_ID_SMC; in amdgpu_cgs_get_firmware_info()
427 ucode->fw = adev->pm.fw; in amdgpu_cgs_get_firmware_info()
428 header = (const struct common_firmware_header *)ucode->fw->data; in amdgpu_cgs_get_firmware_info()
429 adev->firmware.fw_size += in amdgpu_cgs_get_firmware_info()
430 ALIGN(le32_to_cpu(header->ucode_size_bytes), PAGE_SIZE); in amdgpu_cgs_get_firmware_info()
434 hdr = (const struct smc_firmware_header_v1_0 *) adev->pm.fw->data; in amdgpu_cgs_get_firmware_info()
435 amdgpu_ucode_print_smc_hdr(&hdr->header); in amdgpu_cgs_get_firmware_info()
436 adev->pm.fw_version = le32_to_cpu(hdr->header.ucode_version); in amdgpu_cgs_get_firmware_info()
437 ucode_size = le32_to_cpu(hdr->header.ucode_size_bytes); in amdgpu_cgs_get_firmware_info()
438 ucode_start_address = le32_to_cpu(hdr->ucode_start_addr); in amdgpu_cgs_get_firmware_info()
439 src = (const uint8_t *)(adev->pm.fw->data + in amdgpu_cgs_get_firmware_info()
440 le32_to_cpu(hdr->header.ucode_array_offset_bytes)); in amdgpu_cgs_get_firmware_info()
442 info->version = adev->pm.fw_version; in amdgpu_cgs_get_firmware_info()
443 info->image_size = ucode_size; in amdgpu_cgs_get_firmware_info()
444 info->ucode_start_address = ucode_start_address; in amdgpu_cgs_get_firmware_info()
445 info->kptr = (void *)src; in amdgpu_cgs_get_firmware_info()
468 cgs_device->base.ops = &amdgpu_cgs_ops; in amdgpu_cgs_create_device()
469 cgs_device->adev = adev; in amdgpu_cgs_create_device()