From: Amit Barzilai <amit.barzilai22@gmail.com>
To: Javier Martinez Canillas <javierm@redhat.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
Amit Barzilai <amit.barzilai22@gmail.com>
Subject: [PATCH 0/2] drm/ssd130x: Wire up ssd133x backlight/dimming
Date: Wed, 29 Jul 2026 08:30:52 +0300 [thread overview]
Message-ID: <20260729053054.29374-1-amit.barzilai22@gmail.com> (raw)
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.
Amit Barzilai (2):
drm/ssd130x: Scale ssd133x per-channel contrast by brightness on init
drm/ssd130x: Add per-family update backlight logic
drivers/gpu/drm/solomon/ssd130x.c | 67 +++++++++++++++++++++++++++----
1 file changed, 60 insertions(+), 7 deletions(-)
--
2.55.0
next reply other threads:[~2026-07-29 5:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-29 5:30 Amit Barzilai [this message]
2026-07-29 5:30 ` [PATCH 1/2] drm/ssd130x: Scale ssd133x per-channel contrast by brightness on init Amit Barzilai
2026-07-30 8:01 ` Javier Martinez Canillas
2026-07-29 5:30 ` [PATCH 2/2] drm/ssd130x: Add per-family update backlight logic Amit Barzilai
2026-07-30 8:07 ` Javier Martinez Canillas
2026-07-31 7:20 ` [PATCH 0/2] drm/ssd130x: Wire up ssd133x backlight/dimming Javier Martinez Canillas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260729053054.29374-1-amit.barzilai22@gmail.com \
--to=amit.barzilai22@gmail.com \
--cc=airlied@gmail.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=javierm@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®