[RFC PATCH 1/2] backlight: Rename duplicated devices to support dual-backlight setups
Pengyu Luo
mitltlatltl at gmail.com
Mon Jun 2 13:45:32 UTC 2025
On Mon, May 26, 2025 at 4:53 PM Jani Nikula <jani.nikula at linux.intel.com> wrote:
> On Sun, 25 May 2025, Pengyu Luo <mitltlatltl at gmail.com> wrote:
> > When registering a backlight device, if a device with the same name
> > already exists, append "-secondary" to the new device's name. This is
> > useful for platforms with dual backlight drivers (e.g. some panels use
> > dual ktz8866), where both instances need to coexist.
> >
> > For now, only one secondary instance is supported. If more instances
> > are needed, this logic can be extended with auto-increment or a more
> > flexible naming scheme.
>
> I think for both patches you should consider adding a new interface for
> creating dual backlight scenarios.
>
> For example, this patch turns a driver error (registering two or more
> backlights with the same name) into a special use case, patch 2
> magically connecting the two, and hiding the problem.
>
> With i915, you could have multiple devices, each with multiple
> independent panels with independent backlights. I think accidentally
> trying to register more than one backlight with the same name should
> remain an error, *unless* you want the special case of combined
> backlights.
>
> Similarly, what if you encounter a device with two panels, and two
> *independent* ktz8866?
>
> Please be explicit rather than implicit.
>
For i915, I noticed that it renamed the device internally, so I tried
to rename it in the backlight driver.
Indeed, patch 2 may combine independent panels, I was playing with
android tablet, and I ignored it, you had well explained it. Thanks
for pointing out, I will consider adding a new interface.
Best wishes,
Pengyu
More information about the dri-devel
mailing list