Message ID | 20240731122311.1143153-5-tzimmermann@suse.de (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
Series | drm: Use backlight power constants | expand |
On 7/31/2024 5:17 AM, Thomas Zimmermann wrote: > Replace FB_BLANK_ constants with their counterparts from the > backlight subsystem. The values are identical, so there's no > change in functionality or semantics. > > Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> > Cc: Neil Armstrong <neil.armstrong@linaro.org> > Cc: Jessica Zhang <quic_jesszhan@quicinc.com> Reviewed-by: Jessica Zhang <quic_jesszhan@quicinc.com> > --- > drivers/gpu/drm/panel/panel-orisetech-otm8009a.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/gpu/drm/panel/panel-orisetech-otm8009a.c b/drivers/gpu/drm/panel/panel-orisetech-otm8009a.c > index 93183f30d7d6..a9b5dad70bc1 100644 > --- a/drivers/gpu/drm/panel/panel-orisetech-otm8009a.c > +++ b/drivers/gpu/drm/panel/panel-orisetech-otm8009a.c > @@ -389,7 +389,7 @@ static int otm8009a_backlight_update_status(struct backlight_device *bd) > return -ENXIO; > } > > - if (bd->props.power <= FB_BLANK_NORMAL) { > + if (bd->props.power <= BACKLIGHT_POWER_REDUCED) { > /* Power on the backlight with the requested brightness > * Note We can not use mipi_dsi_dcs_set_display_brightness() > * as otm8009a driver support only 8-bit brightness (1 param). > @@ -465,7 +465,7 @@ static int otm8009a_probe(struct mipi_dsi_device *dsi) > > ctx->bl_dev->props.max_brightness = OTM8009A_BACKLIGHT_MAX; > ctx->bl_dev->props.brightness = OTM8009A_BACKLIGHT_DEFAULT; > - ctx->bl_dev->props.power = FB_BLANK_POWERDOWN; > + ctx->bl_dev->props.power = BACKLIGHT_POWER_OFF; > ctx->bl_dev->props.type = BACKLIGHT_RAW; > > drm_panel_add(&ctx->panel); > -- > 2.45.2 >
diff --git a/drivers/gpu/drm/panel/panel-orisetech-otm8009a.c b/drivers/gpu/drm/panel/panel-orisetech-otm8009a.c index 93183f30d7d6..a9b5dad70bc1 100644 --- a/drivers/gpu/drm/panel/panel-orisetech-otm8009a.c +++ b/drivers/gpu/drm/panel/panel-orisetech-otm8009a.c @@ -389,7 +389,7 @@ static int otm8009a_backlight_update_status(struct backlight_device *bd) return -ENXIO; } - if (bd->props.power <= FB_BLANK_NORMAL) { + if (bd->props.power <= BACKLIGHT_POWER_REDUCED) { /* Power on the backlight with the requested brightness * Note We can not use mipi_dsi_dcs_set_display_brightness() * as otm8009a driver support only 8-bit brightness (1 param). @@ -465,7 +465,7 @@ static int otm8009a_probe(struct mipi_dsi_device *dsi) ctx->bl_dev->props.max_brightness = OTM8009A_BACKLIGHT_MAX; ctx->bl_dev->props.brightness = OTM8009A_BACKLIGHT_DEFAULT; - ctx->bl_dev->props.power = FB_BLANK_POWERDOWN; + ctx->bl_dev->props.power = BACKLIGHT_POWER_OFF; ctx->bl_dev->props.type = BACKLIGHT_RAW; drm_panel_add(&ctx->panel);
Replace FB_BLANK_ constants with their counterparts from the backlight subsystem. The values are identical, so there's no change in functionality or semantics. Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de> Cc: Neil Armstrong <neil.armstrong@linaro.org> Cc: Jessica Zhang <quic_jesszhan@quicinc.com> --- drivers/gpu/drm/panel/panel-orisetech-otm8009a.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)