vlv_dsi: Wrong i2c bus-number for mipi_exec_i2c() and wrong physical dimension on Lenovo Tablet 2 830 / 1050
The Lenovo Tablet 2 830 (8" version) and Lenovo Tablet 2 1050 (10" version) are x86 tablets which ship with Android as factory OS. These 2 tablets share the same mainboard and also both use the same BIOS.
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 I2C MIPI sequence elements reference bus 3. ACPI has I2C1 - I2C7 which under Linux become bus 0 - 6. And the MIPI sequence reference to bus 3 is indented for I2C3 which is bus 2 under Linux. This leads to errors like these:
[ 178.244049] i2c_designware 80860F41:03: controller timed out
[ 178.245703] i915 0000:00:02.0: [drm] *ERROR* Failed to xfer payload of size (1) to reg (
There are 3 timeouts when the panel is on, delaying waking up the screen on a key press by 3 seconds.
Note mipi_exec_i2c() cannot just subtract 1 from the bus given in the I2C MIPI sequence element. Since on other devices the I2C bus-numbers used in the MIPI sequences do actually start at 0.
- width_/height_mm contain a bogus 192mm x 120mm size on both models, shown under Connector info in /sys/kernel/debug/dri/0/i915_display_info as "physical dimensions: 192x120mm"
This is especially a problem on the 8" 830 version which uses a 10:16 portrait screen where as the bogus size is 16:10. Some userspace parts recognize 192x120 as a bogus size and that is a problem in itself because on the 8" we want hidpi rendering and without valid physical dimension info userspace will not enable this.
Here are drm.debug=0xe kernel logs and VBT info for both the 830 and 1050 models, 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/
dmesg-tab2-830.txt dmesg-tab2-1050.txt i915_vbt-tab2-830.bin i915_vbt-tab2-1050.bin