"Mario Limonciello (AMD)" <[email protected]> writes: Hello Mario,
> From: Mario Limonciello <[email protected]> > > 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 <[email protected]> > --- > 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 <[email protected]> -- Best regards, Javier Martinez Canillas Core Platforms Red Hat
