Re: [PATCH 2/2] drm/bridge: Add LT7911EXC edp to mipi bridge driver

From: Dmitry Baryshkov

Date: Wed Apr 22 2026 - 15:04:06 EST


On Wed, Apr 22, 2026 at 09:06:22AM +0800, 杨孙运 wrote:
> Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx> 于2026年4月21日周二 19:15写道:
> >
> > On Tue, Apr 21, 2026 at 11:13:30AM +0800, 杨孙运 wrote:
> > > Dmitry Baryshkov <dmitry.baryshkov@xxxxxxxxxxxxxxxx> 于2026年4月20日周一 11:57写道:
> > > >
> > > > On Mon, 20 Apr 2026 at 05:34, <syyang@xxxxxxxxxxx> wrote:
> > > > >
> > > > > From: Sunyun Yang <syyang@xxxxxxxxxxx>

> > > > > + int fw_version;
> > > > > + u32 fw_crc;
> > > > > +
> > > > > + bool enabled;
> > > >
> > > > What for?
> > > >
> > > (bool enabled;) is used as a flag in the code to reduce the frequency
> > > of power supply switching.
> >
> > How does it help to reduce the rate?
> >
> The enabled flag is used to track the hardware power state. In
> lt7911exc_pre_enable(), we check if (lt7911exc->enabled) return; to
> avoid redundant regulator enabling and reset pulses when the DRM
> framework calls pre_enable multiple times.
>
> Similarly, lt7911exc_post_disable() uses it to prevent multiple
> power-down sequences. This reduces unnecessary power supply switching
> and potential side effects.

Is there a code path leading to multiple enable or multiple disable calls?

>
> However, if you consider this optimization unnecessary, I can remove
> the flag and the related checks in the next version. Please let me
> know your preference.
>

--
With best wishes
Dmitry