From 2f5d8257eeebf0a8519d25054536f520935e4519 Mon Sep 17 00:00:00 2001 From: lshbluesky <61459016+lshbluesky@users.noreply.github.com> Date: Sat, 4 May 2024 10:04:09 +0900 Subject: [PATCH] Add hwSetMode skip hwRegsNeedUpdate patch for macOS Sonoma --- WhateverGreen/kern_igfx.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/WhateverGreen/kern_igfx.cpp b/WhateverGreen/kern_igfx.cpp index d46cea5e..8f789738 100644 --- a/WhateverGreen/kern_igfx.cpp +++ b/WhateverGreen/kern_igfx.cpp @@ -747,6 +747,10 @@ void IGFX::ForceCompleteModeset::processFramebufferKext(KernelPatcher &patcher, static const uint8_t f2[] = {0xE8, 0x31, 0xE5, 0xFF, 0xFF, 0x84, 0xC0, 0x74, 0x3D}; static const uint8_t r2[] = {0xE8, 0x31, 0xE5, 0xFF, 0xFF, 0x84, 0xC0, 0xEB, 0x3D}; + // AppleIntelFramebufferController::hwSetMode skip hwRegsNeedUpdate - macOS Sonoma 14.x + static const uint8_t f2b[] = {0xE8, 0x54, 0xEA, 0xFF, 0xFF, 0x84, 0xC0, 0x74, 0x5C}; + static const uint8_t r2b[] = {0xE8, 0x54, 0xEA, 0xFF, 0xFF, 0x84, 0xC0, 0xeb, 0x5C}; + // writeReg32(SOUTH_DSPCLK_GATE_D,PCH_GMBUSUNIT_CLOCK_GATE_DISABLE); Wa_14011294188:ehl,jsl,tgl,rkl,adl-s static const uint8_t f1[] = {0x74, 0x28, 0x48, 0xFF, 0x05, 0x9E, 0x65, 0x0B, 0x00, 0xBE, 0x20, 0x20, 0x0C, 0x00, 0x4C, 0x89, 0xEF, 0xE8, 0x3F, 0xE2, 0xFF, 0xFF, 0x0D, 0x00, 0x10, 0x00, 0x00}; static const uint8_t r1[] = {0x90, 0x90, 0x48, 0xFF, 0x05, 0x9E, 0x65, 0x0B, 0x00, 0xBE, 0x20, 0x20, 0x0C, 0x00, 0x4C, 0x89, 0xEF, 0xE8, 0x3F, 0xE2, 0xFF, 0xFF, 0xb8, 0x00, 0x00, 0x00, 0x80}; @@ -754,6 +758,9 @@ void IGFX::ForceCompleteModeset::processFramebufferKext(KernelPatcher &patcher, KernelPatcher::LookupPatch patch { &kextIntelICLLPFb, f2, r2, sizeof(f2), 1 }; patcher.applyLookupPatch(&patch); + KernelPatcher::LookupPatch patchb { &kextIntelICLLPFb, f2b, r2b, sizeof(f2b), 1 }; + patcher.applyLookupPatch(&patchb); + KernelPatcher::LookupPatch patch2 { &kextIntelICLLPFb, f1, r1, sizeof(f1), 1 }; patcher.applyLookupPatch(&patch2); }