Re: [PATCH 0/2] drm/ssd130x: Wire up ssd133x backlight/dimming
From: Javier Martinez Canillas
Date: Fri Jul 31 2026 - 03:24:22 EST
Amit Barzilai <amit.barzilai22@xxxxxxxxx> writes:
Hello Amit,
> The ssd130x backlight controller adjusts brightness by writing the panel's
> contrast, but ssd130x_update_bl() writes the single global SSD13XX_CONTRAST
> (0x81) command that only the SSD130x and SSD132x families expose. SSD133x
> has no such command: brightness is controlled through three per-channel
> contrast registers (CONTRAST_A/B/C) that form a white-balance calibration
> and must be scaled together. As a result the backlight device registered
> for an ssd133x panel had no effect.
>
> This series adds ssd133x dimming:
>
> - Patch 1 extracts the ssd133x_init() contrast magic values into
> ssd133x_set_contrast(), which scales the per-channel calibration by a
> requested brightness so the white point is preserved while dimming.
>
> - Patch 2 makes backlight_ops.update_status a per-family choice, so
> ssd133x uses a handler that drives the three channels while SSD130x and
> SSD132x keep the existing single-register path.
>
> Note patch 1 changes the ssd133x power-on brightness: it previously booted
> at the unscaled (full) calibration and ignored the contrast field, and now
> honours the shared default contrast of 127, i.e. half of MAX_CONTRAST.
> This is intentional and matches ssd130x, whose contrast register also
> defaults to mid-scale, so all families now power on at ~50%.
>
> WARNING - NOT TESTED ON HARDWARE: this series is compile-tested only. I do
> not have an ssd133x panel, so the runtime behaviour -- in particular the
> ssd133x contrast scaling and the new per-family backlight update -- is
> unverified. It is posted now so that dependent work (ssd1351 support) can
> be based on it. Review and testing by anyone with the hardware is welcome.
>
I've reviewed the patches and are quite straightforward so I think is safe
to merge them. I'll wait a few days in case someone else have comments but
feel free to post your ssd1351 patches if you have them already, just note
in the cover letter that depend on this patch-set.
--
Best regards,
Javier Martinez Canillas
Core Platforms
Red Hat