Lines Matching refs:ip

381 		dev_info(adev->dev, "use ip discovery information from file");
385 dev_err(adev->dev, "failed to read ip discovery binary from file\n");
397 /* check the ip discovery binary signature */
400 "get invalid ip discovery binary signature\n");
414 dev_err(adev->dev, "invalid ip discovery binary checksum\n");
427 dev_err(adev->dev, "invalid ip discovery data table signature\n");
434 dev_err(adev->dev, "invalid ip discovery data table checksum\n");
449 dev_err(adev->dev, "invalid ip discovery gc table id\n");
471 dev_err(adev->dev, "invalid ip discovery harvest table signature\n");
493 dev_err(adev->dev, "invalid ip discovery vcn table id\n");
515 dev_err(adev->dev, "invalid ip discovery mall table id\n");
548 static int amdgpu_discovery_validate_ip(const struct ip_v4 *ip)
550 if (ip->instance_number >= HWIP_MAX_INSTANCE) {
551 DRM_ERROR("Unexpected instance_number (%d) from ip discovery blob\n",
552 ip->instance_number);
555 if (le16_to_cpu(ip->hw_id) >= HW_ID_MAX) {
556 DRM_ERROR("Unexpected hw_id (%d) from ip discovery blob\n",
557 le16_to_cpu(ip->hw_id));
570 struct ip_v4 *ip;
587 ip = (struct ip_v4 *)(adev->mman.discovery_bin + ip_offset);
589 if (amdgpu_discovery_validate_ip(ip))
592 if (le16_to_cpu(ip->variant) == 1) {
593 switch (le16_to_cpu(ip->hw_id)) {
596 if (ip->instance_number == 0) {
619 ip_offset += struct_size(ip, base_address_64, ip->num_base_address);
621 ip_offset += struct_size(ip, base_address, ip->num_base_address);
985 struct ip_v4 *ip;
988 ip = (struct ip_v4 *)(adev->mman.discovery_bin + ip_offset);
989 if (amdgpu_discovery_validate_ip(ip) ||
990 le16_to_cpu(ip->hw_id) != ii)
1029 ip->num_base_address),
1035 ip_hw_instance->hw_id = le16_to_cpu(ip->hw_id); /* == ii */
1036 ip_hw_instance->num_instance = ip->instance_number;
1037 ip_hw_instance->major = ip->major;
1038 ip_hw_instance->minor = ip->minor;
1039 ip_hw_instance->revision = ip->revision;
1044 ip_hw_instance->num_base_addresses = ip->num_base_address;
1049 lower_32_bits(le64_to_cpu(ip->base_address_64[kk])) & 0x3FFFFFFF;
1051 ip_hw_instance->base_addr[kk] = ip->base_address[kk];
1060 ip_offset += struct_size(ip, base_address_64,
1061 ip->num_base_address);
1063 ip_offset += struct_size(ip, base_address,
1064 ip->num_base_address);
1232 struct ip_v4 *ip;
1274 ip = (struct ip_v4 *)(adev->mman.discovery_bin + ip_offset);
1276 if (amdgpu_discovery_validate_ip(ip))
1279 num_base_address = ip->num_base_address;
1282 hw_id_names[le16_to_cpu(ip->hw_id)],
1283 le16_to_cpu(ip->hw_id),
1284 ip->instance_number,
1285 ip->major, ip->minor,
1286 ip->revision);
1288 if (le16_to_cpu(ip->hw_id) == VCN_HWID) {
1298 ip->revision & 0xc0;
1301 (1U << ip->instance_number);
1303 (1U << ip->instance_number);
1309 ip->revision &= ~0xc0;
1311 if (le16_to_cpu(ip->hw_id) == SDMA0_HWID ||
1312 le16_to_cpu(ip->hw_id) == SDMA1_HWID ||
1313 le16_to_cpu(ip->hw_id) == SDMA2_HWID ||
1314 le16_to_cpu(ip->hw_id) == SDMA3_HWID) {
1319 (1U << ip->instance_number);
1327 if (le16_to_cpu(ip->hw_id) == VPE_HWID) {
1336 if (le16_to_cpu(ip->hw_id) == UMC_HWID) {
1341 if (le16_to_cpu(ip->hw_id) == GC_HWID)
1343 (1U << ip->instance_number);
1351 /* Truncate the 64bit base address from ip discovery
1352 * and only store lower 32bit ip base in reg_offset[].
1360 ip->base_address[k] =
1361 lower_32_bits(le64_to_cpu(ip->base_address_64[k])) & 0x3FFFFFFF;
1363 ip->base_address[k] = le32_to_cpu(ip->base_address[k]);
1364 DRM_DEBUG("\t0x%08x\n", ip->base_address[k]);
1368 if (hw_id_map[hw_ip] == le16_to_cpu(ip->hw_id) &&
1371 hw_id_names[le16_to_cpu(ip->hw_id)]);
1372 adev->reg_offset[hw_ip][ip->instance_number] =
1373 ip->base_address;
1388 subrev = ip->sub_revision;
1389 variant = ip->variant;
1393 [ip->instance_number] =
1394 IP_VERSION_FULL(ip->major,
1395 ip->minor,
1396 ip->revision,
1404 ip_offset += struct_size(ip, base_address_64, ip->num_base_address);
1406 ip_offset += struct_size(ip, base_address, ip->num_base_address);
1467 DRM_ERROR("ip discovery uninitialized\n");
1567 DRM_ERROR("ip discovery uninitialized\n");
1622 DRM_ERROR("ip discovery uninitialized\n");
1705 "Failed to add common ip block(GC_HWIP:0x%x)\n",
1752 dev_err(adev->dev, "Failed to add gmc ip block(GC_HWIP:0x%x)\n",
1796 "Failed to add ih ip block(OSSSYS_HWIP:0x%x)\n",
1855 "Failed to add psp ip block(MP0_HWIP:0x%x)\n",
1910 "Failed to add smu ip block(MP1_HWIP:0x%x)\n",
1964 "Failed to add dm ip block(DCE_HWIP:0x%x)\n",
1980 "Failed to add dm ip block(DCI_HWIP:0x%x)\n",
2030 dev_err(adev->dev, "Failed to add gfx ip block(GC_HWIP:0x%x)\n",
2079 "Failed to add sdma ip block(SDMA0_HWIP:0x%x)\n",
2098 "Failed to add uvd v7 ip block(UVD_HWIP:0x%x)\n",
2111 "Failed to add VCE v4 ip block(VCE_HWIP:0x%x)\n",
2171 "Failed to add vcn/jpeg ip block(UVD_HWIP:0x%x)\n",