Skip to content

Commit

Permalink
Optimised Rocket Lake startup as IGPU is unsupported
Browse files Browse the repository at this point in the history
  • Loading branch information
vit9696 committed Apr 2, 2021
1 parent 7bf6a98 commit afcd687
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
2 changes: 2 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ WhateverGreen Changelog
#### v1.4.9
- Added per-GPU disabling API: inject `disable-gpu` to disable
- Added per-GPU disabling kernel version specification: inject `disable-gpu-min` / `disable-gpu-max` to select kernel version to disable (inclusive range)
- Added IGPU disabling API: inject `disable-gpu` to disable or use `-wegnoigpu` boot argument
- Optimised Rocket Lake startup as IGPU is unsupported

#### v1.4.8
- Fixed debug messages from cursor manipulation with NVIDIA GPUs on macOS 11
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ Read [FAQs](https:/acidanthera/WhateverGreen/blob/master/Manual/) an
- `-wegdbg` to enable debug printing (available in DEBUG binaries).
- `-wegoff` to disable WhateverGreen.
- `-wegbeta` to enable WhateverGreen on unsupported OS versions (11 and below are enabled by default).
- `-wegnoegpu` to disable external GPU (or add `disable-external-gpu` property to IGPU).
- `-wegnoegpu` to disable all external GPUs (or add `disable-gpu` property to each GFX0).
- `-wegnoigpu` to disable internal GPU (or add `disable-gpu` property to IGPU)
- `-radvesa` to disable ATI/AMD video acceleration completely.
- `-rad24` to enforce 24-bit display mode.
- `-raddvi` to enable DVI transmitter correction (required for 290X, 370, etc.).
Expand Down
7 changes: 6 additions & 1 deletion WhateverGreen/kern_igfx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,9 @@ void IGFX::init() {
modRPSControlPatch.available = true;
modTypeCCheckDisabler.enabled = true;
break;
case CPUInfo::CpuGeneration::RocketLake:
gPlatformGraphicsSupported = false;
break;
default:
SYSLOG("igfx", "found an unsupported processor 0x%X:0x%X, please report this!", family, model);
break;
Expand Down Expand Up @@ -187,7 +190,9 @@ void IGFX::processKernel(KernelPatcher &patcher, DeviceInfo *info) {

auto cpuGeneration = BaseDeviceInfo::get().cpuGeneration;

if (info->videoBuiltin) {
if (info->videoBuiltin && !gPlatformGraphicsSupported) {
switchOffGraphics = switchOffFramebuffer = true;
} else if (info->videoBuiltin) {
applyFramebufferPatch = loadPatchesFromDevice(info->videoBuiltin, info->reportedFramebufferId);

#ifdef DEBUG
Expand Down
5 changes: 5 additions & 0 deletions WhateverGreen/kern_igfx.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,11 @@ class IGFX {
*/
bool gPlatformListIsSNB {false};

/**
* IGPU support
*/
bool gPlatformGraphicsSupported {true};

/**
* Private self instance for callbacks
*/
Expand Down

0 comments on commit afcd687

Please sign in to comment.