Re: [PATCH] platform/x86/tuxedo: Handle LampUpdateFlags in LampRangeUpdateReport

From: Ilpo Järvinen

Date: Thu Nov 19 2026 - 10:09:28 EST


On Thu, 29 Oct 2026, Aaron Erhardt wrote:

> According to HID Usage Tables v1.7 "Lighting And Illumination Page", the
> LampUpdateComplete flag marks an update report as the last of a batch. A
> device must apply all prior changes at once when it receives a report
> with this flag set.
>
> The handler for LampMultiUpdateReport already honors LampUpdateFlags,
> but the handler for LampRangeUpdateReport did not. It always set
> LampUpdateComplete on the final chunk, so every range update flushed the
> internal color state regardless of what the host requested. This reduced
> efficiency and caused unwanted intermediate states for software that
> batches updates using the flag.
>
> While splitting the update into several LampMultiUpdateReports, forward
> the flags from the range report on the final chunk. Intermediate chunks
> continue to carry no flags.
>
> Fixes: cfd84b3f419b ("platform/x86/tuxedo: Add virtual LampArray for TUXEDO NB04 devices")
> Cc: stable@xxxxxxxxxxxxxxx
> Signed-off-by: Aaron Erhardt <aer@xxxxxxxxxxxxxxxxxxx>
> ---
> Tested userspace software:
> - OpenRGB (aac7e55114)
> - lampctl (https://github.com/tuxedo-aer/lampctl 5da2aff)
> ---
> drivers/platform/x86/tuxedo/nb04/wmi_ab.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/platform/x86/tuxedo/nb04/wmi_ab.c b/drivers/platform/x86/tuxedo/nb04/wmi_ab.c
> index 3e5ba524fe58..300af12e5f8a 100644
> --- a/drivers/platform/x86/tuxedo/nb04/wmi_ab.c
> +++ b/drivers/platform/x86/tuxedo/nb04/wmi_ab.c
> @@ -724,7 +724,7 @@ static int handle_lamp_range_update_report(struct hid_device *hdev,
> lamp_multi_update_report.lamp_update_flags =
> i + LAMP_MULTI_UPDATE_REPORT_LAMP_COUNT_MAX >=
> rep->lamp_id_end + 1 ?
> - LAMP_UPDATE_FLAGS_LAMP_UPDATE_COMPLETE : 0;
> + rep->lamp_update_flags : 0;

Fits to previous line.

--
i.