Lines Matching refs:adev
36 struct amdgpu_device *adev; member
40 struct amdgpu_device *adev = \
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()
216 ucode = &adev->firmware.ucode[id]; in amdgpu_cgs_get_firmware_info()
250 if (!adev->pm.fw) { in amdgpu_cgs_get_firmware_info()
251 switch (adev->asic_type) { in amdgpu_cgs_get_firmware_info()
256 if ((adev->pdev->revision == 0x81) && in amdgpu_cgs_get_firmware_info()
257 ((adev->pdev->device == 0x6810) || in amdgpu_cgs_get_firmware_info()
258 (adev->pdev->device == 0x6811))) { in amdgpu_cgs_get_firmware_info()
266 if (((adev->pdev->device == 0x6820) && in amdgpu_cgs_get_firmware_info()
267 ((adev->pdev->revision == 0x81) || in amdgpu_cgs_get_firmware_info()
268 (adev->pdev->revision == 0x83))) || in amdgpu_cgs_get_firmware_info()
269 ((adev->pdev->device == 0x6821) && in amdgpu_cgs_get_firmware_info()
270 ((adev->pdev->revision == 0x83) || in amdgpu_cgs_get_firmware_info()
271 (adev->pdev->revision == 0x87))) || in amdgpu_cgs_get_firmware_info()
272 ((adev->pdev->revision == 0x87) && in amdgpu_cgs_get_firmware_info()
273 ((adev->pdev->device == 0x6823) || in amdgpu_cgs_get_firmware_info()
274 (adev->pdev->device == 0x682b)))) { in amdgpu_cgs_get_firmware_info()
282 if (((adev->pdev->revision == 0x81) && in amdgpu_cgs_get_firmware_info()
283 ((adev->pdev->device == 0x6600) || in amdgpu_cgs_get_firmware_info()
284 (adev->pdev->device == 0x6604) || in amdgpu_cgs_get_firmware_info()
285 (adev->pdev->device == 0x6605) || in amdgpu_cgs_get_firmware_info()
286 (adev->pdev->device == 0x6610))) || in amdgpu_cgs_get_firmware_info()
287 ((adev->pdev->revision == 0x83) && in amdgpu_cgs_get_firmware_info()
288 (adev->pdev->device == 0x6610))) { in amdgpu_cgs_get_firmware_info()
296 if (((adev->pdev->revision == 0x81) && in amdgpu_cgs_get_firmware_info()
297 (adev->pdev->device == 0x6660)) || in amdgpu_cgs_get_firmware_info()
298 ((adev->pdev->revision == 0x83) && in amdgpu_cgs_get_firmware_info()
299 ((adev->pdev->device == 0x6660) || in amdgpu_cgs_get_firmware_info()
300 (adev->pdev->device == 0x6663) || in amdgpu_cgs_get_firmware_info()
301 (adev->pdev->device == 0x6665) || in amdgpu_cgs_get_firmware_info()
302 (adev->pdev->device == 0x6667)))) { in amdgpu_cgs_get_firmware_info()
305 } else if ((adev->pdev->revision == 0xc3) && in amdgpu_cgs_get_firmware_info()
306 (adev->pdev->device == 0x6665)) { in amdgpu_cgs_get_firmware_info()
314 if ((adev->pdev->revision == 0x80) || in amdgpu_cgs_get_firmware_info()
315 (adev->pdev->revision == 0x81) || in amdgpu_cgs_get_firmware_info()
316 (adev->pdev->device == 0x665f)) { in amdgpu_cgs_get_firmware_info()
324 if (adev->pdev->revision == 0x80) { in amdgpu_cgs_get_firmware_info()
332 if (((adev->pdev->device == 0x6900) && (adev->pdev->revision == 0x81)) || in amdgpu_cgs_get_firmware_info()
333 ((adev->pdev->device == 0x6900) && (adev->pdev->revision == 0x83)) || in amdgpu_cgs_get_firmware_info()
334 ((adev->pdev->device == 0x6907) && (adev->pdev->revision == 0x87)) || in amdgpu_cgs_get_firmware_info()
335 ((adev->pdev->device == 0x6900) && (adev->pdev->revision == 0xD1)) || in amdgpu_cgs_get_firmware_info()
336 ((adev->pdev->device == 0x6900) && (adev->pdev->revision == 0xD3))) { in amdgpu_cgs_get_firmware_info()
343 if (((adev->pdev->device == 0x6939) && (adev->pdev->revision == 0xf1)) || in amdgpu_cgs_get_firmware_info()
344 ((adev->pdev->device == 0x6938) && (adev->pdev->revision == 0xf1))) { in amdgpu_cgs_get_firmware_info()
355 if (((adev->pdev->device == 0x67ef) && in amdgpu_cgs_get_firmware_info()
356 ((adev->pdev->revision == 0xe0) || in amdgpu_cgs_get_firmware_info()
357 (adev->pdev->revision == 0xe5))) || in amdgpu_cgs_get_firmware_info()
358 ((adev->pdev->device == 0x67ff) && in amdgpu_cgs_get_firmware_info()
359 ((adev->pdev->revision == 0xcf) || in amdgpu_cgs_get_firmware_info()
360 (adev->pdev->revision == 0xef) || in amdgpu_cgs_get_firmware_info()
361 (adev->pdev->revision == 0xff)))) { in amdgpu_cgs_get_firmware_info()
364 } else if ((adev->pdev->device == 0x67ef) && in amdgpu_cgs_get_firmware_info()
365 (adev->pdev->revision == 0xe2)) { in amdgpu_cgs_get_firmware_info()
377 if (((adev->pdev->device == 0x67df) && in amdgpu_cgs_get_firmware_info()
378 ((adev->pdev->revision == 0xe0) || in amdgpu_cgs_get_firmware_info()
379 (adev->pdev->revision == 0xe3) || in amdgpu_cgs_get_firmware_info()
380 (adev->pdev->revision == 0xe4) || in amdgpu_cgs_get_firmware_info()
381 (adev->pdev->revision == 0xe5) || in amdgpu_cgs_get_firmware_info()
382 (adev->pdev->revision == 0xe7) || in amdgpu_cgs_get_firmware_info()
383 (adev->pdev->revision == 0xef))) || in amdgpu_cgs_get_firmware_info()
384 ((adev->pdev->device == 0x6fdf) && in amdgpu_cgs_get_firmware_info()
385 ((adev->pdev->revision == 0xef) || in amdgpu_cgs_get_firmware_info()
386 (adev->pdev->revision == 0xff)))) { in amdgpu_cgs_get_firmware_info()
389 } else if ((adev->pdev->device == 0x67df) && in amdgpu_cgs_get_firmware_info()
390 ((adev->pdev->revision == 0xe1) || in amdgpu_cgs_get_firmware_info()
391 (adev->pdev->revision == 0xf7))) { in amdgpu_cgs_get_firmware_info()
402 if (((adev->pdev->device == 0x6987) && in amdgpu_cgs_get_firmware_info()
403 ((adev->pdev->revision == 0xc0) || in amdgpu_cgs_get_firmware_info()
404 (adev->pdev->revision == 0xc3))) || in amdgpu_cgs_get_firmware_info()
405 ((adev->pdev->device == 0x6981) && in amdgpu_cgs_get_firmware_info()
406 ((adev->pdev->revision == 0x00) || in amdgpu_cgs_get_firmware_info()
407 (adev->pdev->revision == 0x01) || in amdgpu_cgs_get_firmware_info()
408 (adev->pdev->revision == 0x10)))) { in amdgpu_cgs_get_firmware_info()
419 if ((adev->pdev->device == 0x687f) && in amdgpu_cgs_get_firmware_info()
420 ((adev->pdev->revision == 0xc0) || in amdgpu_cgs_get_firmware_info()
421 (adev->pdev->revision == 0xc1) || in amdgpu_cgs_get_firmware_info()
422 (adev->pdev->revision == 0xc3))) in amdgpu_cgs_get_firmware_info()
438 err = request_firmware(&adev->pm.fw, fw_name, adev->dev); in amdgpu_cgs_get_firmware_info()
444 err = amdgpu_ucode_validate(adev->pm.fw); in amdgpu_cgs_get_firmware_info()
447 release_firmware(adev->pm.fw); in amdgpu_cgs_get_firmware_info()
448 adev->pm.fw = NULL; in amdgpu_cgs_get_firmware_info()
452 if (adev->firmware.load_type == AMDGPU_FW_LOAD_PSP) { in amdgpu_cgs_get_firmware_info()
453 ucode = &adev->firmware.ucode[AMDGPU_UCODE_ID_SMC]; in amdgpu_cgs_get_firmware_info()
455 ucode->fw = adev->pm.fw; in amdgpu_cgs_get_firmware_info()
457 adev->firmware.fw_size += in amdgpu_cgs_get_firmware_info()
462 hdr = (const struct smc_firmware_header_v1_0 *) adev->pm.fw->data; in amdgpu_cgs_get_firmware_info()
464 adev->pm.fw_version = le32_to_cpu(hdr->header.ucode_version); in amdgpu_cgs_get_firmware_info()
467 src = (const uint8_t *)(adev->pm.fw->data + in amdgpu_cgs_get_firmware_info()
470 info->version = adev->pm.fw_version; in amdgpu_cgs_get_firmware_info()
486 struct cgs_device *amdgpu_cgs_create_device(struct amdgpu_device *adev) in amdgpu_cgs_create_device() argument
497 cgs_device->adev = adev; in amdgpu_cgs_create_device()