mbox series

[0/4] drm/i915/vlv_dsi: Add quirks for x86 android tablets (v3)

Message ID 20230920195613.304091-1-hdegoede@redhat.com (mailing list archive)
Headers show
Series drm/i915/vlv_dsi: Add quirks for x86 android tablets (v3) | expand

Message

Hans de Goede Sept. 20, 2023, 7:56 p.m. UTC
Hi All,

Some vlv/chv tablets 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 with various things
hardcoded some DMI quirks are necessary to fix some issues on these
devices.

Some of these issues also are related to which I2C bus to use for
MIPI sequence elements which do I2C transfers. This series also
includes a patch adding some extra debugging to mipi_exec_i2c() to
help with debugging similar issues in the future.

These patches have been posted before but back then I did not get around
to follow up on the series:
https://lore.kernel.org/intel-gfx/20220225214934.383168-1-hdegoede@redhat.com/

v2:
- Drop the changes how the I2C bus number is found, instead just have
  the quirks set the right number directly where necessary. This should
  avoid any chances of causing regressions on devices where the quirks
  do not apply.
- New quirk for backlight control issues on Lenovo Yoga Tab 3
- Address Jani Nikula's remark about __func__ being redundant when using
  drm_dbg_kms()

v3:
- File 3 gitlab issues with drm.debug=0xe dmesg output, VBT dump for all
  3 affected models. Add Closes: tags with links to gitlab issues

Regards,

Hans


Hans de Goede (4):
  drm/i915/vlv_dsi: Add DMI quirk for wrong panel modeline in BIOS on
    Asus TF103C (v3)
  drm/i915/vlv_dsi: Add DMI quirk for wrong I2C bus and panel size on
    Lenovo Yoga Tablet 2 series (v3)
  drm/i915/vlv_dsi: Add DMI quirk for backlight control issues on Lenovo
    Yoga Tab 3 (v2)
  drm/i915/dsi: Add some debug logging to mipi_exec_i2c (v2)

 drivers/gpu/drm/i915/display/intel_dsi_vbt.c |   3 +
 drivers/gpu/drm/i915/display/vlv_dsi.c       | 124 +++++++++++++++++++
 2 files changed, 127 insertions(+)

Comments

Hans de Goede Oct. 8, 2023, 1:03 p.m. UTC | #1
Hi All,

Ping what is the status of this now? This v3 addresses all review
remarks from previous versions (specifically the request to file
+ link gitlab issues).

So AFAICT this is ready for merging ?

But I'm waiting for an ack for this before pushing it
do drm-intel-next myself ...

Regards,

Hans




On 9/20/23 21:56, Hans de Goede wrote:
> Hi All,
> 
> Some vlv/chv tablets 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 with various things
> hardcoded some DMI quirks are necessary to fix some issues on these
> devices.
> 
> Some of these issues also are related to which I2C bus to use for
> MIPI sequence elements which do I2C transfers. This series also
> includes a patch adding some extra debugging to mipi_exec_i2c() to
> help with debugging similar issues in the future.
> 
> These patches have been posted before but back then I did not get around
> to follow up on the series:
> https://lore.kernel.org/intel-gfx/20220225214934.383168-1-hdegoede@redhat.com/
> 
> v2:
> - Drop the changes how the I2C bus number is found, instead just have
>   the quirks set the right number directly where necessary. This should
>   avoid any chances of causing regressions on devices where the quirks
>   do not apply.
> - New quirk for backlight control issues on Lenovo Yoga Tab 3
> - Address Jani Nikula's remark about __func__ being redundant when using
>   drm_dbg_kms()
> 
> v3:
> - File 3 gitlab issues with drm.debug=0xe dmesg output, VBT dump for all
>   3 affected models. Add Closes: tags with links to gitlab issues
> 
> Regards,
> 
> Hans
> 
> 
> Hans de Goede (4):
>   drm/i915/vlv_dsi: Add DMI quirk for wrong panel modeline in BIOS on
>     Asus TF103C (v3)
>   drm/i915/vlv_dsi: Add DMI quirk for wrong I2C bus and panel size on
>     Lenovo Yoga Tablet 2 series (v3)
>   drm/i915/vlv_dsi: Add DMI quirk for backlight control issues on Lenovo
>     Yoga Tab 3 (v2)
>   drm/i915/dsi: Add some debug logging to mipi_exec_i2c (v2)
> 
>  drivers/gpu/drm/i915/display/intel_dsi_vbt.c |   3 +
>  drivers/gpu/drm/i915/display/vlv_dsi.c       | 124 +++++++++++++++++++
>  2 files changed, 127 insertions(+)
>
Jani Nikula Oct. 11, 2023, 1:05 p.m. UTC | #2
On Sun, 08 Oct 2023, Hans de Goede <hdegoede@redhat.com> wrote:
> Hi All,
>
> Ping what is the status of this now? This v3 addresses all review
> remarks from previous versions (specifically the request to file
> + link gitlab issues).
>
> So AFAICT this is ready for merging ?
>
> But I'm waiting for an ack for this before pushing it
> do drm-intel-next myself ...

