On Mon, May 2, 2016 at 9:56 PM, Vinay Simha <simhavcs@xxxxxxxxx> wrote: > Here does the parent also should be jdi->dsi->dev ? because the > backlight is not mapped to fb of android ( android-> > settings->brightness) , even though i can change the brightness value > from sysfs and it works only when the display is off. When it > awakes(power button press) panel_enable calls, backlight_update_status > will have the latest brightness value. > > if echo the brightness value when the display is awake, dsi fails for > brightness control. > echo 100 > /sys/class/backlight/4700000.qcom,mdss_dsi.0/brightness > [ 152.865949] dsi_cmds2buf_tx: cmd dma tx failed, type=0x15, data0=0x51, len=4 > > static int dsi_bl_update_status(struct backlight_device *bl) > { > struct jdi_panel *jdi = bl_get_data(bl); > struct mipi_dsi_device *dsi = jdi->dsi; > int ret; > u8 brightness = bl->props.brightness; > > ret = mipi_dsi_dcs_write(dsi, MIPI_DCS_SET_DISPLAY_BRIGHTNESS, > &brightness, sizeof(brightness)); > if (ret < 0) > return ret; > > return 0; > } > > static const struct backlight_ops dsi_bl_ops = { > .update_status = dsi_bl_update_status, > }; > > john, > for android fb do we need to map the backlight in userspace? As i have > seen in 3.4 kernel when we register the backlight using > platform_device_register, backlight used to map with the > userspace(ubuntu/fedora) settings->brightness. Just to follow up here. I did add a lights HAL in my userspace build to support the brightness sysfs interface. It looks like its working ok, but as you note above, the brightness settings from the slider don't seem to apply until the screen is turned off and back on. thanks -john _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/dri-devel