Details
- Reviewers
obiwac emaste - Commits
- rG9c77fb6aaa36: amdsmu: Add Krackan Point support
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
The difference for Kracken Point is bit 0x400; I wonder if this can be a bit more clear (rather than constants directly in the table).
(A few moments later) Looks like Linux just has 0x538 / 0x938 inline, so ๐คทโโ๏ธ
this is PCI_DEVICE_ID_AMD_1AH_M60H_ROOT in the linux driver, which selects the following case for choosing the IP blocks array:
case PCI_DEVICE_ID_AMD_1AH_M60H_ROOT:
if (boot_cpu_data.x86_model == 0x70) {
dev->num_ips = ARRAY_SIZE(soc15_ip_blk_v2);
dev->ips_ptr = soc15_ip_blk_v2;
} else {
dev->num_ips = ARRAY_SIZE(soc15_ip_blk);
dev->ips_ptr = soc15_ip_blk;
}
dev->smu_msg = 0x938;
break;
}So we should ideally have a warning for when the CPU model is 0x70 for now, and then add this second array and support for this when the time comes where someone runs this on a 0x70 machine
| sys/dev/amdsmu/amdsmu.h | ||
|---|---|---|
| 28โ29 | could we make these values SMU_REG_MSG_{PHOENIX,KRACKAN} #defines respectively, just to keep consistency with the fact the idlemask registers are #defines? | |
| sys/dev/amdsmu/amdsmu.h | ||
|---|---|---|
| 36โ37 | The one with 25 IP blocks is actually a different list on Linux (soc15_ip_blk_v2). We should probably also have a pointer to either soc15_ip_blk{,_v2} in struct amdsmu_product. I or you can do this in a separate commit though: static const struct amd_pmc_bit_map soc15_ip_blk_v2[] = {
{"DISPLAY", BIT(0)},
{"CPU", BIT(1)},
{"GFX", BIT(2)},
{"VDD", BIT(3)},
{"VDD_CCX", BIT(4)},
{"ACP", BIT(5)},
{"VCN_0", BIT(6)},
{"VCN_1", BIT(7)},
{"ISP", BIT(8)},
{"NBIO", BIT(9)},
{"DF", BIT(10)},
{"USB3_0", BIT(11)},
{"USB3_1", BIT(12)},
{"LAPIC", BIT(13)},
{"USB3_2", BIT(14)},
{"USB4_RT0", BIT(15)},
{"USB4_RT1", BIT(16)},
{"USB4_0", BIT(17)},
{"USB4_1", BIT(18)},
{"MPM", BIT(19)},
{"JPEG_0", BIT(20)},
{"JPEG_1", BIT(21)},
{"IPU", BIT(22)},
{"UMSCH", BIT(23)},
{"VPE", BIT(24)},
}; | |
| sys/dev/amdsmu/amdsmu.h | ||
|---|---|---|
| 36โ37 | No worries, I was being naive the driver. I can add this | |