vlv_dsi: Backlight control issues on Lenovo Yoga Tab 3 Pro YT3-X90F
The Lenovo Yoga Tab 3 Pro YT3-X90F is a x86 tablet which ship with Android as factory OS.
The factory OS BSP style kernel on these tablets does not use the normal x86 hw autodetection instead it hardcodes a whole bunch of things including using panel drivers instead of relying on VBT MIPI sequences to turn the panel/backlight on/off.
The normal i915 driver (which does not use panel drivers) mostly works since the VBT still needs to contain valid info for the GOP, but because of the Android kernel relying on panel drivers there are 2 issues:
- The backlight on sequence has an I2C MIPI sequence element which uses bus 0, but there is a bogus I2cSerialBus resource under the GPU in the DSDT which causes i2c_acpi_find_adapter() to pick the wrong bus. This leads to errors like these:
[ 178.244049] i2c_designware 80860F41:02: controller timed out
[ 178.245703] i915 0000:00:02.0: [drm] *ERROR* Failed to xfer payload of size (1) to reg (0)
Which causes the LP8557 backlight controller to not be told to turn the backlight on (assuming it was turned off correctly before, see 2. below) and this also causes a 1 second delay in turning the panel on.
- This tablet has a special backlight setup using a TI LP8557 backlight controller with its PWM input connected to a PWM output from the LCD panel (instead of to the PMIC/LPSS PWM output) and the panel driver then sends uses the non standard DSI reg/command 0x51 to set the duty-cycle of the LCD's PWM output.
Since the mainline i915 driver does not use panel-drivers, backlight control is instead taking care of by the lp855x backlight driver. An i2c_client is instantiated for this by platform code outside of i915 and this passes platform_data to the lp855x driver telling it to directly control the backlight level through its brightness register, ignoring the PWM input.
This works well, except that there is no backlight-off VBT MIPI sequence to match the backlight-on VBT MIPI sequence (which is giving the i2c-busnumber issues). This causes the backlight to stay on when the panel is off.
Here are drm.debug=0xe kernel logs and VBT info for this tablet, note the kernel logs are from a kernel which already contains the suggested fix for this from: https://lore.kernel.org/intel-gfx/20230916125455.237325-1-hdegoede@redhat.com/