/* Returns the maximum level of the backlight duty cycle field.  */
static u32 intel_lvds_get_max_backlight(struct drm_device *dev)
/* Returns the maximum level of the backlight duty cycle field.  */
static u32 intel_lvds_get_max_backlight(struct drm_device *dev)
{
	struct drm_i915_private *dev_priv = dev->dev_private;
	u32 reg;
	if (IS_IRONLAKE(dev))
		reg = BLC_PWM_PCH_CTL2;
	else
		reg = BLC_PWM_CTL;
	return ((I915_READ(reg) & BACKLIGHT_MODULATION_FREQ_MASK) >>
		BACKLIGHT_MODULATION_FREQ_SHIFT) * 2;
}