Skip to content

Commit

Permalink
Another DDI caps fix
Browse files Browse the repository at this point in the history
Signed-off-by: Visual Ehrmanntraut <30368284+ChefKissInc@users.noreply.github.com>
  • Loading branch information
VisualEhrmanntraut committed Jul 14, 2023
1 parent e203786 commit 33e9abf
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions NootedRed/kern_hwlibs.cpp
Expand Up @@ -60,14 +60,15 @@ bool X5000HWLibs::processKext(KernelPatcher &patcher, size_t index, mach_vm_addr
"Failed to enable kernel writing");
*orgDeviceTypeTable = {.deviceId = NRed::callback->deviceId, .deviceType = 6};
auto found = false;
auto targetDeviceId = NRed::callback->chipType > ChipType::Renoir && NRed::callback->deviceId != 0x1636 ?
auto targetDeviceId = NRed::callback->chipType >= ChipType::Renoir && NRed::callback->deviceId != 0x1636 ?
0x1636 :
NRed::callback->deviceId;
while (orgCapsInitTable->deviceId != 0xFFFFFFFF) {
if (orgCapsInitTable->familyId == AMDGPU_FAMILY_RAVEN && orgCapsInitTable->deviceId == targetDeviceId) {
orgCapsInitTable->deviceId = NRed::callback->deviceId;
orgCapsInitTable->revision = NRed::callback->revision;
orgCapsInitTable->extRevision = NRed::callback->enumRevision;
orgCapsInitTable->extRevision =
static_cast<uint64_t>(NRed::callback->enumRevision) + NRed::callback->revision;
orgCapsInitTable->pciRevision = NRed::callback->pciRevision;
*orgCapsTable = {
.familyId = AMDGPU_FAMILY_RAVEN,
Expand Down

0 comments on commit 33e9abf

Please sign in to comment.