Lines Matching defs:level
436 static void intel_pch_panel_set_backlight(struct drm_device *dev, u32 level)
440 I915_WRITE(BLC_PWM_CPU_CTL, val | level);
443 static void intel_panel_actually_set_backlight(struct drm_device *dev, u32 level)
448 DRM_DEBUG_DRIVER("set backlight PWM = %d\n", level);
449 level = intel_panel_compute_brightness(dev, level);
452 intel_pch_panel_set_backlight(dev, level);
464 lbpc = level * 0xfe / max + 1;
465 level /= lbpc;
471 level <<= 1;
473 I915_WRITE(BLC_PWM_CTL, tmp | level);
476 /* set backlight brightness to level in range [0..max] */
477 void intel_panel_set_backlight(struct drm_device *dev, u32 level, u32 max)
493 level = level * freq / max;
495 level = freq / max * level;
497 dev_priv->backlight.level = level;
499 // dev_priv->backlight.device->props.brightness = level;
502 intel_panel_actually_set_backlight(dev, level);
555 if (dev_priv->backlight.level == 0) {
556 dev_priv->backlight.level = intel_panel_get_max_backlight(dev);
559 // dev_priv->backlight.level;
606 intel_panel_actually_set_backlight(dev, dev_priv->backlight.level);
615 dev_priv->backlight.level = intel_panel_get_backlight(dev);
616 dev_priv->backlight.enabled = dev_priv->backlight.level != 0;
679 props.brightness = dev_priv->backlight.level;