Lines Matching defs:backlight
66 #include "backlight.h"
276 struct backlight backlight;
785 val = backlight_get(&sna_output->backlight);
788 DBG(("%s(%s): backlight '%s' was %d, now %d\n",
789 __FUNCTION__, output->name, sna_output->backlight.iface,
829 if (udev_monitor_filter_add_match_subsystem_devtype(mon, "backlight", NULL))
841 DBG(("%s: installed backlight monitor\n", __FUNCTION__));
890 "Failed to set backlight %s for output %s, disabling\n",
891 sna_output->backlight.iface, output->name);
892 backlight_disable(&sna_output->backlight);
905 sna_output->base->name, level, sna_output->backlight.max));
907 if (backlight_set(&sna_output->backlight, level)) {
923 return sna_output->backlight.type == BL_RAW;
929 /* Trust the kernel to turn the native backlight off. However, we
930 * do explicitly turn the backlight back on (when we wake the output)
937 backlight_off(&sna_output->backlight);
947 if (backlight_on(&sna_output->backlight) < 0)
955 int level = backlight_get(&sna_output->backlight);
957 output->name, level, sna_output->backlight.max));
977 "Unrecognised backlight control interface '%s'\n",
1059 DBG(("%s: testing %s as backlight\n",
1098 /* XXX detect right backlight for multi-GPU/panels */
1105 DBG(("%s(%s) opening backlight %s\n", __FUNCTION__,
1108 backlight_open(&sna_output->backlight, best_iface);
1109 DBG(("%s(%s): initial backlight value %d\n",
1114 switch (sna_output->backlight.type) {
1121 "Found backlight control interface %s (type '%s') for output %s\n",
1122 sna_output->backlight.iface, best_iface, output->name);
1267 * the backlight.
1299 * the backlight.
1555 /* Make sure we mark the output as off (and save the backlight)
1557 * This is necessary as the kernel may turn off the backlight
4383 backlight_close(&sna_output->backlight);
4407 /* Record the value of the backlight before turning
4410 * reset the backlight across DPMS. Hence we need to
4414 if (sna_output->backlight.iface && dpms != DPMSModeOn) {
4417 DBG(("%s(%s:%d): saving current backlight %d\n",
4438 if (sna_output->backlight.iface && dpms == DPMSModeOn) {
4439 DBG(("%s(%d:%d: restoring previous backlight %d\n",
4570 if (sna_output->backlight.iface) {
4571 /* Set up the backlight property, which takes effect
4577 sna_output->backlight.max,
4583 sna_output->backlight.max,
4608 DBG(("%s: setting backlight to %d (max=%d)\n",
4609 __FUNCTION__, (int)val, sna_output->backlight.max));
4610 if (val < 0 || val > sna_output->backlight.max)
4680 if (!sna_output->backlight.iface)
4687 DBG(("%s(%s): output on, reporting actual backlight value [%d]\n",
4691 DBG(("%s(%s): output off, reporting cached backlight value [%d]\n",
5343 backlight_init(&sna_output->backlight);
8590 /* VT switching, likely to be fbcon so make the backlight usable */
8598 if (!sna_output->backlight.iface)