[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAEXTbpcPxpbtwy70uGxMcwsTcjpTqEX3EBZUyMg-6k5ULE1PmA@mail.gmail.com>
Date: Fri, 1 Aug 2025 19:04:59 +0800
From: Pin-yen Lin <treapking@...omium.org>
To: Doug Anderson <dianders@...omium.org>, Jani Nikula <jani.nikula@...ux.intel.com>
Cc: Neil Armstrong <neil.armstrong@...aro.org>, Jessica Zhang <quic_jesszhan@...cinc.com>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>, Maxime Ripard <mripard@...nel.org>,
Thomas Zimmermann <tzimmermann@...e.de>, David Airlie <airlied@...il.com>, Simona Vetter <simona@...ll.ch>,
Jiri Kosina <jikos@...nel.org>, Benjamin Tissoires <bentiss@...nel.org>, linux-kernel@...r.kernel.org,
linux-input@...r.kernel.org, dri-devel@...ts.freedesktop.org,
Chen-Yu Tsai <wenst@...omium.org>, Pin-Yen Lin <treapking@...gle.com>
Subject: Re: [PATCH 1/2] drm/panel: Allow powering on panel follower after
panel is enabled
Hi Doug and Jani,
Thanks for the review.
On Fri, Aug 1, 2025 at 12:38 AM Doug Anderson <dianders@...omium.org> wrote:
>
> Hi,
>
> On Thu, Jul 31, 2025 at 3:31 AM Jani Nikula <jani.nikula@...ux.intel.com> wrote:
> >
> > On Thu, 31 Jul 2025, Pin-Yen Lin <treapking@...omium.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.
I was thinking that we probably will never have a device that needs to
register both .panel_prepared() and .panel_enabled(), so I implemented
it like this. I'll update this in the next version.
I'll also fix the s-o-b line. Apparently I've messed up with my local
git setting.
>
> 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
So my series is not a new idea :P
>
> -Doug
Regards,
Pin-yen
Powered by blists - more mailing lists