There are maybe one or two things I could nitpick about, such as casting
away the const in there, but then I just don't have the time to look
into this much deeper, it's all fairly isolated, and, let's be honest,
you of all people probably have the best idea how well the vlv dsi code
works out in the real world.

Thanks for fixing all this stuff, and please just merge.

Acked-by: Jani Nikula <jani.nikula@intel.com>


>
> Regards,
>
> Hans
>
>
>
>
> On 9/20/23 21:56, Hans de Goede wrote:
>> Hi All,
>> 
>> Some vlv/chv tablets 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 with various things
>> hardcoded some DMI quirks are necessary to fix some issues on these
>> devices.
>> 
>> Some of these issues also are related to which I2C bus to use for
>> MIPI sequence elements which do I2C transfers. This series also
>> includes a patch adding some extra debugging to mipi_exec_i2c() to
>> help with debugging similar issues in the future.
>> 
>> These patches have been posted before but back then I did not get around
>> to follow up on the series:
>> https://lore.kernel.org/intel-gfx/20220225214934.383168-1-hdegoede@redhat.com/
>> 
>> v2:
>> - Drop the changes how the I2C bus number is found, instead just have
>>   the quirks set the right number directly where necessary. This should
>>   avoid any chances of causing regressions on devices where the quirks
>>   do not apply.
>> - New quirk for backlight control issues on Lenovo Yoga Tab 3
>> - Address Jani Nikula's remark about __func__ being redundant when using
>>   drm_dbg_kms()
>> 
>> v3:
>> - File 3 gitlab issues with drm.debug=0xe dmesg output, VBT dump for all
>>   3 affected models. Add Closes: tags with links to gitlab issues
>> 
>> Regards,
>> 
>> Hans
>> 
>> 
>> Hans de Goede (4):
>>   drm/i915/vlv_dsi: Add DMI quirk for wrong panel modeline in BIOS on
>>     Asus TF103C (v3)
>>   drm/i915/vlv_dsi: Add DMI quirk for wrong I2C bus and panel size on
>>     Lenovo Yoga Tablet 2 series (v3)
>>   drm/i915/vlv_dsi: Add DMI quirk for backlight control issues on Lenovo
>>     Yoga Tab 3 (v2)
>>   drm/i915/dsi: Add some debug logging to mipi_exec_i2c (v2)
>> 
>>  drivers/gpu/drm/i915/display/intel_dsi_vbt.c |   3 +
>>  drivers/gpu/drm/i915/display/vlv_dsi.c       | 124 +++++++++++++++++++
>>  2 files changed, 127 insertions(+)
>> 
>
Hans de Goede Oct. 12, 2023, 11:15 a.m. UTC | #3
Hi,

On 10/11/23 15:05, Jani Nikula wrote:
> On Sun, 08 Oct 2023, Hans de Goede <hdegoede@redhat.com> wrote:
>> Hi All,
>>
>> Ping what is the status of this now? This v3 addresses all review
>> remarks from previous versions (specifically the request to file
>> + link gitlab issues).
>>
>> So AFAICT this is ready for merging ?
>>
>> But I'm waiting for an ack for this before pushing it
>> do drm-intel-next myself ...
> 
> There are maybe one or two things I could nitpick about, such as casting
> away the const in there, but then I just don't have the time to look
> into this much deeper, it's all fairly isolated, and, let's be honest,
> you of all people probably have the best idea how well the vlv dsi code
> works out in the real world.
> 
> Thanks for fixing all this stuff, and please just merge.
> 
> Acked-by: Jani Nikula <jani.nikula@intel.com>

Thank you, I've pushed this to drm-intel-next now.

Regards,

Hans