[PATCH 1/2] drm/panel: Allow powering on panel follower after panel is enabled

Doug Anderson dianders at chromium.org
Thu Jul 31 16:38:20 UTC 2025


Hi,

On Thu, Jul 31, 2025 at 3:31 AM Jani Nikula <jani.nikula at linux.intel.com> wrote:
>
> On Thu, 31 Jul 2025, Pin-Yen Lin <treapking at chromium.org> wrote:
> > Some touch controllers have to be powered on after the panel's backlight
> > is enabled. To support these controllers, introduce after_panel_enabled
> > flag to the panel follower and power on the device after the panel and
> > its backlight are enabled.
>
> I think it's *very* confusing and error prone to call follower hooks at
> different places depending on a flag. The hook names and documentation
> say *when* they get called, and that should not change.
>
> I think the right approach would be to add .panel_enabled and
> .panel_disabling hooks to struct drm_panel_follower_funcs, and have them
> called after panel (and backlight) have been enabled and before panel
> (and backlight) are disabled, respectively.
>
> In i2c-hid-core.c, you'd then have two copies of struct
> drm_panel_follower_funcs, and use one or the other depending on the
> quirk. You can even reuse the functions.
>
> I think overall it'll be be more consistent, more flexible, and probably
> fewer lines of code too.

Yes, exactly what Jani said. We've wanted to do this before, but I
just never got around to it. There's even a (public) bug for it in the
Google bug tracker and I've just assigned it to you. :-P

https://issuetracker.google.com/305780363

-Doug


More information about the dri-devel mailing list