Lines Matching defs:val
334 u32 val;
339 val = I915_READ(BLC_PWM_PCH_CTL2);
341 dev_priv->regfile.saveBLC_PWM_CTL2 = val;
342 } else if (val == 0) {
343 val = dev_priv->regfile.saveBLC_PWM_CTL2;
344 I915_WRITE(BLC_PWM_PCH_CTL2, val);
347 val = I915_READ(BLC_PWM_CTL);
349 dev_priv->regfile.saveBLC_PWM_CTL = val;
353 } else if (val == 0) {
354 val = dev_priv->regfile.saveBLC_PWM_CTL;
355 I915_WRITE(BLC_PWM_CTL, val);
362 return val;
388 static u32 intel_panel_compute_brightness(struct drm_device *dev, u32 val)
393 return val;
399 return max - val;
402 return val;
408 u32 val;
414 val = I915_READ(BLC_PWM_CPU_CTL) & BACKLIGHT_DUTY_CYCLE_MASK;
416 val = I915_READ(BLC_PWM_CTL) & BACKLIGHT_DUTY_CYCLE_MASK;
418 val >>= 1;
424 val *= lbpc;
428 val = intel_panel_compute_brightness(dev, val);
432 DRM_DEBUG_DRIVER("get backlight PWM = %d\n", val);
433 return val;
439 u32 val = I915_READ(BLC_PWM_CPU_CTL) & ~BACKLIGHT_DUTY_CYCLE_MASK;
440 I915_WRITE(BLC_PWM_CPU_CTL, val | level);