When enabling the panel, the initial brightness level was hard-coded to
0x20. This way, during a suspend/resume cycle, after resume, this
hard-coded brightness was used, instead of the one before suspend.
Removing the hard-coded level and using the one stored in backlight
device.
Signed-off-by: Robert Chiras <robert.chiras@nxp.com>
struct mipi_dsi_device *dsi = rad->dsi;
struct device *dev = &dsi->dev;
int color_format = color_format_from_dsi_format(dsi->format);
+ u16 brightness;
int ret;
if (rad->enabled)
goto fail;
}
/* Set display brightness */
- ret = mipi_dsi_dcs_set_display_brightness(dsi, 0x20);
+ brightness = rad->backlight->props.brightness;
+ ret = mipi_dsi_dcs_set_display_brightness(dsi, brightness);
if (ret < 0) {
DRM_DEV_ERROR(dev, "Failed to set display brightness (%d)\n",
ret);