Posting here from:
https://github.com/acidanthera/WhateverGreen/pull/14#issuecomment-448325682
Cc:
@headkaze @Fraxul @vit9696
Hmmm... So no idea what the problem is. System booted up with black screen. I waited for 3 minutes and then the screen came back online. Here are the logs:
Code:
kernel:(Lilu)WhateverGreen:init@(DBG)WhateverGreenbootstrapDBG-125-2018-12-18
kernel:(Lilu)WhateverGreen:weg@(DBG)applyingbacklightpatch
kernel:(Lilu)WhateverGreen:igfx@(DBG)coverageinstructionpatched,we'reclearedforrouting
kernel:(Lilu)WhateverGreen:igfx@(DBG)patchingframebufferId0x3E9B0000connector[1]busId:0x05,
kernel:(Lilu)WhateverGreen:igfx@(DBG)patchingframebufferId0x3E9B0000connector[3]busId:0x06,
kernel:(Lilu)WhateverGreen:igfx@(DBG)PatchingframebufferId0x3E9B0000successful
kernel:(Lilu)WhateverGreen:igfx@(DBG)wrapCflWriteRegister32:driver requested BXT_BLC_PWM_FREQ1=0x56ce
kernel:(Lilu)WhateverGreen:igfx@(DBG)wrapCflWriteRegister32: system initialized BXT_BLC_PWM_FREQ1=0xffff
kernel:(Lilu)WhateverGreen:igfx@(DBG)wrapCflWriteRegister32:write PWM_DUTY1 0x352/0x56ce, rescaled to 0x9ca/0xffff
We can see that: Driver req, BXT_BLC_PWM_FREQ1 = 0x56ce & System init, BXT_BLC_PWM_FREQ1 = 0xffff.
It doesn't change even once the system regains the display, unless you change brightness (obviously).
Now I wonder, why does it boot to black screen with the same values and then works normally (with the same values) after 3 minutes??
Update:
So I went ahead and took a note of
rescaledValue when system booted up fine.
Then, I modified the code of WEG to use that fixed custom
rescaledValue doing which lead to fixed brightness value (obviously) but then again, after 1 or 2 more restarts, I faced the black screen issue. Weird. System boots up fine with same value and boots to black screen with the same value.
Then, I thought maybe it is related to
BXT_BLC_PWM_CTL1 but upon debugging I found out that there is no write request to this register.
Are we still missing something as this patch is literally working off and on as if it has the power to decide, LOL.
Regards