Subversion Repositories Kolibri OS

Compare Revisions

Regard whitespace Rev 2342 → Rev 3031

/drivers/video/drm/i915/dvo_ivch.c
288,7 → 288,7
}
 
/** Sets the power state of the panel connected to the ivch */
static void ivch_dpms(struct intel_dvo_device *dvo, int mode)
static void ivch_dpms(struct intel_dvo_device *dvo, bool enable)
{
int i;
uint16_t vr01, vr30, backlight;
297,13 → 297,13
if (!ivch_read(dvo, VR01, &vr01))
return;
 
if (mode == DRM_MODE_DPMS_ON)
if (enable)
backlight = 1;
else
backlight = 0;
ivch_write(dvo, VR80, backlight);
 
if (mode == DRM_MODE_DPMS_ON)
if (enable)
vr01 |= VR01_LCD_ENABLE | VR01_DVO_ENABLE;
else
vr01 &= ~(VR01_LCD_ENABLE | VR01_DVO_ENABLE);
315,7 → 315,7
if (!ivch_read(dvo, VR30, &vr30))
break;
 
if (((vr30 & VR30_PANEL_ON) != 0) == (mode == DRM_MODE_DPMS_ON))
if (((vr30 & VR30_PANEL_ON) != 0) == enable)
break;
udelay(1000);
}
323,6 → 323,20
udelay(16 * 1000);
}
 
static bool ivch_get_hw_state(struct intel_dvo_device *dvo)
{
uint16_t vr01;
 
/* Set the new power state of the panel. */
if (!ivch_read(dvo, VR01, &vr01))
return false;
 
if (vr01 & VR01_LCD_ENABLE)
return true;
else
return false;
}
 
static void ivch_mode_set(struct intel_dvo_device *dvo,
struct drm_display_mode *mode,
struct drm_display_mode *adjusted_mode)
413,6 → 427,7
struct intel_dvo_dev_ops ivch_ops = {
.init = ivch_init,
.dpms = ivch_dpms,
.get_hw_state = ivch_get_hw_state,
.mode_valid = ivch_mode_valid,
.mode_set = ivch_mode_set,
.detect = ivch_detect,