-
Notifications
You must be signed in to change notification settings - Fork 614
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix the issue that the builtin display remains garbled after the system boots on ICL platforms #92
Conversation
Very nice, thanks for finishing it off :) |
Great job ! |
I have a laptop Lenovo C940 with CPU is 1065G7 and a 4k internal Display. It doesn't result a garbled display but black screen. It will recover to normal by closing the lid and then open it.
|
Sorry to hijack this. |
Hi. Do you mind sharing the step on how to do it? |
Read README |
Abstract
This pull request contains 1 new feature and closes acidanthera/bugtracker#1329 and acidanthera/bugtracker#1805.
Display Data Buffer (DBUF) is critical for display pipes and planes to function properly. The graphics driver allocates the buffer by writing a <start, end> pair to the plane buffer configuration register. Apple expects that the firmware has allocated an adequate amount of buffer for the Pipe A that drives the builtin display, so the driver can optimize the allocation later to provide better display residency in memory low power modes.
However, the buffer allocated by the BIOS on Ice Lake-based laptops seems to be not enough for the plane running in the mode configured by the driver, resulting in a garbled display that lasts for about 7 to 15 seconds when the system finishes booting and presents the login window. This issue will disappear when the function that optimizes the buffer allocation is fired by a timer enabled at the end of mode setting.
The default delay of executing the optimizer function is 15 seconds which is hard-coded in the framebuffer controller's startup routine. Fortunately, we can change the delay by injecting the property "DBUFOptimizeTime" to the feature control dictionary. By specifying a delay of 0 second, we can invoke the optimizer function as soon as the graphics driver completes the modeset for the builtin display, thus fixing the garbled builtin screen issue on Ice Lake platforms without having any negative impacts on external monitors.
-- FireWolf
Oct 2, 2021