Re: [PATCH v11 12/12] drm/solomon: add SSD130x connector luminance support

From: Javier Martinez Canillas

Date: Mon Nov 16 2026 - 04:39:12 EST


"Mario Limonciello (AMD)" <superm1@xxxxxxxxxx> writes:

Hello Mario,

> From: Mario Limonciello <mario.limonciello@xxxxxxx>
>
> Expose SSD130x contrast through the connector LUMINANCE property when
> DRM_LUMINANCE is enabled. Program contrast directly and register the
> backlight class device only when DRM_LUMINANCE is disabled, so contrast
> has a single owner.
>
> Signed-off-by: Mario Limonciello <mario.limonciello@xxxxxxx>
> ---
> v11:
> * Keep selecting BACKLIGHT_CLASS_DEVICE and drop the guards (Sashiko)
> * Register the backlight device only without DRM_LUMINANCE (Sashiko)
> * Initialise the controller with the committed luminance and don't
> clobber the saved contrast on disable (Sashiko)
> * Skip contrast writes while the controller is powered down (Sashiko)
> * Unify contrast dispatch and backlight ops (Sashiko)
> * Drop Reviewed-by due to the rework
> v10:
> * Guard the backlight operations and registration with
> BACKLIGHT_CLASS_DEVICE
> * Fix Kconfig recursive issue
> * Add the Reviewed-by tag
> ---
> drivers/gpu/drm/solomon/ssd130x.c | 149 ++++++++++++++++++++++++--------------
> drivers/gpu/drm/solomon/ssd130x.h | 2 +
> 2 files changed, 98 insertions(+), 53 deletions(-)

[...]

> +static void ssd130x_connector_set_luminance(const struct drm_connector_state *conn_state)
> +{
> + struct ssd130x_device *ssd130x = drm_to_ssd130x(conn_state->connector->dev);
> +
> + /*
> + * The encoder enable already initialized the controller with the
> + * committed luminance. Skip if it failed to power up the controller.
> + */
> + if (!ssd130x->enabled || ssd130x->contrast == conn_state->luminance)
> + return;
> +

Is not clear to me why you need this enabled field? I would prefer to not
keep that state if possible.

The changes look good to me though:

Reviewed-by: Javier Martinez Canillas <javierm@xxxxxxxxxx>

--
Best regards,

Javier Martinez Canillas
Core Platforms
Red Hat