Lines Matching defs:ip

377 		dev_info(adev->dev, "use ip discovery information from file");
381 dev_err(adev->dev, "failed to read ip discovery binary from file\n");
393 /* check the ip discovery binary signature */
396 "get invalid ip discovery binary signature\n");
410 dev_err(adev->dev, "invalid ip discovery binary checksum\n");
423 dev_err(adev->dev, "invalid ip discovery data table signature\n");
430 dev_err(adev->dev, "invalid ip discovery data table checksum\n");
445 dev_err(adev->dev, "invalid ip discovery gc table id\n");
467 dev_err(adev->dev, "invalid ip discovery harvest table signature\n");
489 dev_err(adev->dev, "invalid ip discovery vcn table id\n");
511 dev_err(adev->dev, "invalid ip discovery mall table id\n");
544 static int amdgpu_discovery_validate_ip(const struct ip_v4 *ip)
546 if (ip->instance_number >= HWIP_MAX_INSTANCE) {
547 DRM_ERROR("Unexpected instance_number (%d) from ip discovery blob\n",
548 ip->instance_number);
551 if (le16_to_cpu(ip->hw_id) >= HW_ID_MAX) {
552 DRM_ERROR("Unexpected hw_id (%d) from ip discovery blob\n",
553 le16_to_cpu(ip->hw_id));
566 struct ip_v4 *ip;
583 ip = (struct ip_v4 *)(adev->mman.discovery_bin + ip_offset);
585 if (amdgpu_discovery_validate_ip(ip))
588 if (le16_to_cpu(ip->variant) == 1) {
589 switch (le16_to_cpu(ip->hw_id)) {
592 if (ip->instance_number == 0) {
615 ip_offset += struct_size(ip, base_address_64, ip->num_base_address);
617 ip_offset += struct_size(ip, base_address, ip->num_base_address);
981 struct ip_v4 *ip;
984 ip = (struct ip_v4 *)(adev->mman.discovery_bin + ip_offset);
985 if (amdgpu_discovery_validate_ip(ip) ||
986 le16_to_cpu(ip->hw_id) != ii)
1025 ip->num_base_address),
1031 ip_hw_instance->hw_id = le16_to_cpu(ip->hw_id); /* == ii */
1032 ip_hw_instance->num_instance = ip->instance_number;
1033 ip_hw_instance->major = ip->major;
1034 ip_hw_instance->minor = ip->minor;
1035 ip_hw_instance->revision = ip->revision;
1040 ip_hw_instance->num_base_addresses = ip->num_base_address;
1045 lower_32_bits(le64_to_cpu(ip->base_address_64[kk])) & 0x3FFFFFFF;
1047 ip_hw_instance->base_addr[kk] = ip->base_address[kk];
1056 ip_offset += struct_size(ip, base_address_64,
1057 ip->num_base_address);
1059 ip_offset += struct_size(ip, base_address,
1060 ip->num_base_address);
1228 struct ip_v4 *ip;
1270 ip = (struct ip_v4 *)(adev->mman.discovery_bin + ip_offset);
1272 if (amdgpu_discovery_validate_ip(ip))
1275 num_base_address = ip->num_base_address;
1278 hw_id_names[le16_to_cpu(ip->hw_id)],
1279 le16_to_cpu(ip->hw_id),
1280 ip->instance_number,
1281 ip->major, ip->minor,
1282 ip->revision);
1284 if (le16_to_cpu(ip->hw_id) == VCN_HWID) {
1294 ip->revision & 0xc0;
1297 (1U << ip->instance_number);
1299 (1U << ip->instance_number);
1305 ip->revision &= ~0xc0;
1307 if (le16_to_cpu(ip->hw_id) == SDMA0_HWID ||
1308 le16_to_cpu(ip->hw_id) == SDMA1_HWID ||
1309 le16_to_cpu(ip->hw_id) == SDMA2_HWID ||
1310 le16_to_cpu(ip->hw_id) == SDMA3_HWID) {
1315 (1U << ip->instance_number);
1323 if (le16_to_cpu(ip->hw_id) == VPE_HWID) {
1332 if (le16_to_cpu(ip->hw_id) == UMC_HWID) {
1337 if (le16_to_cpu(ip->hw_id) == GC_HWID)
1339 (1U << ip->instance_number);
1347 /* Truncate the 64bit base address from ip discovery
1348 * and only store lower 32bit ip base in reg_offset[].
1356 ip->base_address[k] =
1357 lower_32_bits(le64_to_cpu(ip->base_address_64[k])) & 0x3FFFFFFF;
1359 ip->base_address[k] = le32_to_cpu(ip->base_address[k]);
1360 DRM_DEBUG("\t0x%08x\n", ip->base_address[k]);
1364 if (hw_id_map[hw_ip] == le16_to_cpu(ip->hw_id) &&
1367 hw_id_names[le16_to_cpu(ip->hw_id)]);
1368 adev->reg_offset[hw_ip][ip->instance_number] =
1369 ip->base_address;
1384 subrev = ip->sub_revision;
1385 variant = ip->variant;
1389 [ip->instance_number] =
1390 IP_VERSION_FULL(ip->major,
1391 ip->minor,
1392 ip->revision,
1400 ip_offset += struct_size(ip, base_address_64, ip->num_base_address);
1402 ip_offset += struct_size(ip, base_address, ip->num_base_address);
1463 DRM_ERROR("ip discovery uninitialized\n");
1563 DRM_ERROR("ip discovery uninitialized\n");
1618 DRM_ERROR("ip discovery uninitialized\n");
1701 "Failed to add common ip block(GC_HWIP:0x%x)\n",
1748 dev_err(adev->dev, "Failed to add gmc ip block(GC_HWIP:0x%x)\n",
1792 "Failed to add ih ip block(OSSSYS_HWIP:0x%x)\n",
1851 "Failed to add psp ip block(MP0_HWIP:0x%x)\n",
1904 "Failed to add smu ip block(MP1_HWIP:0x%x)\n",
1958 "Failed to add dm ip block(DCE_HWIP:0x%x)\n",
1974 "Failed to add dm ip block(DCI_HWIP:0x%x)\n",
2024 dev_err(adev->dev, "Failed to add gfx ip block(GC_HWIP:0x%x)\n",
2073 "Failed to add sdma ip block(SDMA0_HWIP:0x%x)\n",
2092 "Failed to add uvd v7 ip block(UVD_HWIP:0x%x)\n",
2105 "Failed to add VCE v4 ip block(VCE_HWIP:0x%x)\n",
2165 "Failed to add vcn/jpeg ip block(UVD_HWIP:0x%x)\n",