Summary: | Brightness control inversion from VBT table is not taken into account in Ubuntu 18.10 | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | DRI | Reporter: | Szymon <szymon.balcerak> | ||||||
Component: | DRM/Intel | Assignee: | Intel GFX Bugs mailing list <intel-gfx-bugs> | ||||||
Status: | RESOLVED MOVED | QA Contact: | Intel GFX Bugs mailing list <intel-gfx-bugs> | ||||||
Severity: | normal | ||||||||
Priority: | not set | CC: | intel-gfx-bugs, jani.nikula | ||||||
Version: | unspecified | ||||||||
Hardware: | x86 (IA32) | ||||||||
OS: | Linux (All) | ||||||||
Whiteboard: | Triaged | ||||||||
i915 platform: | CFL | i915 features: | |||||||
Attachments: |
|
Description
Szymon
2019-08-23 09:03:51 UTC
We don't look at the VBT active low bit, instead we read the backlight registers and check what the BIOS has set up. This is due to historical reasons, we always preferred what was actually set up by the BIOS instead of looking at the VBT. Arguably this is a bug; if the BIOS does not set up the registers, we don't get it right. Does your BIOS enable the display? Please set drm.debug=14 module parameter, and attach dmesg output all the way from boot. Please attach /sys/kernel/debug/dri/0/i915_vbt. Created attachment 145143 [details]
dmseg acquired while PWM inverted logic is used.
Created attachment 145144 [details]
VBT acquired while PWM inverted logic is used.
I'm not sure what do you exactly mean by "BIOS enable the display". For sure LVDS display is switched on and I can see the screen. I assume BIOS enabled it. I provided requested files as attachments. Can you point Intel's document number which describes the content of register which should be set by BIOS? P.S. I'm running Ubuntu from USB stick (without installation). Today I performed another tests a here are the results: 1. Confirmed that Linux does not take VBT backlight active low bit into consideration. If this is the bug that is to be decided by Linux graphic driver developers. NOTE: Windows graphic driver takes this setting into consideration. 2. Once BIOS writes 0xC8250 MMIO register with bit 29, backlight logic is inverted correctly. However 10% minimum brightness level defined in VBT table is NOT taken into account in this case, i.e. Linux brightness slider set at maximum produces complete darkness instead of 10% brightness (as set as minimum). 3. In comparison to point 2: Once backlight logic is inverted by kernel boot parameter acpi_backlight=vendor i915.invert_brightness=1, slider at max still respects minimum brightness level 10% defined in VBT. Is there maybe any update regarding the topic? (In reply to Szymon from comment #4) > I'm not sure what do you exactly mean by "BIOS enable the display". For sure > LVDS display is switched on and I can see the screen. I assume BIOS enabled > it. > > I provided requested files as attachments. > > Can you point Intel's document number which describes the content of > register which should be set by BIOS? > > P.S. I'm running Ubuntu from USB stick (without installation). (In reply to Szymon from comment #5) > Today I performed another tests a here are the results: > > 1. Confirmed that Linux does not take VBT backlight active low bit into > consideration. If this is the bug that is to be decided by Linux graphic > driver developers. NOTE: Windows graphic driver takes this setting into > consideration. > > 2. Once BIOS writes 0xC8250 MMIO register with bit 29, backlight logic is > inverted correctly. However 10% minimum brightness level defined in VBT > table is NOT taken into account in this case, i.e. Linux brightness slider > set at maximum produces complete darkness instead of 10% brightness (as set > as minimum). > > 3. In comparison to point 2: Once backlight logic is inverted by kernel boot > parameter acpi_backlight=vendor i915.invert_brightness=1, slider at max > still respects minimum brightness level 10% defined in VBT. Jani, any further comments? (In reply to Szymon from comment #0) > • I can alter BIOS behavior if requested/needed as I'm board's BIOS > developer. Please try to set bit 29 of register 0xc8250 in bios. (In reply to Jani Nikula from comment #8) > (In reply to Szymon from comment #0) > > • I can alter BIOS behavior if requested/needed as I'm board's BIOS > > developer. > > Please try to set bit 29 of register 0xc8250 in bios. I already did it but there is still the problem with minimum brightness. See point 2 of comment 5. (In reply to Szymon from comment #5) > 2. Once BIOS writes 0xC8250 MMIO register with bit 29, backlight logic is > inverted correctly. However 10% minimum brightness level defined in VBT > table is NOT taken into account in this case, i.e. Linux brightness slider > set at maximum produces complete darkness instead of 10% brightness (as set > as minimum). > > 3. In comparison to point 2: Once backlight logic is inverted by kernel boot > parameter acpi_backlight=vendor i915.invert_brightness=1, slider at max > still respects minimum brightness level 10% defined in VBT. Err, what? Slider set at max should produce max brightness instead of darkness, right? Slider set at min should produce min brightness. I'm at a loss with what you're trying to accomplish. Perhaps we should take the GUI sliders out of the equation, and use /sys/class/backlight/intel_backlight/ directly. This should set the backlight to minimum brightness: # echo 0 > brightness This should set the backlight to maximum brightness: # echo $(cat max_brightness) > brightness (In reply to Jani Nikula from comment #10) > Err, what? Slider set at max should produce max brightness instead of > darkness, right? Slider set at min should produce min brightness. > > I'm at a loss with what you're trying to accomplish. > > Perhaps we should take the GUI sliders out of the equation, and use > /sys/class/backlight/intel_backlight/ directly. > > This should set the backlight to minimum brightness: > > # echo 0 > brightness > > This should set the backlight to maximum brightness: > > # echo $(cat max_brightness) > brightness Sorry if I confused you by my description. Let me explain once again: 1. "Slider set at max should produce max brightness instead of darkness. Slider set at min should produce min brightness." - this general rule is of course true and expected. 2. However our board has a possibility to attach different LVDS panels. By different I mean especially different brightness polarity. I.e. 100% PWM might mean max brightness for LVDS with "normal" polarity and 100%PWM might mean min brightness for LVDS with 'inverted' polarity. 3. To still satisfy general rule from point 1, we introduced BIOS SETUP setting which allows user to change LVDS PWM logic (normal/inverted). 4. So now user having LVDS with "normal" polarity should use "normal" setting and user with LVDS with "inverted" polarity should use "normal" setting. To perform my testes with Linux I have LVDS with normal polarity, but set "inverted" setting in SETUP (BIOS wrote 0xC8250 MMIO register with bit 29), that is why I received less brightness with higher slider position and more brightness with lower slider position. I hope now it's clearer to you. Having this setup I received problems as in comment 5. -- GitLab Migration Automatic Message -- This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/drm/intel/issues/382. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.