Brightness control inversion from VBT table is not taken into account in Ubuntu 18.10
Submitted by Szymon
Assigned to Intel GFX Bugs mailing list
Link to original bug (#111475)
Description
I’m currently struggling with LVDS panel brightness control on CoffeLake PCH H310 board with Ubuntu 18.10.
Our setup is as follows:
- The board is equipped with Realtek RTD2136R DP to LVDS converter.
- LVDS backlight PWM signal comes from PCH EDP_BKLTCTL (GPP_F21) output pin.
- Board has BIOS which allows user to change LVDS PWM logic (normal/inverted) within SETUP.
- Once user chooses “Inverted” setting, BIOS changes VBT table provided to OS. By changing VBT I mean that BIOS changes active_low_pwm bit to 1 for LVDS panel, so consequently we expect dev_priv->vbt.backlight.active_low_pwm from intel_bios.c to be set to 1.
Result:
Ubuntu does NOT take PWM inversion into consideration and brightness control behaves as in normal mode.
Expected result:
Once PWM normal is set, LVDS brightness control should set minimum brightness for position 0 of OS brightness slider and maximum brightness for position 100 of slider.
Once PWM inverted is set, LVDS brightness control should set maximum brightness for position 0 of OS brightness slider and minimum brightness for position 100 of slider.
Additional notes:
• Once kernel boot parameter acpi_backlight=vendor i915.invert_brightness=1 is set Ubuntu properly handles PWM inversion.
• Exactly the same BIOS & board with Windows 10 behaves correctly -> inversion is taken into account.
• I’m mostly familiar with Windows, not with Linux.
• I personally did not try any other Linux distribution however I assume all of them use similar graphic driver code base.
• Although problem is visible on H310 PCH I assume it's NOT PCH specific (however I haven't tried with different CFL PCH as only this H310 board is equipped with LVDS).
• I can alter BIOS behavior if requested/needed as I'm board's BIOS developer.
Questions:
1. Could you please verify if VBT information is properly handled in Linux driver?
2. Is my understanding correct that Linux graphic driver tries to write 0xC8250 MMIO register with bit 29 once PWM inversion is set within VBT table?
3. Could you tell which Intel's documentation specify CoffeLake PCH register (0xC8250 -> i915_reg.h) to modify PWM behavior?
4. Is modification of VBT table the right way to achieve expected results or there should be some other way applied by BIOS.
Thanks,
Szymon